lkml.org 
[lkml]   [2008]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3 (RFC)](memory hotplug) align maps for easy removing
> >  Index: current/mm/sparse.c
> > ===================================================================
> > --- current.orig/mm/sparse.c 2008-03-11 20:15:41.000000000 +0900
> > +++ current/mm/sparse.c 2008-03-11 20:58:18.000000000 +0900
> > @@ -244,7 +244,8 @@
> > struct mem_section *ms = __nr_to_section(pnum);
> > int nid = sparse_early_nid(ms);
> >
> > - usemap = alloc_bootmem_node(NODE_DATA(nid), usemap_size());
> > + usemap = alloc_bootmem_pages_node(NODE_DATA(nid),
> > + PAGE_ALIGN(usemap_size()));
>
> if we allocate usemap continuously,
> old way could make different usermap share one page. usermap size is
> only about 24bytes. align to 128bytes ( the SMP cache lines)
>
> sparse_early_usemap_alloc: usemap = ffff810024e00000 size = 24
> sparse_early_usemap_alloc: usemap = ffff810024e00080 size = 24
> sparse_early_usemap_alloc: usemap = ffff810024e00100 size = 24
> sparse_early_usemap_alloc: usemap = ffff810024e00180 size = 24


Yes, they can share one page.

I was afraid its page will be hard to remove yesterday.
If all sections' usemaps are allocated on section A,
the other sections (from B to Z) must be removed before section A.
If only one of them are busy, section A can't be removed.
So, I disliked its dependency.

But, I reconsidered it after reading your mail.
The node structures like pgdat has same feature.
If a section has pgdat for the node, it must wait for other section's
removing on the node. So, I'll try to keep same section about pgdat
and shared usemap page.

Anyway, thanks for your comments.

Bye.

--
Yasunori Goto




\
 
 \ /
  Last update: 2008-03-15 05:17    [W:0.036 / U:9.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site