The patch titled vmscan: more aggressively use lumpy reclaim has been removed from the -mm tree. Its filename was vmscan-more-aggressively-use-lumpy-reclaim.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: vmscan: more aggressively use lumpy reclaim From: Rik van Riel <riel@xxxxxxxxxx> During an AIM7 run on a 16GB system, fork started failing around 32000 threads, despite the system having plenty of free swap and 15GB of pageable memory. If normal pageout does not result in contiguous free pages for kernel stacks, fall back to lumpy reclaim instead of failing fork or doing excessive pageout IO. I do not know whether this change is needed due to the extreme stress test or because the inactive list is a smaller fraction of system memory on huge systems. Signed-off-by: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff -puN mm/vmscan.c~vmscan-more-aggressively-use-lumpy-reclaim mm/vmscan.c --- a/mm/vmscan.c~vmscan-more-aggressively-use-lumpy-reclaim +++ a/mm/vmscan.c @@ -883,7 +883,8 @@ int isolate_lru_page(struct page *page) * of reclaimed pages */ static unsigned long shrink_inactive_list(unsigned long max_scan, - struct zone *zone, struct scan_control *sc, int file) + struct zone *zone, struct scan_control *sc, + int priority, int file) { LIST_HEAD(page_list); struct pagevec pvec; @@ -901,8 +902,19 @@ static unsigned long shrink_inactive_lis unsigned long nr_freed; unsigned long nr_active; unsigned int count[NR_LRU_LISTS] = { 0, }; - int mode = (sc->order > PAGE_ALLOC_COSTLY_ORDER) ? - ISOLATE_BOTH : ISOLATE_INACTIVE; + int mode = ISOLATE_INACTIVE; + + /* + * If we need a large contiguous chunk of memory, or have + * trouble getting a small set of contiguous pages, we + * will reclaim both active and inactive pages. + * + * We use the same threshold as pageout congestion_wait below. + */ + if (sc->order > PAGE_ALLOC_COSTLY_ORDER) + mode = ISOLATE_BOTH; + else if (sc->order && priority < DEF_PRIORITY - 2) + mode = ISOLATE_BOTH; nr_taken = sc->isolate_pages(sc->swap_cluster_max, &page_list, &nr_scan, sc->order, mode, @@ -1197,7 +1209,7 @@ static unsigned long shrink_list(enum lr shrink_active_list(nr_to_scan, zone, sc, priority, file); return 0; } - return shrink_inactive_list(nr_to_scan, zone, sc, file); + return shrink_inactive_list(nr_to_scan, zone, sc, priority, file); } /* _ Patches currently in -mm which might be from riel@xxxxxxxxxx are ntp-let-update_persistent_clock-sleep.patch access_process_vm-device-memory-infrastructure.patch access_process_vm-device-memory-infrastructure-fix.patch use-generic_access_phys-for-dev-mem-mappings.patch use-generic_access_phys-for-dev-mem-mappings-fix.patch use-generic_access_phys-for-pci-mmap-on-x86.patch powerpc-ioremap_prot.patch spufs-use-the-new-vm_ops-access.patch spufs-use-the-new-vm_ops-access-fix.patch page-flags-record-page-flag-overlays-explicitly.patch page-flags-record-page-flag-overlays-explicitly-xen.patch slub-record-page-flag-overlays-explicitly.patch slob-record-page-flag-overlays-explicitly.patch vmscan-give-referenced-active-and-unmapped-pages-a-second-trip-around-the-lru.patch idr-change-the-idr-structure.patch idr-rename-some-of-the-idr-apis-internal-routines.patch idr-fix-a-printk-call.patch idr-error-checking-factorization.patch idr-make-idr_get_new-rcu-safe.patch idr-make-idr_get_new-rcu-safe-fix.patch idr-make-idr_find-rcu-safe.patch idr-make-idr_remove-rcu-safe.patch ipc-call-idr_find-without-locking-in-ipc_lock.patch ipc-get-rid-of-ipc_lock_down.patch vmscan-more-aggressively-use-lumpy-reclaim.patch vmscan-pageflag-helpers-for-configed-out-flags.patch vmscan-noreclaim-lru-infrastructure.patch vmscan-noreclaim-lru-page-statistics.patch vmscan-ramfs-and-ram-disk-pages-are-non-reclaimable.patch vmscan-shm_locked-pages-are-non-reclaimable.patch vmscan-mlocked-pages-are-non-reclaimable.patch vmscan-downgrade-mmap-sem-while-populating-mlocked-regions.patch vmscan-handle-mlocked-pages-during-map-remap-unmap.patch vmscan-mlocked-pages-statistics.patch vmscan-cull-non-reclaimable-pages-in-fault-path.patch vmscan-noreclaim-and-mlocked-pages-vm-events.patch mm-only-vmscan-noreclaim-lru-scan-sysctl.patch mm-only-vmscan-noreclaim-lru-scan-sysctl-fix.patch vmscan-mlocked-pages-count-attempts-to-free-mlocked-page.patch vmscan-noreclaim-lru-and-mlocked-pages-documentation.patch make-mm-rmapc-anon_vma_cachep-static.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