]> Git Repo - linux.git/commit
mm: numa: cleanup flow of transhuge page migration
authorHugh Dickins <[email protected]>
Sat, 23 Feb 2013 00:34:33 +0000 (16:34 -0800)
committerLinus Torvalds <[email protected]>
Sun, 24 Feb 2013 01:50:17 +0000 (17:50 -0800)
commit340ef3902cf20cec43cdcd1e72ae5cb518be7328
tree98051b821bc3749510dc7e27f14051902aa54743
parent75980e97daccfc6babbac7e180ff118537955f5d
mm: numa: cleanup flow of transhuge page migration

When correcting commit 04fa5d6a6547 ("mm: migrate: check page_count of
THP before migrating") Hugh Dickins noted that the control flow for
transhuge migration was difficult to follow.  Unconditionally calling
put_page() in numamigrate_isolate_page() made the failure paths of both
migrate_misplaced_transhuge_page() and migrate_misplaced_page() more
complex that they should be.  Further, he was extremely wary that an
unlock_page() should ever happen after a put_page() even if the
put_page() should never be the final put_page.

Hugh implemented the following cleanup to simplify the path by calling
putback_lru_page() inside numamigrate_isolate_page() if it failed to
isolate and always calling unlock_page() within
migrate_misplaced_transhuge_page().

There is no functional change after this patch is applied but the code
is easier to follow and unlock_page() always happens before put_page().

[[email protected]: changelog only]
Signed-off-by: Mel Gorman <[email protected]>
Signed-off-by: Hugh Dickins <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Simon Jeons <[email protected]>
Cc: Wanpeng Li <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/huge_memory.c
mm/migrate.c
This page took 0.059437 seconds and 4 git commands to generate.