From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC PATCH] page_alloc: use first half of higher order chunks when halving Date: Mon, 14 Apr 2014 10:40:17 -0400 Message-ID: <20140414144017.GB23371@phenom.dumpdata.com> References: <20140401122223.GA62612@deinos.phlegethon.org> <533B5732.6050001@gmail.com> <533BDDF0020000780000489C@nat28.tlf.novell.com> <1396433179.8667.292.camel@kazak.uk.xensource.com> <533BFF7D02000078000049B8@nat28.tlf.novell.com> <1396434020.8667.300.camel@kazak.uk.xensource.com> <5345C7F2.5050005@gmail.com> <20140411170536.GA14755@phenom.dumpdata.com> <20140413213220.GG99209@deinos.phlegethon.org> <534BBDB602000078000084CA@nat28.tlf.novell.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 1WZi4E-0003Vx-QI for xen-devel@lists.xenproject.org; Mon, 14 Apr 2014 14:41:03 +0000 Content-Disposition: inline In-Reply-To: <534BBDB602000078000084CA@nat28.tlf.novell.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: Jan Beulich Cc: Keir Fraser , Ian Campbell , Matthew Rushton , AndrewCooper , Tim Deegan , Matt Wilson , Matt Wilson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Mon, Apr 14, 2014 at 09:51:34AM +0100, Jan Beulich wrote: > >>> On 13.04.14 at 23:32, wrote: > > (c) If for some reason the current hypercall API is not sufficient > > for dom0 to get what it wants, we should consider adding some new > > operation/flag/mode somewhere. But since AFAIK there's already > > another path in linux that allocates contiguous DMA buffers > > for device drivers, presumably this isn't the case. > > And it should be kept in mind that requesting contiguous memory > shouldn't be done at will, as it may end up exhausting the portion > of memory intended for DMA-style allocations (SWIOTLB / DMA- > coherent allocations in Linux). I.e. neither Dom0 nor DomU should > be trying to populate large parts of their memory with contiguous > allocation requests to the hypervisor. They may, if they so desire, > go and re-arrange their P2M mapping (solely based on what they > got handed by doing order-0 allocations). I did try that at some point - and it did not work. The reason for trying this was that during the E820 parsing we would find the MMIO holes/gaps and instead of doing the 'XENMEM_decrease_reservation'/ 'XENMEM_populate_physmap' dance I thought I could just swap the P2M entries. That was OK, but the M2P lookup table was not too thrilled with this. Perhaps I should have used another hypercall to re-arrange the M2P? I think I did try 'XENMEM_exchange' but that is not the right call either. Perhaps I should use XENMEM_remove_from_physmap/XENMEM_add_to_physmap combo ? > > Jan >