From: Tim Deegan Subject: Re: [PATCHv1 3/3] x86/ept: defer the invalidation until the p2m lock is released Date: Tue, 10 Nov 2015 13:35:12 +0000 Message-ID: <20151110133512.GB27638@deinos.phlegethon.org> References: <1446831437-5897-1-git-send-email-david.vrabel@citrix.com> <1446831437-5897-4-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zw94w-0005ia-4Y for xen-devel@lists.xenproject.org; Tue, 10 Nov 2015 13:35:18 +0000 Content-Disposition: inline In-Reply-To: <1446831437-5897-4-git-send-email-david.vrabel@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: xen-devel@lists.xenproject.org, Kevin Tian , Jun Nakajima , Jan Beulich , Andrew Cooper List-Id: xen-devel@lists.xenproject.org At 17:37 +0000 on 06 Nov (1446831437), David Vrabel wrote: > Holding the p2m lock while calling ept_sync_domain() is very expensive > since it does a on_selected_cpus() call. IPIs on many socket machines > can be very slows and on_selected_cpus() is serialized. > > Defer the invalidate until the p2m lock is released. Since the processor > may cache partial translations, we also need to make sure any page table > pages to be freed are not freed until the invalidate is complete. Such > pages are temporarily stored an per-PCPU list. That seems like it could get messy if a PCPU might have multiple p2ms locked at once (e.g. nested HAP, altp2m). I think a per-p2m list would be more obviously correct, and not too expensive. Cheers, Tim.