Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm/migrate: rename migration reason MR_CMA to MR_CONTIG_RANGE

alloc_contig_range() initiates compaction and eventual migration for the
purpose of either CMA or HugeTLB allocations. At present, the reason
code remains the same MR_CMA for either of these cases. Let's make it
MR_CONTIG_RANGE which will appropriately reflect the reason code in both
these cases.

Link: http://lkml.kernel.org/r/20180202091518.18798-1-khandual@linux.vnet.ibm.com
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Anshuman Khandual and committed by
Linus Torvalds
31025351 57a7702b

+4 -4
+1 -1
arch/powerpc/mm/mmu_context_iommu.c
··· 112 112 put_page(page); /* Drop the gup reference */ 113 113 114 114 ret = migrate_pages(&cma_migrate_pages, new_iommu_non_cma_page, 115 - NULL, 0, MIGRATE_SYNC, MR_CMA); 115 + NULL, 0, MIGRATE_SYNC, MR_CONTIG_RANGE); 116 116 if (ret) { 117 117 if (!list_empty(&cma_migrate_pages)) 118 118 putback_movable_pages(&cma_migrate_pages);
+1 -1
include/linux/migrate.h
··· 25 25 MR_SYSCALL, /* also applies to cpusets */ 26 26 MR_MEMPOLICY_MBIND, 27 27 MR_NUMA_MISPLACED, 28 - MR_CMA, 28 + MR_CONTIG_RANGE, 29 29 MR_TYPES 30 30 }; 31 31
+1 -1
include/trace/events/migrate.h
··· 20 20 EM( MR_SYSCALL, "syscall_or_cpuset") \ 21 21 EM( MR_MEMPOLICY_MBIND, "mempolicy_mbind") \ 22 22 EM( MR_NUMA_MISPLACED, "numa_misplaced") \ 23 - EMe(MR_CMA, "cma") 23 + EMe(MR_CONTIG_RANGE, "contig_range") 24 24 25 25 /* 26 26 * First define the enums in the above macros to be exported to userspace
+1 -1
mm/page_alloc.c
··· 7591 7591 cc->nr_migratepages -= nr_reclaimed; 7592 7592 7593 7593 ret = migrate_pages(&cc->migratepages, alloc_migrate_target, 7594 - NULL, 0, cc->mode, MR_CMA); 7594 + NULL, 0, cc->mode, MR_CONTIG_RANGE); 7595 7595 } 7596 7596 if (ret < 0) { 7597 7597 putback_movable_pages(&cc->migratepages);