From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/4] xen: introduce an "scrub" free page list Date: Wed, 18 Jun 2014 09:18:14 -0400 Message-ID: <20140618131814.GD2788@laptop.dumpdata.com> References: <1403005783-30746-1-git-send-email-bob.liu@oracle.com> <1403005783-30746-2-git-send-email-bob.liu@oracle.com> <53A05278020000780001B079@mail.emea.novell.com> <53A0E328.8070702@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WxFkx-0000ZB-4S for xen-devel@lists.xenproject.org; Wed, 18 Jun 2014 13:18:27 +0000 Content-Disposition: inline In-Reply-To: <53A0E328.8070702@oracle.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: Bob Liu Cc: Bob Liu , keir@xen.org, ian.campbell@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, Jun 18, 2014 at 08:54:00AM +0800, Bob Liu wrote: > > On 06/17/2014 08:36 PM, Jan Beulich wrote: > >>>> On 17.06.14 at 13:49, wrote: > >> Because of page scrubbing, it's very slow to destroy a domain with large > >> memory. > >> It takes around 10 minutes when destroy a guest of nearly 1 TB of memory. > >> > >> This patch introduced a "scrub" free page list, pages on this list need to be > >> scrubbed before use. During domain destory just mark pages "PGC_need_scrub" > >> and then add them to this list, so that xl can return quickly. > >> > >> In alloc_domheap_pages(): > >> - If there are pages on the normal "heap" freelist, allocate them. > >> - Try to allocate from the "scrub" free list with the same order and do > >> scrubbing synchronously. > >> > >> In order to not fail high order allocate request, merge page trunks for > >> PGC_need_scrub pages. > >> Note: PCG_need_scrub pages and normal pages are not mergeable > > > > The whole series needs sync-ing logically both with Konrad's recent > > boot time scrubbing changes (this change here really makes his > > change unnecessary - the affected pages could quite well be simply > > marked as needing scrubbing, getting dealt with by the logic added > > here) and with XSA-100's change. > > > > I agree. Konrad? The patch is already in staging. See 7430a86de0c9bd126b441570e459f6e06413cbf6 and 4bd78937ec324bcef4e29ef951e0ff9815770de1. Thanks!