[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100325095732.107fe878.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 25 Mar 2010 09:57:32 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mel Gorman <mel@....ul.ie>, Andrea Arcangeli <aarcange@...hat.com>,
Christoph Lameter <cl@...ux-foundation.org>,
Adam Litke <agl@...ibm.com>, Avi Kivity <avi@...hat.com>,
David Rientjes <rientjes@...gle.com>,
Minchan Kim <minchan.kim@...il.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH 10/11] Direct compact when a high-order allocation fails
On Wed, 24 Mar 2010 13:48:16 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Tue, 23 Mar 2010 12:25:45 +0000
> Mel Gorman <mel@....ul.ie> 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists