lkml.org 
[lkml]   [2012]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] mm: have order > 0 compaction start near a pageblock with free pages
On Wed, Aug 08, 2012 at 01:36:00PM +0900, Minchan Kim wrote:
> >
> > Second, it updates compact_cached_free_pfn in a more limited set of
> > circumstances.
> >
> > If a scanner has wrapped, it updates compact_cached_free_pfn to the end
> > of the zone. Each time a wrapped scanner isoaltes a page, it
> > updates compact_cached_free_pfn. The intention is that after
> > wrapping, the compact_cached_free_pfn will be at the highest
> > pageblock with free pages when compaction completes.
>
> Okay.
>
> >
> > If a scanner has not wrapped when compaction completes and
>
> Compaction complete?
> Your code seem to do it in isolate_freepages.
> Isn't it compaction complete?
>

s/compaction/free page isolation/

> > compact_cached_free_pfn is set the end of the the zone, initialise
> > it once.
>

> I can't understad this part.
> Could you elaborate a bit more?
>

Is this better?

If a scanner has wrapped, it updates compact_cached_free_pfn to the end
of the zone. When a wrapped scanner isolates a page, it updates
compact_cached_free_pfn to point to the highest pageblock it
can isolate pages from.

If a scanner has not wrapped when it has finished isolated pages it
checks if compact_cached_free_pfn is pointing to the end of the
zone. If so, the value is updated to point to the highest
pageblock that pages were isolated from. This value will not
be updated again until a free page scanner wraps and resets
compact_cached_free_pfn.

This is not optimal and it can still race but the compact_cached_free_pfn
will be pointing to or very near a pageblock with free pages.

--
Mel Gorman
SUSE Labs


\
 
 \ /
  Last update: 2012-08-08 12:43    [W:1.455 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site