Commit 1da2f32
mm,thp,compaction,cma: allow THP migration for CMA allocations
The code to implement THP migrations already exists, and the code for CMA
to clear out a region of memory already exists.
Only a few small tweaks are needed to allow CMA to move THP memory when
attempting an allocation from alloc_contig_range.
With these changes, migrating THPs from a CMA area works when allocating a
1GB hugepage from CMA memory.
[[email protected]: fix hugetlbfs pages per Mike, cleanup per Vlastimil]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Rik van Riel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>1 parent b06eda0 commit 1da2f32
2 files changed
+20
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
901 | 902 | | |
902 | | - | |
| 903 | + | |
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
| |||
969 | 970 | | |
970 | 971 | | |
971 | 972 | | |
972 | | - | |
| 973 | + | |
973 | 974 | | |
974 | 975 | | |
975 | 976 | | |
| |||
981 | 982 | | |
982 | 983 | | |
983 | 984 | | |
984 | | - | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
985 | 988 | | |
986 | 989 | | |
987 | 990 | | |
988 | | - | |
989 | | - | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
990 | 994 | | |
991 | 995 | | |
992 | 996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8251 | 8251 | | |
8252 | 8252 | | |
8253 | 8253 | | |
| 8254 | + | |
8254 | 8255 | | |
8255 | 8256 | | |
8256 | 8257 | | |
8257 | | - | |
| 8258 | + | |
8258 | 8259 | | |
8259 | 8260 | | |
8260 | 8261 | | |
8261 | | - | |
| 8262 | + | |
| 8263 | + | |
| 8264 | + | |
| 8265 | + | |
8262 | 8266 | | |
| 8267 | + | |
8263 | 8268 | | |
8264 | 8269 | | |
8265 | 8270 | | |
| |||
0 commit comments