+ mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy.patch added to -mm tree
Subsystems (2)
[email protected]
maintainerSubject: + mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 20 Dec 2013 14:27:02 -0800
The patch titled
Subject: mm: page_alloc: revert NUMA aspect of fair allocation policy
has been added to the -mm tree. Its filename is
mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Johannes Weiner <[email protected]>
Subject: mm: page_alloc: revert NUMA aspect of fair allocation policy
81c0a2bb ("mm: page_alloc: fair zone allocator policy") meant to bring aging fairness among zones in system, but it was overzealous and badly regressed basic workloads on NUMA systems.
Due to the way kswapd and page allocator interacts, we still want to make sure that all zones in any given node are used equally for all allocations to maximize memory utilization and prevent thrashing on the highest zone in the node.
While the same principle applies to NUMA nodes - memory utilization is obviously improved by spreading allocations throughout all nodes - remote references can be costly and so many workloads prefer locality over memory utilization. The original change assumed that zone_reclaim_mode would be a good enough predictor for that, but it turned out to be as indicative as a coin flip.
Revert the NUMA aspect of the fairness until we can find a proper way to make it configurable and agree on a sane default.
---
mm/page_alloc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy +9 -10
@@ -1816,7 +1816,7 @@ static void zlc_clear_zones_full(structstatic bool zone_local (struct zone *local_zone,struct zone *zone) { -return node_distance (local_zone->node, zone->node) ==LOCAL_DISTANCE ; +return local_zone->node == zone->node; }static bool zone_allows_reclaim (struct zone *local_zone,struct zone *zone)
@@ -1913,18 +1913,17 @@ zonelist_scan:* page was allocated in should have no effect on the * time the page has in memory before being reclaimed. * -* When zone_reclaim_mode is enabled, try to stay in -* local zones in the fastpath. If that fails, the -* slowpath is entered, which will do another pass -* starting with the local zones, but ultimately fall -* back to remote zones that do not partake in the -* fairness round-robin cycle of this zonelist. +* Try to stay in local zones in the fastpath. If +* that fails, the slowpath is entered, which will do +* another pass starting with the local zones, but +* ultimately fall back to remote zones that do not +* partake in the fairness round-robin cycle of this +* zonelist. */ if (alloc_flags &ALLOC_WMARK_LOW ) {if (zone_page_state (zone,NR_ALLOC_BATCH ) <=0 )continue ; -if (zone_reclaim_mode && - !zone_local (preferred_zone, zone)) +if (!zone_local (preferred_zone, zone))continue ; }/*
@@ -2390,7 +2389,7 @@ static void prepare_slowpath(gfp_t gfp_m* thrash fairness information for zones that are not * actually part of this zonelist's round-robin cycle. */ -if (zone_reclaim_mode && !zone_local (preferred_zone, zone)) +if (!zone_local (preferred_zone, zone))continue ; mod_zone_page_state(zone, NR_ALLOC_BATCH, high_wmark_pages(zone) -
_
Patches currently in -mm which might be from [email protected] are
origin.patch
memcg-fix-memcg_size-calculation.patch revert-mm-page_alloc-exclude-unreclaimable-allocations-from-zone-fairness-policy.patch mm-page_alloc-revert-numa-aspect-of-fair-allocation-policy.patch mm-page_allocc-revert-numa-aspect-of-fair-allocation-policy.patch mm-memcg-avoid-oom-notification-when-current-needs-access-to-memory-reserves.patch proc-meminfo-provide-estimated-available-memory.patch mm-mempolicy-remove-unneeded-functions-for-uma-configs.patch mm-memblock-debug-correct-displaying-of-upper-memory-boundary.patch x86-get-pg_data_ts-memory-from-other-node.patch memblock-numa-introduce-flags-field-into-memblock.patch memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch memblock-make-memblock_set_node-support-different-memblock_type.patch acpi-numa-mem_hotplug-mark-hotpluggable-memory-in-memblock.patch acpi-numa-mem_hotplug-mark-all-nodes-the-kernel-resides-un-hotpluggable.patch memblock-mem_hotplug-make-memblock-skip-hotpluggable-regions-if-needed.patch x86-numa-acpi-memory-hotplug-make-movable_node-have-higher-priority.patch memcg-fix-kmem_account_flags-check-in-memcg_can_account_kmem.patch memcg-make-memcg_update_cache_sizes-static.patch x86-memblock-set-current-limit-to-max-low-memory-address.patch mm-memblock-debug-dont-free-reserved-array-if-arch_discard_memblock.patch mm-bootmem-remove-duplicated-declaration-of-__free_pages_bootmem.patch mm-memblock-remove-unnecessary-inclusions-of-bootmemh.patch mm-memblock-drop-warn-and-use-smp_cache_bytes-as-a-default-alignment.patch mm-memblock-reorder-parameters-of-memblock_find_in_range_node.patch mm-memblock-switch-to-use-numa_no_node-instead-of-max_numnodes.patch mm-memblock-add-memblock-memory-allocation-apis.patch mm-memblock-add-memblock-memory-allocation-apis-fix.patch mm-init-use-memblock-apis-for-early-memory-allocations.patch mm-printk-use-memblock-apis-for-early-memory-allocations.patch mm-page_alloc-use-memblock-apis-for-early-memory-allocations.patch mm-power-use-memblock-apis-for-early-memory-allocations.patch lib-swiotlbc-use-memblock-apis-for-early-memory-allocations.patch lib-cpumaskc-use-memblock-apis-for-early-memory-allocations.patch mm-sparse-use-memblock-apis-for-early-memory-allocations.patch mm-hugetlb-use-memblock-apis-for-early-memory-allocations.patch mm-page_cgroup-use-memblock-apis-for-early-memory-allocations.patch mm-percpu-use-memblock-apis-for-early-memory-allocations.patch mm-memory_hotplug-use-memblock-apis-for-early-memory-allocations.patch drivers-firmware-memmapc-use-memblock-apis-for-early-memory-allocations.patch arch-arm-kernel-use-memblock-apis-for-early-memory-allocations.patch arch-arm-mm-initc-use-memblock-apis-for-early-memory-allocations.patch arch-arm-mach-omap2-omap_hwmodc-use-memblock-apis-for-early-memory-allocations.patch memcg-oom-lock-mem_cgroup_print_oom_info.patch memcg-do-not-use-vmalloc-for-mem_cgroup-allocations.patch mm-remove-bug_on-from-mlock_vma_page.patch swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix.patch linux-next.patch
debugging-keep-track-of-page-owners.patch