]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-compaction-acquire-the-zone-lru_lock-as-late-as-possible-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Sep 2012 00:19:46 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Oct 2012 06:49:31 +0000 (16:49 +1000)
Cc: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c

index 7d96f8b45aa8fe75fe4751be12b85f8d6c384227..832c4183dccce2e48c398f066f6e6cb2c2750f46 100644 (file)
@@ -414,9 +414,10 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
                 * splitting and collapsing (collapsing has already happened
                 * if PageLRU is set) but the lock is not necessarily taken
                 * here and it is wasteful to take it just to check transhuge.
-                * Check transhuge without lock and skip if it's either a
-                * transhuge or hugetlbfs page because calling compound_order()
-                * requires lru_lock to exclude isolation and splitting.
+                * Check TransHuge without lock and skip the whole pageblock if
+                * it's either a transhuge or hugetlbfs page, as calling
+                * compound_order() without preventing THP from splitting the
+                * page underneath us may return surprising results.
                 */
                if (PageTransHuge(page)) {
                        if (!locked)