[lkml]   [2010]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 10/11] Direct compact when a high-order allocation fails
On Wed, 24 Mar 2010 13:48:16 -0700
Andrew Morton <> wrote:

> On Tue, 23 Mar 2010 12:25:45 +0000
> Mel Gorman <> wrote:

> > + /*
> > + * We will not stall if the necessary conditions are not met for
> > + * migration but direct reclaim seems to account stalls similarly
> > + */
> > + count_vm_event(COMPACTSTALL);
> > +
> > + /* Compact each zone in the list */
> > + for_each_zone_zonelist_nodemask(zone, z, zonelist, high_zoneidx,
> > + nodemask) {
> Will all of this code play nicely with memory hotplug?

If your concern is a race with memory hotplug, I have no concern about that
because memory hotplug makes a range of pages as "not for use" before starting.
If your concern is "code sharing", shared codes between memory hotplug and
compaction is "migrate_pages()".

Other parts are independent from each other.

Memory Hotremove does

1. select a range for removal [start ....end)
2. mark free pages as "not for use" by migrate_type
3. move all used pages to other range.
4. Finally, all pages in the range will be "not for use"

Compaction does
1. select a target order
2. move some free pages to private list
3. move some used pages to pages in private list.
4. free pages.

So, techniques to isolate freed pages is different.
I think it's from their purpose.

"freed pages" by compaction is
- for use
- a chunk of page from anywhere is ok.

but "freed pages" by memory unplug is
- not for use
- a chunk of page should be in specified range.

For using memory hotplug's code for compaction, we have to specify
"not for use" range. It will make low order compaction innefficient
and it seems not easy to find the best range for compaction.

For compaction, logic used in memory hotplug is too big hummer, I guess.


 \ /
  Last update: 2010-03-25 02:03    [W:0.255 / U:4.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site