From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCHv1 3/3] x86/ept: defer the invalidation until the p2m lock is released Date: Fri, 6 Nov 2015 18:39:30 +0000 Message-ID: <563CF3E2.3030604@citrix.com> 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 1ZulvI-0006Q6-R4 for xen-devel@lists.xenproject.org; Fri, 06 Nov 2015 18:39:40 +0000 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 , xen-devel@lists.xenproject.org Cc: Kevin Tian , Jan Beulich , Jun Nakajima List-Id: xen-devel@lists.xenproject.org On 06/11/15 17:37, David Vrabel wrote: > out: > if ( fdom ) > rcu_unlock_domain(fdom); > return rc; > } > + > +int p2m_setup(void) > +{ > + unsigned int cpu; > + > + for_each_present_cpu(cpu) > + INIT_PAGE_LIST_HEAD(&per_cpu(p2m_deferred_free_pages, cpu)); > + > + return 0; > +} > +__initcall(p2m_setup); > + This is going to create problems for cpu hotplug, and some power governers. The INIT_PAGE_LIST_HEAD() needs to be in a CPU_PREPARE notifier. It might also be wise to have the DYING side confirm that the list is empty. ~Andrew