On Mon, 28 Jul 2014, Vlastimil Babka wrote: > The compact_stall vmstat counter counts the number of allocations stalled by > direct compaction. It does not count when all attempted zones had deferred > compaction, but it does count when all zones skipped compaction. The skipping > is decided based on very early check of compaction_suitable(), based on > watermarks and memory fragmentation. Therefore it makes sense not to count > skipped compactions as stalls. Moreover, compact_success or compact_fail is > also already not being counted when compaction was skipped, so this patch > changes the compact_stall counting to match the other two. > > Additionally, restructure __alloc_pages_direct_compact() code for better > readability. > > Signed-off-by: Vlastimil Babka <[email protected]> > Cc: Minchan Kim <[email protected]> > Acked-by: Mel Gorman <[email protected]> > Cc: Joonsoo Kim <[email protected]> > Cc: Michal Nazarewicz <[email protected]> > Cc: Naoya Horiguchi <[email protected]> > Cc: Christoph Lameter <[email protected]> > Cc: Rik van Riel <[email protected]> > Cc: David Rientjes <[email protected]>
Acked-by: David Rientjes <[email protected]> This makes the second patch in the series more understandable but I still renew my suggestion that you should be doing the following as part of the second patch. --- diff --git a/mm/compaction.c b/mm/compaction.c --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1136,7 +1136,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist, int may_perform_io = gfp_mask & __GFP_IO; struct zoneref *z; struct zone *zone; - int rc = COMPACT_DEFERRED; + int rc = COMPACT_SKIPPED; int alloc_flags = 0; /* Check if the GFP flags allow compaction */ @@ -1147,6 +1147,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist, if (allocflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) alloc_flags |= ALLOC_CMA; #endif + rc = COMPACT_DEFERRED; /* Compact each zone in the list */ for_each_zone_zonelist_nodemask(zone, z, zonelist, high_zoneidx, nodemask) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

