The patch titled Subject: mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix has been removed from the -mm tree. Its filename was mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix.patch This patch was dropped because it is obsolete ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix Resurrect this - I need to get an mmotm out the door Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/memory_hotplug.h | 12 +++++++++++- include/linux/mmzone.h | 2 ++ mm/internal.h | 2 +- mm/memory_hotplug.c | 27 +++++++++++++++++++++++++++ mm/page_alloc.c | 27 --------------------------- 5 files changed, 41 insertions(+), 29 deletions(-) diff -puN include/linux/memory_hotplug.h~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix include/linux/memory_hotplug.h --- a/include/linux/memory_hotplug.h~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix +++ a/include/linux/memory_hotplug.h @@ -200,7 +200,10 @@ void mem_hotplug_done(void); extern void set_zone_contiguous(struct zone *zone); extern void clear_zone_contiguous(struct zone *zone); - +static inline bool zone_contiguous(struct zone *zone) +{ + return zone->contiguous; +} #else /* ! CONFIG_MEMORY_HOTPLUG */ /* * Stub functions for when hotplug is off @@ -243,6 +246,13 @@ static inline void put_online_mems(void) static inline void mem_hotplug_begin(void) {} static inline void mem_hotplug_done(void) {} +static inline void set_zone_contiguous(struct zone *zone) {} +static inline void clear_zone_contiguous(struct zone *zone) {} +static inline bool zone_contiguous(struct zone *zone) +{ + return false; +} + #endif /* ! CONFIG_MEMORY_HOTPLUG */ #ifdef CONFIG_MEMORY_HOTREMOVE diff -puN include/linux/mmzone.h~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix include/linux/mmzone.h --- a/include/linux/mmzone.h~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix +++ a/include/linux/mmzone.h @@ -522,7 +522,9 @@ struct zone { bool compact_blockskip_flush; #endif +#ifdef CONFIG_MEMORY_HOTPLUG bool contiguous; +#endif ZONE_PADDING(_pad3_) /* Zone statistics */ diff -puN mm/internal.h~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix mm/internal.h --- a/mm/internal.h~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix +++ a/mm/internal.h @@ -143,7 +143,7 @@ extern struct page *__pageblock_pfn_to_p static inline struct page *pageblock_pfn_to_page(unsigned long start_pfn, unsigned long end_pfn, struct zone *zone) { - if (zone->contiguous) + if (zone_contiguous(zone)) return pfn_to_page(start_pfn); return __pageblock_pfn_to_page(start_pfn, end_pfn, zone); diff -puN mm/memory_hotplug.c~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix mm/memory_hotplug.c --- a/mm/memory_hotplug.c~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix +++ a/mm/memory_hotplug.c @@ -130,6 +130,33 @@ void mem_hotplug_done(void) memhp_lock_release(); } +void set_zone_contiguous(struct zone *zone) +{ + unsigned long block_start_pfn = zone->zone_start_pfn; + unsigned long block_end_pfn; + unsigned long pfn; + + block_end_pfn = ALIGN(block_start_pfn + 1, pageblock_nr_pages); + for (; block_start_pfn < zone_end_pfn(zone); + block_start_pfn = block_end_pfn, + block_end_pfn += pageblock_nr_pages) { + + block_end_pfn = min(block_end_pfn, zone_end_pfn(zone)); + + if (!__pageblock_pfn_to_page(block_start_pfn, + block_end_pfn, zone)) + return; + } + + /* We confirm that there is no hole */ + zone->contiguous = true; +} + +void clear_zone_contiguous(struct zone *zone) +{ + zone->contiguous = false; +} + /* add this memory to iomem resource */ static struct resource *register_memory_resource(u64 start, u64 size) { diff -puN mm/page_alloc.c~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix mm/page_alloc.c --- a/mm/page_alloc.c~mm-compaction-speed-up-pageblock_pfn_to_page-when-zone-is-contiguous-fix +++ a/mm/page_alloc.c @@ -1347,33 +1347,6 @@ struct page *__pageblock_pfn_to_page(uns return start_page; } -void set_zone_contiguous(struct zone *zone) -{ - unsigned long block_start_pfn = zone->zone_start_pfn; - unsigned long block_end_pfn; - unsigned long pfn; - - block_end_pfn = ALIGN(block_start_pfn + 1, pageblock_nr_pages); - for (; block_start_pfn < zone_end_pfn(zone); - block_start_pfn = block_end_pfn, - block_end_pfn += pageblock_nr_pages) { - - block_end_pfn = min(block_end_pfn, zone_end_pfn(zone)); - - if (!__pageblock_pfn_to_page(block_start_pfn, - block_end_pfn, zone)) - return; - } - - /* We confirm that there is no hole */ - zone->contiguous = true; -} - -void clear_zone_contiguous(struct zone *zone) -{ - zone->contiguous = false; -} - #ifdef CONFIG_CMA /* Free whole pageblock and set its migration type to MIGRATE_CMA. */ void __init init_cma_reserved_pageblock(struct page *page) _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are i-need-old-gcc.patch arch-alpha-kernel-systblss-remove-debug-check.patch drivers-gpu-drm-i915-intel_spritec-fix-build.patch drivers-gpu-drm-i915-intel_tvc-fix-build.patch vsprintf-kptr_restrict-is-okay-in-irq-when-2-checkpatch-fixes.patch kernel-locking-lockdepc-convert-hash-tables-to-hlists.patch arm-arch-arm-include-asm-pageh-needs-personalityh.patch ocfs2-code-clean-up-for-direct-io-fix.patch ocfs2-fix-ip_unaligned_aio-deadlock-with-dio-work-queue-fix.patch ocfs2-dlm-move-lock-to-the-tail-of-grant-queue-while-doing-in-place-convert-fix.patch mm.patch mm-slab-clean-up-debug_pagealloc-processing-code-fix.patch mm-slab-put-the-freelist-at-the-end-of-slab-page-fix.patch fs-mpagec-mpage_readpages-use-lru_to_page-helper.patch mm-page_allocc-introduce-kernelcore=mirror-option-fix.patch mm-page_allocc-rework-code-layout-in-memmap_init_zone.patch mm-debug-pageallocc-split-out-page-poisoning-from-debug-page_alloc-checkpatch-fixes.patch mm-page_poisonc-enable-page_poisoning-as-a-separate-option-fix.patch mm-page_poisoningc-allow-for-zero-poisoning-checkpatch-fixes.patch mm-madvise-update-comment-on-sys_madvise-fix.patch mm-migrate-do-not-touch-page-mem_cgroup-of-live-pages-fix.patch mm-simplify-lock_page_memcg-fix.patch sched-add-schedule_timeout_idle.patch mm-oom_reaper-report-success-failure-fix.patch proc-kpageflags-return-kpf_buddy-for-tail-buddy-pages-fix-fix.patch mm-vmalloc-query-dynamic-debug_pagealloc-setting-fix.patch mm-slub-query-dynamic-debug_pagealloc-setting-fix.patch sound-query-dynamic-debug_pagealloc-setting-fix.patch mm-config_nr_zones_extended-fix.patch ksm-introduce-ksm_max_page_sharing-per-page-deduplication-limit-fix-2.patch zram-export-the-number-of-available-comp-streams-fix.patch mm-oom-rework-oom-detection-checkpatch-fixes.patch mm-use-watermak-checks-for-__gfp_repeat-high-order-allocations-checkpatch-fixes.patch btrfs-use-radix_tree_iter_retry-fix.patch sparc-compat-provide-an-accurate-in_compat_syscall-implementation-fix.patch sparc-compat-provide-an-accurate-in_compat_syscall-implementation-fix-fix.patch dma-rename-dma__writecombine-to-dma__wc-checkpatch-fixes.patch kernel-add-kcov-code-coverage-fix.patch kernel-add-kcov-code-coverage-fix-2.patch drivers-net-wireless-intel-iwlwifi-dvm-calibc-fix-min-warning.patch do_shared_fault-check-that-mmap_sem-is-held.patch kernel-forkc-export-kernel_thread-to-modules.patch slab-leaks3-default-y.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