Re: [PATCH 10/11] Direct compact when a high-order allocation fails

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

 



On Wed, 24 Mar 2010 13:48:16 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Tue, 23 Mar 2010 12:25:45 +0000
> Mel Gorman <mel@xxxxxxxxx> 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.

IIUC.
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.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]