The patch titled mm: compaction: expand comment on unmapped page swap cache has been added to the -mm tree. Its filename is mm-migration-allow-the-migration-of-pageswapcache-pages-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mm: compaction: expand comment on unmapped page swap cache From: Mel Gorman <mel@xxxxxxxxx> The comment on the handling of anon_vma for unmapped pages is a bit sparse. Expand it. Signed-off-by: Mel Gorman <mel@xxxxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/migrate.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff -puN mm/migrate.c~mm-migration-allow-the-migration-of-pageswapcache-pages-fix mm/migrate.c --- a/mm/migrate.c~mm-migration-allow-the-migration-of-pageswapcache-pages-fix +++ a/mm/migrate.c @@ -612,9 +612,15 @@ static int unmap_and_move(new_page_t get /* * We cannot be sure that the anon_vma of an unmapped - * swapcache page is safe to use. In this case, the - * swapcache page gets migrated but the pages are not - * remapped + * swapcache page is safe to use because we don't + * know in advance if the VMA that this page belonged + * to still exists. If the VMA and others sharing the + * data have been freed, then the anon_vma could + * already be invalid. + * + * To avoid this possibility, swapcache pages get + * migrated but are not remapped when migration + * completes */ remap_swapcache = 0; } else { _ Patches currently in -mm which might be from mel@xxxxxxxxx are page-allocator-reduce-fragmentation-in-buddy-allocator-by-adding-buddies-that-are-merging-to-the-tail-of-the-free-lists.patch mempolicy-remove-redundant-code.patch mm-default-to-node-zonelist-ordering-when-nodes-have-only-lowmem.patch mm-migration-take-a-reference-to-the-anon_vma-before-migrating.patch mm-migration-do-not-try-to-migrate-unmapped-anonymous-pages.patch mm-share-the-anon_vma-ref-counts-between-ksm-and-page-migration.patch mm-allow-config_migration-to-be-set-without-config_numa-or-memory-hot-remove.patch mm-allow-config_migration-to-be-set-without-config_numa-or-memory-hot-remove-fix.patch mm-export-unusable-free-space-index-via-proc-unusable_index.patch mm-export-fragmentation-index-via-proc-extfrag_index.patch mm-move-definition-for-lru-isolation-modes-to-a-header.patch mm-compaction-memory-compaction-core.patch mm-compaction-memory-compaction-core-fix.patch mm-compaction-add-proc-trigger-for-memory-compaction.patch mm-compaction-add-proc-trigger-for-memory-compaction-fix.patch mm-compaction-add-proc-trigger-for-memory-compaction-fix-fix.patch mm-compaction-add-sys-trigger-for-per-node-memory-compaction.patch mm-compaction-direct-compact-when-a-high-order-allocation-fails.patch mm-compaction-direct-compact-when-a-high-order-allocation-fails-reject-fix.patch mm-compaction-add-a-tunable-that-decides-when-memory-should-be-compacted-and-when-it-should-be-reclaimed.patch mm-compaction-do-not-compact-within-a-preferred-zone-after-a-compaction-failure.patch mm-migration-allow-the-migration-of-pageswapcache-pages.patch mm-migration-allow-the-migration-of-pageswapcache-pages-fix.patch mm-compaction-do-not-display-compaction-related-stats-when-config_compaction.patch mm-compaction-do-not-display-compaction-related-stats-when-config_compaction-reject-fix.patch delay-accounting-re-implement-c-for-getdelaysc-to-report-information-on-a-target-command.patch delay-accounting-re-implement-c-for-getdelaysc-to-report-information-on-a-target-command-checkpatch-fixes.patch add-debugging-aid-for-memory-initialisation-problems.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html