Re: [PATCH] mm: compaction: fix the page state calculation in too_many_isolated

From: David Rientjes
Date: Wed Jan 21 2015 - 19:58:33 EST


On Wed, 21 Jan 2015, Vlastimil Babka wrote:

> On 01/21/2015 10:34 AM, Vinayak Menon wrote:
> > Commit "3611badc1baa" (mm: vmscan: fix the page state calculation in
>
> That appears to be a -next commit ID, which won't be the same in Linus' tree, so
> it shouldn't be in commit message, AFAIK.
>
> > too_many_isolated) fixed an issue where a number of tasks were
> > blocked in reclaim path for seconds, because of vmstat_diff not being
> > synced in time. A similar problem can happen in isolate_migratepages_block,
> > similar calculation is performed. This patch fixes that.
>
> I guess it's not possible to fix the stats instantly and once in the safe
> versions, so that future readings will be correct without safe, right?
> So until it gets fixed, each reading will have to be safe and thus expensive?
>

Yeah, this patch will actually hurt performance for the migration scanner
but not as much as stalling unnecessarily when the snapshot is the same.

> I think in case of async compaction, we could skip the safe stuff and just
> terminate it - it's already done when too_many_isolated returns true, and
> there's no congestion waiting in that case.
>
> So you could extend the too_many_isolated() with "safe" parameter (as you did
> for vmscan) and pass it "cc->mode != MIGRATE_ASYNC" value from
> isolate_migrate_block().
>

Or just pass it struct compact_control *cc and use both cc->zone and
cc->mode inside this compaction-only function.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/