From: Ryan Harper Subject: Re: [PATCH 2/6] xen: Add NUMA support to Xen Date: Tue, 2 May 2006 09:53:45 -0500 Message-ID: <20060502145345.GB16776@us.ibm.com> References: <20060501215708.GV16776@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, Ryan Grimm List-Id: xen-devel@lists.xenproject.org * Keir Fraser [2006-05-02 09:18]: > > On 1 May 2006, at 22:57, Ryan Harper wrote: > > >This patch introduces a per-node layer to the buddy allocator. Xen > >currently > >defines the heap as a two-dimensional array, [zone][order]. This > >patch adds a > >node layer between zone and order. This allows Xen to hand memory out > >in the > >proper zone while preferring local memory allocation, but can > >fall-back on > >non-local to satisfy a zone request. > > Loops over every memory chunk structure on the alloc/free paths aren't > going to get merged. There's no need for it -- in most cases memory > chunks are probably aligned on a MAX_ORDER boundary (or they will be > when I reduce MAX_ORDER, which requires me to fix up our Linux swiotlb > a bit first). When that isn't the case you can simply reserve guard > pages at the start and end of such chunks to avoid cross-chunk merging. I'll toss page_spans_chunk() and the user in the free path, use some guard pages and resubmit. page_to_node still uses the chunk array to determine which node a struct page_info belongs to, which is used in the free path. Is that acceptable? -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 ryanh@us.ibm.com