Re: [PATCH -mm v2] mm: have order > 0 compaction start off where it left

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

 



On Wed, Jul 04, 2012 at 11:28:19AM +0900, Minchan Kim wrote:
> >>> +                      zone->compact_cached_free_pfn>
> >>> +                      cc->start_free_pfn))
> >>> +            pfn = min(pfn, zone->compact_cached_free_pfn);
> >>
> >>
> >> The pfn can be where migrate_pfn below?
> >> I mean we need this?
> >>
> >> if (pfn<= low_pfn)
> >>     goto out;
> > 
> > That is a good point. I guess there is a small possibility that
> > another compaction thread is below us with cc->free_pfn and
> > cc->migrate_pfn, and we just inherited its cc->free_pfn via
> > zone->compact_cached_free_pfn, bringing us to below our own
> > cc->migrate_pfn.
> > 
> > Given that this was already possible with parallel compaction
> > in the past, I am not sure how important it is. It could result
> > in wasting a little bit of CPU, but your fix for it looks easy
> > enough.
> 
> In the past, it was impossible since we have per-compaction context free_pfn.
>  
> 
> > 
> > Mel, any downside to compaction bailing (well, wrapping around)
> > a little earlier, like Minchan suggested?
> 
> 
> I can't speak for Mel. But IMHO, if we meet such case, we can ignore compact_cached_free_pfn
> , then go with just pfn instead of early bailing.
> 

Wrapping early is not a problem. As Minchan pointed out this applies in
the case where the migrate scanner and free scanner have almost met or
have overlapped. In this case, it might even be better to wrap early
because there is no point isolating free pages that will then have to be
migrated a second time when the free scanner wraps and the migrate
scanner moves in.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  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]