Latest numa/core release, v17
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest33 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/33 | mm/generic: Only flush the local TLB in ptep_set_access_flags()mm/ | +3 | 0 replies | |
| 2/33 | x86/mm: Only do a local tlb flush in ptep_set_access_flags()arch/ | +8 | 0 replies | |
| 3/33 | x86/mm: Introduce pte_accessible()arch/ include/ | +10 | 0 replies | |
| 4/33 | mm: Only flush the TLB when clearing an accessible ptemm/ | +2 | 0 replies | |
| 5/33 | x86/mm: Completely drop the TLB flush from ptep_set_access_flags()arch/ | +0 | 0 replies | |
| 6/33 | mm: Count the number of pages affected in change_protection()include/ include/ mm/ +1 more | +61 | 0 replies | |
| 7/33 | mm: Optimize the TLB flush of sys_mprotect() and change_protection() usersmm/ | +3 | 0 replies | |
| 8/33 | sched, numa, mm: Add last_cpu to page flagsinclude/ include/ include/ +3 more | +146 | 0 replies | |
| 9/33 | sched, mm, numa: Create generic NUMA fault infrastructure, with architectures overridesinclude/ include/ include/ +12 more | +430 | 0 replies | |
| 10/33 | sched: Make find_busiest_queue() a methodkernel/ | +12 | 0 replies | |
| 11/33 | sched, numa, mm: Describe the NUMA scheduling problem formallyDocumentation/ | +230 | 0 replies | |
| 12/33 | numa, mm: Support NUMA hinting page faults from gup/gup_fastinclude/ mm/ | +18 | 0 replies | |
| 13/33 | mm/migrate: Introduce migrate_misplaced_page()include/ include/ mm/ | +77 | 0 replies | |
| 14/33 | mm/migration: Improve migrate_misplaced_page()include/ mm/ mm/ | +95 | 0 replies | |
| 15/33 | sched, numa, mm, arch: Add variable locality exceptionarch/ init/ | +8 | 0 replies | |
| 16/33 | sched, numa, mm: Add credits for NUMA placementCREDITS kernel/ mm/ | +6 | 0 replies | |
| 17/33 | sched, mm, x86: Add the ARCH_SUPPORTS_NUMA_BALANCING flaginit/ | +7 | 0 replies | |
| 18/33 | sched, numa, mm: Add the scanning page fault machineryinclude/ include/ include/ +6 more | +294 | 12 replies | |
| 19/33 | sched: Add adaptive NUMA affinity supportDocumentation/ arch/ include/ +4 more | +900 | 1 reply | |
| 20/33 | sched: Implement constant, per task Working Set Sampling (WSS) rateinclude/ include/ kernel/ +1 more | +38 | 0 replies | |
| 21/33 | sched, numa, mm: Count WS scanning against present PTEs, not virtual memory rangeskernel/ | +21 | 0 replies | |
| 22/33 | sched: Implement slow start for working set samplinginclude/ kernel/ kernel/ +1 more | +19 | 0 replies | |
| 23/33 | sched, numa, mm: Interleave shared tasksmm/ | +42 | 0 replies | |
| 24/33 | sched: Implement NUMA scanning backoffkernel/ kernel/ | +13 | 0 replies | |
| 25/33 | sched: Improve convergencekernel/ kernel/ | +33 | 0 replies | |
| 26/33 | sched: Introduce staged average NUMA faultsinclude/ kernel/ | +18 | 0 replies | |
| 27/33 | sched: Track groups of shared tasksinclude/ kernel/ kernel/ | +151 | 0 replies | |
| 28/33 | sched: Use the best-buddy 'ideal cpu' in balancing decisionskernel/ kernel/ | +34 | 0 replies | |
| 29/33 | sched, mm, mempolicy: Add per task mempolicyinclude/ include/ include/ +2 more | +53 | 0 replies | |
| 30/33 | sched: Average the fault stats longerkernel/ | +2 | 0 replies | |
| 31/33 | sched: Use the ideal CPU to drive active balancinginclude/ kernel/ kernel/ +2 more | +257 | 0 replies | |
| 32/33 | sched: Add hysteresis to p->numa_sharedkernel/ | +14 | 0 replies | |
| 33/33 | sched: Track shared task's node groups and interleave their memory allocationskernel/ | +4 | 0 replies |
Reviews trailers per patch
6 of 33 patches have a Reviewed-by or Acked-by.
| Patch | Linus Torvalds | Peter Zijlstra | Rik van Riel | Andrea Arcangeli | Lee Schermerhorn | Mel Gorman | Dan Carpenter | Fengguang Wu | Sasha Levin | KOSAKI Motohiro |
|---|---|---|---|---|---|---|---|---|---|---|
| 1/33 | A-b | A-b | ||||||||
| 2/33 | A-b | A-b | ||||||||
| 3/33 | Fixed-by | |||||||||
| 4/33 | ||||||||||
| 5/33 | A-b | A-b | ||||||||
| 6/33 | ||||||||||
| 7/33 | ||||||||||
| 8/33 | ||||||||||
| 9/33 | Original-Idea-by | |||||||||
| 10/33 | ||||||||||
| 11/33 | ||||||||||
| 12/33 | Originally-by | |||||||||
| 13/33 | R-b | Based-on-work-by | ||||||||
| 14/33 | Based-on-work-by | R-b | Based-on-work-by | Based-on-work-by | ||||||
| 15/33 | Named-by | |||||||||
| 16/33 | A-b | |||||||||
| 17/33 | ||||||||||
| 18/33 | Written-by | Also-written-by | T-b | T-b | ||||||
| 19/33 | ||||||||||
| 20/33 | Based-on-idea-by | Bug-Found-By | ||||||||
| 21/33 | ||||||||||
| 22/33 | ||||||||||
| 23/33 | Build-Bug-Reported-by | |||||||||
| 24/33 | ||||||||||
| 25/33 | ||||||||||
| 26/33 | ||||||||||
| 27/33 | ||||||||||
| 28/33 | ||||||||||
| 29/33 | ||||||||||
| 30/33 | ||||||||||
| 31/33 | ||||||||||
| 32/33 | ||||||||||
| 33/33 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.
Cover letter [PATCH 00/33] Latest numa/core release, v17
This release mainly addresses one of the regressions Linus (rightfully) complained about: the "4x JVM" SPECjbb run.
[ Note to testers: if possible please still run with
CONFIG_TRANSPARENT_HUGEPAGES=y enabled, to avoid the !THP regression that is still not fully fixed. It will be fixed next. ]
The new 4x JVM results on a 4-node, 32-CPU, 64 GB RAM system, (240 seconds run, 8 warehouses per 4 JVM instances):
spec1.txt: throughput = 177460.44 SPECjbb2005 bops
spec2.txt: throughput = 176175.08 SPECjbb2005 bops
spec3.txt: throughput = 175053.91 SPECjbb2005 bops
spec4.txt: throughput = 171383.52 SPECjbb2005 bopsWhich is close to (but not yet completely matching) the hard binding performance figures.
Mainline has the following 4x JVM performance:
spec1.txt: throughput = 157839.25 SPECjbb2005 bops
spec2.txt: throughput = 156969.15 SPECjbb2005 bops
spec3.txt: throughput = 157571.59 SPECjbb2005 bops
spec4.txt: throughput = 157873.86 SPECjbb2005 bopsThis result is achieved through the following patches:
sched: Introduce staged average NUMA faults
sched: Track groups of shared tasks
sched: Use the best-buddy 'ideal cpu' in balancing decisions sched, mm, mempolicy: Add per task mempolicy
sched: Average the fault stats longer
sched: Use the ideal CPU to drive active balancing
sched: Add hysteresis to p->numa_shared
sched: Track shared task's node groups and interleave their memory allocations
These patches make increasing use of the shared/private access pattern distinction between tasks.
Automatic, task group accurate interleaving of memory is the most important new placement optimization feature in -v17.
It works by first implementing a task CPU placement feature:
Using our shared/private distinction to allow the separate handling of 'private' versus 'shared' workloads, we enable the active-balancing of them:
- private tasks, via the sched_update_ideal_cpu_private() function, try to 'spread' the system as evenly as possible.
- shared-access tasks that also share their mm (threads), via the sched_update_ideal_cpu_shared() function, try to 'compress' with other shared tasks on as few nodes as possible.
As tasks are tracked as distinct groups of 'shared access pattern' tasks, they are compressed towards as few nodes as possible. While the scheduler performs this compression, a mempolicy node mask can be constructed almost for free - and in turn be used for the memory allocations of the tasks.
There are two notable special cases of the interleaving:
- if a group of shared tasks fits on a single node. In this case the interleaving happens on a single bit, a single node and thus turns into nice node-local allocations.
- if a large group spans the whole system: in this case the node masks will cover the whole system, and all memory gets evenly interleaved and available RAM bandwidth gets utilized. This is preferable to allocating memory assymetrically and overloading certain CPU links and running into their bandwidth limitations.
"Private" and non-NUMA tasks on the other hand are not affected and continue to do efficient node-local allocations.
With this approach we avoid most of the 'threading means shared access patterns' heuristics that AutoNUMA uses, by automatically separating out threads that have a private working set and not binding them to the other threads forcibly.
The thread group heuristics are not completely eliminated though, as can be seen in the "sched: Use the ideal CPU to drive active balancing" patch. It's not hard-coded into the design in any case and could be extended to other task group information: the automatic NUMA balancing of cgroups for example.
Thanks,
Ingo
-------------------->
Andrea Arcangeli (1):
numa, mm: Support NUMA hinting page faults from gup/gup_fast
Ingo Molnar (14):
mm: Optimize the TLB flush of sys_mprotect() and change_protection()
users
sched, mm, numa: Create generic NUMA fault infrastructure, with
architectures overrides
sched, mm, x86: Add the ARCH_SUPPORTS_NUMA_BALANCING flag sched, numa, mm: Interleave shared tasks
sched: Implement NUMA scanning backoff
sched: Improve convergence
sched: Introduce staged average NUMA faults
sched: Track groups of shared tasks
sched: Use the best-buddy 'ideal cpu' in balancing decisions sched, mm, mempolicy: Add per task mempolicy
sched: Average the fault stats longer
sched: Use the ideal CPU to drive active balancing
sched: Add hysteresis to p->numa_shared
sched: Track shared task's node groups and interleave their memory
allocations
Mel Gorman (1):
mm/migration: Improve migrate_misplaced_page()
Peter Zijlstra (11):
mm: Count the number of pages affected in change_protection() sched, numa, mm: Add last_cpu to page flags
sched: Make find_busiest_queue() a method
sched, numa, mm: Describe the NUMA scheduling problem formally mm/migrate: Introduce migrate_misplaced_page()
sched, numa, mm, arch: Add variable locality exception sched, numa, mm: Add the scanning page fault machinery
sched: Add adaptive NUMA affinity support
sched: Implement constant, per task Working Set Sampling (WSS) rate sched, numa, mm: Count WS scanning against present PTEs, not virtual
memory ranges
sched: Implement slow start for working set sampling
Rik van Riel (6):
mm/generic: Only flush the local TLB in ptep_set_access_flags() x86/mm: Only do a local tlb flush in ptep_set_access_flags() x86/mm: Introduce pte_accessible()
mm: Only flush the TLB when clearing an accessible pte x86/mm: Completely drop the TLB flush from ptep_set_access_flags() sched, numa, mm: Add credits for NUMA placement
CREDITS | 1 + Documentation/scheduler/numa-problem.txt | 236 +++++ arch/sh/mm/Kconfig | 1 + arch/x86/Kconfig | 2 + arch/x86/include/asm/pgtable.h | 6 + arch/x86/mm/pgtable.c | 8 +- include/asm-generic/pgtable.h | 59 ++ include/linux/huge_mm.h | 12 + include/linux/hugetlb.h | 8 +- include/linux/init_task.h | 8 + include/linux/mempolicy.h | 47 +- include/linux/migrate.h | 7 + include/linux/mm.h | 99 +- include/linux/mm_types.h | 50 + include/linux/mmzone.h | 14 +- include/linux/page-flags-layout.h | 83 ++ include/linux/sched.h | 54 +- init/Kconfig | 81 ++ kernel/bounds.c | 4 + kernel/sched/core.c | 105 ++- kernel/sched/fair.c | 1464 ++++++++++++++++++++++++++---- kernel/sched/features.h | 13 + kernel/sched/sched.h | 39 +- kernel/sysctl.c | 45 +- mm/Makefile | 1 + mm/huge_memory.c | 163 ++++ mm/hugetlb.c | 10 +- mm/internal.h | 5 +- mm/memcontrol.c | 7 +- mm/memory.c | 105 ++- mm/mempolicy.c | 175 +++- mm/migrate.c | 106 ++- mm/mprotect.c | 69 +- mm/numa.c | 73 ++ mm/pgtable-generic.c | 9 +- 35 files changed, 2818 insertions(+), 351 deletions(-) create mode 100644 Documentation/scheduler/numa-problem.txt create mode 100644 include/linux/page-flags-layout.h create mode 100644 mm/numa.c
Signature · 7 lines
1.7.11.7 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>