diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:17 -0400 |
commit | 1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (patch) | |
tree | c03e7a25ef13eea62f1547914a76e5c68f3f4c28 /mm/compaction.c | |
parent | 80dcc31fbe55932ac9204daee5f2ebc0c49b6da3 (diff) | |
parent | e4b0db72be2487bae0e3251c22f82c104f7c1cfd (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge first patchbomb from Andrew Morton:
- arch/sh updates
- ocfs2 updates
- kernel/watchdog feature
- about half of mm/
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (122 commits)
Documentation: update arch list in the 'memtest' entry
Kconfig: memtest: update number of test patterns up to 17
arm: add support for memtest
arm64: add support for memtest
memtest: use phys_addr_t for physical addresses
mm: move memtest under mm
mm, hugetlb: abort __get_user_pages if current has been oom killed
mm, mempool: do not allow atomic resizing
memcg: print cgroup information when system panics due to panic_on_oom
mm: numa: remove migrate_ratelimited
mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE
mm: split ET_DYN ASLR from mmap ASLR
s390: redefine randomize_et_dyn for ELF_ET_DYN_BASE
mm: expose arch_mmap_rnd when available
s390: standardize mmap_rnd() usage
powerpc: standardize mmap_rnd() usage
mips: extract logic for mmap_rnd()
arm64: standardize mmap_rnd() usage
x86: standardize mmap_rnd() usage
arm: factor out mmap ASLR into mmap_rnd
...
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index 8c0d9459b54a..a18201a8124e 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -1174,13 +1174,24 @@ static int __compact_finished(struct zone *zone, struct compact_control *cc, | |||
1174 | /* Direct compactor: Is a suitable page free? */ | 1174 | /* Direct compactor: Is a suitable page free? */ |
1175 | for (order = cc->order; order < MAX_ORDER; order++) { | 1175 | for (order = cc->order; order < MAX_ORDER; order++) { |
1176 | struct free_area *area = &zone->free_area[order]; | 1176 | struct free_area *area = &zone->free_area[order]; |
1177 | bool can_steal; | ||
1177 | 1178 | ||
1178 | /* Job done if page is free of the right migratetype */ | 1179 | /* Job done if page is free of the right migratetype */ |
1179 | if (!list_empty(&area->free_list[migratetype])) | 1180 | if (!list_empty(&area->free_list[migratetype])) |
1180 | return COMPACT_PARTIAL; | 1181 | return COMPACT_PARTIAL; |
1181 | 1182 | ||
1182 | /* Job done if allocation would set block type */ | 1183 | #ifdef CONFIG_CMA |
1183 | if (order >= pageblock_order && area->nr_free) | 1184 | /* MIGRATE_MOVABLE can fallback on MIGRATE_CMA */ |
1185 | if (migratetype == MIGRATE_MOVABLE && | ||
1186 | !list_empty(&area->free_list[MIGRATE_CMA])) | ||
1187 | return COMPACT_PARTIAL; | ||
1188 | #endif | ||
1189 | /* | ||
1190 | * Job done if allocation would steal freepages from | ||
1191 | * other migratetype buddy lists. | ||
1192 | */ | ||
1193 | if (find_suitable_fallback(area, order, migratetype, | ||
1194 | true, &can_steal) != -1) | ||
1184 | return COMPACT_PARTIAL; | 1195 | return COMPACT_PARTIAL; |
1185 | } | 1196 | } |
1186 | 1197 | ||