From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Rushton Subject: Re: [RFC PATCH] page_alloc: use first half of higher order chunks when halving Date: Tue, 01 Apr 2014 17:17:54 -0700 Message-ID: <533B5732.6050001@gmail.com> References: <5332F948.1020909@gmail.com> <20140326163609.GD21368@phenom.dumpdata.com> <533312C0.1050507@gmail.com> <20140326175606.GA24179@phenom.dumpdata.com> <5333518E.40203@gmail.com> <20140328170201.GB12659@phenom.dumpdata.com> <5335F25F.9050309@gmail.com> <20140331141500.GB3159@phenom.dumpdata.com> <533A31B7.8090608@gmail.com> <20140401104825.GA5342@localhost.localdomain> <20140401122223.GA62612@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1WV8sU-0003GF-PC for xen-devel@lists.xenproject.org; Wed, 02 Apr 2014 00:18:03 +0000 Received: by mail-pa0-f42.google.com with SMTP id fb1so10708275pad.1 for ; Tue, 01 Apr 2014 17:17:56 -0700 (PDT) In-Reply-To: <20140401122223.GA62612@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan , Konrad Rzeszutek Wilk Cc: Keir Fraser , Jan Beulich , Matt Wilson , Matt Wilson , Andrew Cooper , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 04/01/14 05:22, Tim Deegan wrote: > At 06:48 -0400 on 01 Apr (1396331306), Konrad Rzeszutek Wilk wrote: >> On Mon, Mar 31, 2014 at 08:25:43PM -0700, Matthew Rushton wrote: >>> Are there any concerns about the proposed Xen change as a reasonable >>> work around for the current implementation? Thank you! >> So I finally understood what the concern was about it - the balloon >> mechanics get the pages in worst possible order. I am wondeirng if there >> is something on the Linux side we can do to tell Xen to give them to use >> in the proper order? > The best way, at least from Xen's point of view, is to explicitly > allocate contiguous pages in the cases where it'll make a difference > AIUI linux already does this for some classes of dma-able memory. I'm in agreement that if any change is made to Linux it should be to make as large as possible allocations and back off accordingly. I suppose another approach could be to add a boot option to not reallocate at all. >> Could we swap the order of xen_do_chunk so it starts from the end and >> goes to start? Would that help? > As long as we don't also change the default allocation order in > Xen. :) In general, linux shouldn't rely on the order that Xen > allocates memory, as that might change later. If the current API > can't do what's needed, maybe we can add another allocator > hypercall or flag? Agree on not relying on the order in the long run. A new hypercall or flag seems like overkill right now. The question for me comes down to my proposed change which is more simple and solves the short term problem or investing time in reworking the Linux code to make large allocations. > > Cheers, > > Tim.