All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] mm-compaction-do-not-recheck-suitable_migration_target-under-lock.patch removed from -mm tree
@ 2014-10-13 18:19 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-10-13 18:19 UTC (permalink / raw)
  To: vbabka, cl, iamjoonsoo.kim, mgorman, mina86, minchan,
	n-horiguchi, riel, rientjes, zhangyanfei, mm-commits


The patch titled
     Subject: mm, compaction: do not recheck suitable_migration_target under lock
has been removed from the -mm tree.  Its filename was
     mm-compaction-do-not-recheck-suitable_migration_target-under-lock.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Vlastimil Babka <vbabka@suse.cz>
Subject: mm, compaction: do not recheck suitable_migration_target under lock

isolate_freepages_block() rechecks if the pageblock is suitable to be a
target for migration after it has taken the zone->lock.  However, the
check has been optimized to occur only once per pageblock, and
compact_checklock_irqsave() might be dropping and reacquiring lock, which
means somebody else might have changed the pageblock's migratetype
meanwhile.

Furthermore, nothing prevents the migratetype to change right after
isolate_freepages_block() has finished isolating.  Given how imperfect
this is, it's simpler to just rely on the check done in
isolate_freepages() without lock, and not pretend that the recheck under
lock guarantees anything.  It is just a heuristic after all.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/compaction.c |   13 -------------
 1 file changed, 13 deletions(-)

diff -puN mm/compaction.c~mm-compaction-do-not-recheck-suitable_migration_target-under-lock mm/compaction.c
--- a/mm/compaction.c~mm-compaction-do-not-recheck-suitable_migration_target-under-lock
+++ a/mm/compaction.c
@@ -276,7 +276,6 @@ static unsigned long isolate_freepages_b
 	struct page *cursor, *valid_page = NULL;
 	unsigned long flags;
 	bool locked = false;
-	bool checked_pageblock = false;
 
 	cursor = pfn_to_page(blockpfn);
 
@@ -307,18 +306,6 @@ static unsigned long isolate_freepages_b
 		if (!locked)
 			break;
 
-		/* Recheck this is a suitable migration target under lock */
-		if (!strict && !checked_pageblock) {
-			/*
-			 * We need to check suitability of pageblock only once
-			 * and this isolate_freepages_block() is called with
-			 * pageblock range, so just check once is sufficient.
-			 */
-			checked_pageblock = true;
-			if (!suitable_migration_target(page))
-				break;
-		}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-13 18:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 18:19 [merged] mm-compaction-do-not-recheck-suitable_migration_target-under-lock.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.