lkml.org 
[lkml]   [2008]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Approach #2] [RFC][PATCH] Remove cgroup member from struct page
From
Date
On Wed, 2008-09-10 at 15:36 -0700, Balbir Singh wrote:
> Dave Hansen wrote:
> > On Tue, 2008-09-09 at 18:20 -0700, Balbir Singh wrote:
> >> + start = pgdat->node_start_pfn;
> >> + end = pgdat->node_start_pfn + pgdat->node_spanned_pages;
> >> + size = (end - start) * sizeof(struct page_cgroup);
> >> + printk("Allocating %lu bytes for node %d\n", size, n);
> >> + pcg_map[n] = alloc_bootmem_node(pgdat, size);
> >> + /*
> >> + * We can do smoother recovery
> >> + */
> >> + BUG_ON(!pcg_map[n]);
> >> + return 0;
> >> }
> >
> > This will really suck for sparse memory machines. Imagine a machine
> > with 1GB of memory at 0x0 and another 1GB of memory at 1TB up in the
> > address space.
> >
>
> I would hate to re-implement the entire sparsemem code :(
> Kame did suggest making the memory controller depend on sparsemem (to hook in
> from there for allocations)

Yeah, you could just make another mem_section member. Or, you could
work to abstract the sparsemem code so that other people can use it, or
maybe make it more dynamic so we can have multiple pfn->object lookups
in parallel. Adding the struct member is obviously easier.

-- Dave



\
 
 \ /
  Last update: 2008-09-11 00:59    [W:1.460 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site