Skip to content

Latest numa/core release, v17

Ingo Molnar linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest33 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/33mm/generic: Only flush the local TLB in ptep_set_access_flags()mm/pgtable-generic.c+3 -30 replies
2/33x86/mm: Only do a local tlb flush in ptep_set_access_flags()arch/x86/mm/pgtable.c+8 -10 replies
3/33x86/mm: Introduce pte_accessible()arch/x86/include/asm/pgtable.h include/asm-generic/pgtable.h+10 -00 replies
4/33mm: Only flush the TLB when clearing an accessible ptemm/pgtable-generic.c+2 -10 replies
5/33x86/mm: Completely drop the TLB flush from ptep_set_access_flags()arch/x86/mm/pgtable.c+0 -10 replies
6/33mm: Count the number of pages affected in change_protection()include/linux/hugetlb.h include/linux/mm.h mm/hugetlb.c +1 more+61 -180 replies
7/33mm: Optimize the TLB flush of sys_mprotect() and change_protection() usersmm/mprotect.c+3 -10 replies
8/33sched, numa, mm: Add last_cpu to page flagsinclude/linux/mm.h include/linux/mm_types.h include/linux/mmzone.h +3 more+146 -540 replies
9/33sched, mm, numa: Create generic NUMA fault infrastructure, with architectures overridesinclude/asm-generic/pgtable.h include/linux/huge_mm.h include/linux/mempolicy.h +12 more+430 -190 replies
10/33sched: Make find_busiest_queue() a methodkernel/sched/fair.c+12 -80 replies
11/33sched, numa, mm: Describe the NUMA scheduling problem formallyDocumentation/scheduler/numa-problem.txt+230 -00 replies
12/33numa, mm: Support NUMA hinting page faults from gup/gup_fastinclude/linux/mm.h mm/memory.c+18 -00 replies
13/33mm/migrate: Introduce migrate_misplaced_page()include/linux/migrate.h include/linux/migrate_mode.h mm/migrate.c+77 -90 replies
14/33mm/migration: Improve migrate_misplaced_page()include/linux/migrate_mode.h mm/memory.c mm/migrate.c+95 -640 replies
15/33sched, numa, mm, arch: Add variable locality exceptionarch/sh/mm/Kconfig init/Kconfig+8 -00 replies
16/33sched, numa, mm: Add credits for NUMA placementCREDITS kernel/sched/fair.c mm/memory.c+6 -00 replies
17/33sched, mm, x86: Add the ARCH_SUPPORTS_NUMA_BALANCING flaginit/Kconfig+7 -00 replies
18/33sched, numa, mm: Add the scanning page fault machineryinclude/linux/init_task.h include/linux/mempolicy.h include/linux/mm_types.h +6 more+294 -2212 replies
19/33sched: Add adaptive NUMA affinity supportDocumentation/scheduler/numa-problem.txt arch/x86/Kconfig include/linux/sched.h +4 more+900 -1971 reply
20/33sched: Implement constant, per task Working Set Sampling (WSS) rateinclude/linux/mm_types.h include/linux/sched.h kernel/sched/fair.c +1 more+38 -120 replies
21/33sched, numa, mm: Count WS scanning against present PTEs, not virtual memory rangeskernel/sched/fair.c+21 -160 replies
22/33sched: Implement slow start for working set samplinginclude/linux/sched.h kernel/sched/core.c kernel/sched/fair.c +1 more+19 -70 replies
23/33sched, numa, mm: Interleave shared tasksmm/mempolicy.c+42 -140 replies
24/33sched: Implement NUMA scanning backoffkernel/sched/core.c kernel/sched/fair.c+13 -10 replies
25/33sched: Improve convergencekernel/sched/fair.c kernel/sched/features.h+33 -150 replies
26/33sched: Introduce staged average NUMA faultsinclude/linux/sched.h kernel/sched/fair.c+18 -30 replies
27/33sched: Track groups of shared tasksinclude/linux/sched.h kernel/sched/core.c kernel/sched/fair.c+151 -30 replies
28/33sched: Use the best-buddy 'ideal cpu' in balancing decisionskernel/sched/fair.c kernel/sched/features.h+34 -30 replies
29/33sched, mm, mempolicy: Add per task mempolicyinclude/linux/mempolicy.h include/linux/mm_types.h include/linux/sched.h +2 more+53 -520 replies
30/33sched: Average the fault stats longerkernel/sched/fair.c+2 -20 replies
31/33sched: Use the ideal CPU to drive active balancinginclude/linux/sched.h kernel/sched/core.c kernel/sched/fair.c +2 more+257 -150 replies
32/33sched: Add hysteresis to p->numa_sharedkernel/sched/fair.c+14 -10 replies
33/33sched: Track shared task's node groups and interleave their memory allocationskernel/sched/fair.c+4 -00 replies

Reviews trailers per patch

6 of 33 patches have a Reviewed-by or Acked-by.

PatchLinus TorvaldsPeter ZijlstraRik van RielAndrea ArcangeliLee SchermerhornMel GormanDan CarpenterFengguang WuSasha LevinKOSAKI Motohiro
1/33A-b A-b
2/33A-b A-b
3/33Fixed-by
4/33
5/33A-b A-b
6/33
7/33
8/33
9/33Original-Idea-by
10/33
11/33
12/33Originally-by
13/33R-b Based-on-work-by
14/33Based-on-work-by R-b Based-on-work-by Based-on-work-by
15/33Named-by
16/33A-b
17/33
18/33Written-by Also-written-by T-b T-b
19/33
20/33Based-on-idea-by Bug-Found-By
21/33
22/33
23/33Build-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.

Read the v1 thread

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 bops

Which 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 bops

This 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>