From: Tim Deegan Subject: Re: [PATCH RFC 2/4] xen: grant_table: implement grant_table_soft_reset() Date: Thu, 4 Jun 2015 16:44:47 +0100 Message-ID: <20150604154447.GK74656@deinos.phlegethon.org> References: <1433338522-8422-1-git-send-email-vkuznets@redhat.com> <1433338522-8422-3-git-send-email-vkuznets@redhat.com> <20150604141151.GG74656@deinos.phlegethon.org> <55706D26.9020202@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z0XKA-0002KD-Mp for xen-devel@lists.xenproject.org; Thu, 04 Jun 2015 15:44:54 +0000 Content-Disposition: inline In-Reply-To: <55706D26.9020202@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Andrew Jones , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Julien Grall , Ian Jackson , Olaf Hering , Jan Beulich , xen-devel@lists.xenproject.org, Wei Liu , Vitaly Kuznetsov , Daniel De Graaf List-Id: xen-devel@lists.xenproject.org At 16:22 +0100 on 04 Jun (1433434934), David Vrabel wrote: > On 04/06/15 15:11, Tim Deegan wrote: > > > > There has been talk before of an operation along the lines of "revoke > > this grant entry and wait for all users to release it" but that would > > only help with backends that are guaranteed to release grants in a > > reasonable time. > > Are you talking about my idea? This would be immediate because the grant > mapper would provide a local page to atomically switch the foreign > mapping to when the grant is revoked. That's a stronger operation than I remembered, and similar to what's happening here. If this reset operation is to be called from the guest, then all the guest can do is reshuffle its own memory -- it can't expect to have enough spare memory to cover all outstanding granted pages. But TBH this is a bit of a red herring; I ought not to have mentioned it. :) Tim.