[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/4] domain heap allocator changes - remove bit width restrictions

  • To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Fri, 23 Feb 2007 18:19:22 +0000
  • Delivery-date: Fri, 23 Feb 2007 10:18:50 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcdXdyP/YqfqUsNqEduOgAAX8io7RQ==
  • Thread-topic: [Xen-devel] [PATCH 3/4] domain heap allocator changes - remove bit width restrictions

On 7/2/07 17:11, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> Hide the (default or user specified) DMA width from anything outside
> the heap allocator. I/O-capable guests can now request any width for
> the memory they want exchanged/added.
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Applied, but this patch turns the 'heap' list heads in page_alloc.c into a
barking-mad three-dimensional array which will consume over 1MB of BSS on
x86/64! As it happens it also confuses older versions of the PXELinux mboot
module (at least v0.1) which fails to load the dom0 kernel image correctly.

This array is going to have to become a dynamic-allocated and linked
structure. Perhaps:

struct list_head **heap_by_node[MAX_NUMNODES];
heap_by_node[node] = xmalloc_array(struct list_head **, nr_zones);
heap_by_zone = heap_by_node[node];  /* type: list_head ** */
heap_by_zone[zone] = xmalloc_array(struct list_head, MAX_ORDER+1);
heap_by_order = heap_by_zone[zone]; /* type: list_head * */

I.e., a double indirection to get to a particular heap list_head.

Perhaps I'll take a look over the weekend...

 -- Keir

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.