linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/52] RFC: Unified NUMA balancing tree, v1
@ 2012-12-02 18:42 Ingo Molnar
  2012-12-02 18:42 ` [PATCH 01/52] mm/compaction: Move migration fail/success stats to migrate.c Ingo Molnar
                   ` (53 more replies)
  0 siblings, 54 replies; 63+ messages in thread
From: Ingo Molnar @ 2012-12-02 18:42 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: Peter Zijlstra, Paul Turner, Lee Schermerhorn, Christoph Lameter,
	Rik van Riel, Mel Gorman, Andrew Morton, Andrea Arcangeli,
	Linus Torvalds, Thomas Gleixner, Johannes Weiner, Hugh Dickins

Now that the code in numa/core is settling down nicely, I thought I'd
address a growing testing/contribution problem that has become a problem
over the last two weeks: the 'balacenuma' tree by Mel Gorman was drifting
away from numa/core (or, numa/core was drifting away from Mel's tree,
depending on your perspective), and there was a lot of partly duplicated,
partly obsolete and partly objected to content making any upstream merge
both contentious and technically more difficult to judge.

This growing split between the NUMA projects makes little technical sense
IMO, so here's an attempt at a unified tree that hopefully has an
increased chance of being upstreamed.

Most of the outstanding objections against numa/core centered around
Mel and Rik objecting to the PROT_NONE approach Peter implemented in
numa/core. To settle that question objectively I've performed performance
testing of those differences, by picking up the minimum number of
essentials needed to be able to remove the PROT_NONE approach and use
the PTE_NUMA approach Mel took from the AutoNUMA tree and elsewhere.

The result for today's numa/core tree is that there's no measurable
performance difference between the PROT_NONE and PTE_NUMA approaches
 - except the 'migration rate limit' patches that are present in the
'balancenuma' tree.

Those migration rate-limits IMO hide scalability problems, and they
also slow down workloads where migration is beneficial:

  numa/core-v18 + Mel's PTE_NUMA bits, with migration ratelimit:
  ======================

   numa01:        196.692 secs elapsed (max) thread time [ spread: -11.3% ]
   numa01-TA:     110.299 secs elapsed (max) thread time [ spread: -1.0% ]
   numa02:         15.471 secs elapsed (max) thread time [ spread: -2.0% ]

  numa/core-v18 + Mel's PTE_NUMA bits, without migration ratelimit:
  ======================

   numa01:        188.093 secs elapsed (max) thread time [ spread: -9.2% ]
   numa01-TA:     107.385 secs elapsed (max) thread time [ spread: -0.8% ]
   numa02:         15.480 secs elapsed (max) thread time [ spread: -1.6% ]

The migration rate limits decreased performance and increased the
execution runtime 'spread' between threads.

So based on these numbers I left out the migration rate-limiting bits for
the time being - with the goal to be minimal and all that.

So in the end I picked up (a ported) version of these ~12 AutoNUMA/Mel
patches:

 Andrea Arcangeli (4):
   mm/numa: define _PAGE_NUMA
   mm/numa: Add pte_numa() and pmd_numa()
   mm/numa: Support NUMA hinting page faults from gup/gup_fast
   mm/numa: split_huge_page: transfer the NUMA type from the pmd to the pte

 Mel Gorman (8):
   mm/compaction: Move migration fail/success stats to migrate.c
   mm/compaction: Add scanned and isolated counters for compaction
   mm/migrate: Add a tracepoint for migrate_pages
   mm/numa: Create basic numa page hinting infrastructure
   mm/mempolicy: Use _PAGE_NUMA to migrate pages
   mm/mempolicy: Hide MPOL_NOOP and MPOL_MF_LAZY from userspace for now
   mm/numa: Add pte updates, hinting and migration stats
   mm/numa: Migrate on reference policy

and created a unified tree - which consists of 52 patches in total.

I have done some more testing today, and the original numa/core-v18
tree seems identical in performance to v18-unified, within noise.

So, because it does not look like that the objecting MM folks will
lift their objections to Peter's PROT_NONE code, I hope there will
be no objections to this compromise tree that offers a unified,
minimalistic base - and we can move the NUMA project forward with
less divergence.

The unified tree too is bisectable at every point and builds up the
NUMA feature from scratch, with the latest policy changes left
at the end as incremental patches.

So this tree is roughly the minimum set of mm/ patches we need to be
able to implement the policy code in numa/core. These patches from
Andrea Arcangeli (4), Lee Schermerhorn (4), Mel Gorman (8),
Peter Zijlstra (10) and myself are partly present in Mel's tree but
it's also partly our own implementation where Mel's tree diverged
from ours incompatibly - see the specific patches for details.

Thanks to everyone for their contributions!

>From my perspective I see no reason not to merge the mm/ basis present
in this unified tree in v3.8 (roughly a third of the patches) - it's
shaped in a way that everyone can work based on it, even if we might
disagree about some of the add-on approaches. That should address most
if not all of the items that were contentious in the past.

I'd really love to see some progress here and I'm ready to put as
much work and effort into this unified approach as possible. I'll
post updated versions based on review feedback and testing.

Thanks,

    Ingo

---------------->

Andrea Arcangeli (4):
  mm/numa: define _PAGE_NUMA
  mm/numa: Add pte_numa() and pmd_numa()
  mm/numa: Support NUMA hinting page faults from gup/gup_fast
  mm/numa: split_huge_page: transfer the NUMA type from the pmd to the pte

Ingo Molnar (25):
  sched, numa: Improve the CONFIG_NUMA_BALANCING help text
  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: Average the fault stats longer
  sched: Use the ideal CPU to drive active balancing
  sched: Add hysteresis to p->numa_shared
  sched, numa, mm: Interleave shared tasks
  sched, mm, mempolicy: Add per task mempolicy
  sched: Track shared task's node groups and interleave their memory allocations
  sched: Add "task flipping" support
  sched: Move the NUMA placement logic to a worklet
  numa, mempolicy: Improve CONFIG_NUMA_BALANCING=y OOM behavior
  sched: Introduce directed NUMA convergence
  sched: Remove statistical NUMA scheduling
  sched: Track quality and strength of convergence
  sched: Converge NUMA migrations
  sched: Add convergence strength based adaptive NUMA page fault rate
  sched: Refine the 'shared tasks' memory interleaving logic
  mm/rmap: Convert the struct anon_vma::mutex to an rwsem
  mm/rmap, migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable
  sched: Exclude pinned tasks from the NUMA-balancing logic
  sched: Add RSS filter to NUMA-balancing

Lee Schermerhorn (4):
  mm/mempolicy: Add MPOL_MF_NOOP
  mm/mempolicy: Check for misplaced page
  mm/mempolicy: Add MPOL_MF_LAZY
  mm/mempolicy: Implement change_prot_numa() in terms of change_protection()

Mel Gorman (8):
  mm/compaction: Move migration fail/success stats to migrate.c
  mm/compaction: Add scanned and isolated counters for compaction
  mm/migrate: Add a tracepoint for migrate_pages
  mm/numa: Create basic numa page hinting infrastructure
  mm/mempolicy: Use _PAGE_NUMA to migrate pages
  mm/mempolicy: Hide MPOL_NOOP and MPOL_MF_LAZY from userspace for now
  mm/numa: Add pte updates, hinting and migration stats
  mm/numa: Migrate on reference policy

Peter Zijlstra (10):
  mm/mempolicy: Make MPOL_LOCAL a real policy
  mm/migrate: Introduce migrate_misplaced_page()
  sched, numa, mm: Add last_cpu to page flags
  mm, numa: Implement migrate-on-fault lazy NUMA strategy for regular and THP pages
  sched: Make find_busiest_queue() a method
  sched, numa, mm: Describe the NUMA scheduling problem formally
  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 (1):
  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/paravirt.h          |    2 -
 arch/x86/include/asm/pgtable.h           |   11 +-
 arch/x86/include/asm/pgtable_types.h     |   20 +
 include/asm-generic/pgtable.h            |   74 +
 include/linux/huge_mm.h                  |   16 +-
 include/linux/init_task.h                |    8 +
 include/linux/mempolicy.h                |   47 +-
 include/linux/migrate.h                  |   58 +-
 include/linux/mm.h                       |  113 +-
 include/linux/mm_types.h                 |   50 +
 include/linux/mmzone.h                   |   14 +-
 include/linux/page-flags-layout.h        |   83 ++
 include/linux/rmap.h                     |   33 +-
 include/linux/sched.h                    |   57 +-
 include/linux/vm_event_item.h            |   12 +-
 include/linux/vmstat.h                   |    8 +
 include/trace/events/migrate.h           |   51 +
 include/uapi/linux/mempolicy.h           |   15 +-
 init/Kconfig                             |   63 +
 kernel/bounds.c                          |    4 +
 kernel/sched/core.c                      |  174 ++-
 kernel/sched/debug.c                     |    1 +
 kernel/sched/fair.c                      | 2346 +++++++++++++++++++++++++++---
 kernel/sched/features.h                  |   30 +-
 kernel/sched/sched.h                     |   51 +-
 kernel/sysctl.c                          |   59 +-
 mm/compaction.c                          |   15 +-
 mm/huge_memory.c                         |  197 ++-
 mm/internal.h                            |    7 +-
 mm/ksm.c                                 |    6 +-
 mm/memcontrol.c                          |    7 +-
 mm/memory-failure.c                      |    7 +-
 mm/memory.c                              |  205 ++-
 mm/memory_hotplug.c                      |    3 +-
 mm/mempolicy.c                           |  360 ++++-
 mm/migrate.c                             |  240 ++-
 mm/mmap.c                                |   10 +-
 mm/mprotect.c                            |   76 +-
 mm/mremap.c                              |    2 +-
 mm/page_alloc.c                          |    5 +-
 mm/rmap.c                                |   66 +-
 mm/vmstat.c                              |   16 +-
 46 files changed, 4341 insertions(+), 521 deletions(-)
 create mode 100644 Documentation/scheduler/numa-problem.txt
 create mode 100644 include/linux/page-flags-layout.h
 create mode 100644 include/trace/events/migrate.h

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2012-12-05  9:52 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-02 18:42 [PATCH 00/52] RFC: Unified NUMA balancing tree, v1 Ingo Molnar
2012-12-02 18:42 ` [PATCH 01/52] mm/compaction: Move migration fail/success stats to migrate.c Ingo Molnar
2012-12-02 18:42 ` [PATCH 02/52] mm/compaction: Add scanned and isolated counters for compaction Ingo Molnar
2012-12-02 18:42 ` [PATCH 03/52] mm/migrate: Add a tracepoint for migrate_pages Ingo Molnar
2012-12-02 18:42 ` [PATCH 04/52] mm/numa: define _PAGE_NUMA Ingo Molnar
2012-12-02 18:42 ` [PATCH 05/52] mm/numa: Add pte_numa() and pmd_numa() Ingo Molnar
2012-12-02 18:42 ` [PATCH 06/52] mm/numa: Support NUMA hinting page faults from gup/gup_fast Ingo Molnar
2012-12-02 18:42 ` [PATCH 07/52] mm/numa: split_huge_page: transfer the NUMA type from the pmd to the pte Ingo Molnar
2012-12-02 18:43 ` [PATCH 08/52] mm/numa: Create basic numa page hinting infrastructure Ingo Molnar
2012-12-02 18:43 ` [PATCH 09/52] mm/mempolicy: Make MPOL_LOCAL a real policy Ingo Molnar
2012-12-02 18:43 ` [PATCH 10/52] mm/mempolicy: Add MPOL_MF_NOOP Ingo Molnar
2012-12-02 18:43 ` [PATCH 11/52] mm/mempolicy: Check for misplaced page Ingo Molnar
2012-12-02 18:43 ` [PATCH 12/52] mm/migrate: Introduce migrate_misplaced_page() Ingo Molnar
2012-12-02 18:43 ` [PATCH 13/52] mm/mempolicy: Use _PAGE_NUMA to migrate pages Ingo Molnar
2012-12-02 18:43 ` [PATCH 14/52] mm/mempolicy: Add MPOL_MF_LAZY Ingo Molnar
2012-12-02 18:43 ` [PATCH 15/52] mm/mempolicy: Implement change_prot_numa() in terms of change_protection() Ingo Molnar
2012-12-02 18:43 ` [PATCH 16/52] mm/mempolicy: Hide MPOL_NOOP and MPOL_MF_LAZY from userspace for now Ingo Molnar
2012-12-02 18:43 ` [PATCH 17/52] mm/numa: Add pte updates, hinting and migration stats Ingo Molnar
2012-12-02 18:43 ` [PATCH 18/52] mm/numa: Migrate on reference policy Ingo Molnar
2012-12-03 15:44   ` Mel Gorman
2012-12-02 18:43 ` [PATCH 19/52] sched, numa, mm: Add last_cpu to page flags Ingo Molnar
2012-12-02 18:43 ` [PATCH 20/52] mm, numa: Implement migrate-on-fault lazy NUMA strategy for regular and THP pages Ingo Molnar
2012-12-05  0:55   ` David Rientjes
2012-12-05  9:43     ` Mel Gorman
2012-12-02 18:43 ` [PATCH 21/52] sched: Make find_busiest_queue() a method Ingo Molnar
2012-12-02 18:43 ` [PATCH 22/52] sched, numa, mm: Add credits for NUMA placement Ingo Molnar
2012-12-02 18:43 ` [PATCH 23/52] sched, numa, mm: Describe the NUMA scheduling problem formally Ingo Molnar
2012-12-02 18:43 ` [PATCH 24/52] sched: Add adaptive NUMA affinity support Ingo Molnar
2012-12-02 18:43 ` [PATCH 25/52] sched, numa: Improve the CONFIG_NUMA_BALANCING help text Ingo Molnar
2012-12-02 18:43 ` [PATCH 26/52] sched: Implement constant, per task Working Set Sampling (WSS) rate Ingo Molnar
2012-12-02 18:43 ` [PATCH 27/52] sched, numa, mm: Count WS scanning against present PTEs, not virtual memory ranges Ingo Molnar
2012-12-02 18:43 ` [PATCH 28/52] sched: Implement slow start for working set sampling Ingo Molnar
2012-12-02 18:43 ` [PATCH 29/52] sched: Implement NUMA scanning backoff Ingo Molnar
2012-12-03 19:55   ` Rik van Riel
2012-12-02 18:43 ` [PATCH 30/52] sched: Improve convergence Ingo Molnar
2012-12-02 18:43 ` [PATCH 31/52] sched: Introduce staged average NUMA faults Ingo Molnar
2012-12-02 18:43 ` [PATCH 32/52] sched: Track groups of shared tasks Ingo Molnar
2012-12-03 22:46   ` Rik van Riel
2012-12-02 18:43 ` [PATCH 33/52] sched: Use the best-buddy 'ideal cpu' in balancing decisions Ingo Molnar
2012-12-02 18:43 ` [PATCH 34/52] sched: Average the fault stats longer Ingo Molnar
2012-12-02 18:43 ` [PATCH 35/52] sched: Use the ideal CPU to drive active balancing Ingo Molnar
2012-12-02 18:43 ` [PATCH 36/52] sched: Add hysteresis to p->numa_shared Ingo Molnar
2012-12-02 18:43 ` [PATCH 37/52] sched, numa, mm: Interleave shared tasks Ingo Molnar
2012-12-02 18:43 ` [PATCH 38/52] sched, mm, mempolicy: Add per task mempolicy Ingo Molnar
2012-12-02 18:43 ` [PATCH 39/52] sched: Track shared task's node groups and interleave their memory allocations Ingo Molnar
2012-12-02 18:43 ` [PATCH 40/52] sched: Add "task flipping" support Ingo Molnar
2012-12-02 18:43 ` [PATCH 41/52] sched: Move the NUMA placement logic to a worklet Ingo Molnar
2012-12-02 18:43 ` [PATCH 42/52] numa, mempolicy: Improve CONFIG_NUMA_BALANCING=y OOM behavior Ingo Molnar
2012-12-02 18:43 ` [PATCH 43/52] sched: Introduce directed NUMA convergence Ingo Molnar
2012-12-02 18:43 ` [PATCH 44/52] sched: Remove statistical NUMA scheduling Ingo Molnar
2012-12-02 18:43 ` [PATCH 45/52] sched: Track quality and strength of convergence Ingo Molnar
2012-12-02 18:43 ` [PATCH 46/52] sched: Converge NUMA migrations Ingo Molnar
2012-12-02 18:43 ` [PATCH 47/52] sched: Add convergence strength based adaptive NUMA page fault rate Ingo Molnar
2012-12-02 18:43 ` [PATCH 48/52] sched: Refine the 'shared tasks' memory interleaving logic Ingo Molnar
2012-12-02 18:43 ` [PATCH 49/52] mm/rmap: Convert the struct anon_vma::mutex to an rwsem Ingo Molnar
2012-12-04 14:43   ` Michel Lespinasse
2012-12-02 18:43 ` [PATCH 50/52] mm/rmap, migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable Ingo Molnar
2012-12-02 18:43 ` [PATCH 51/52] sched: Exclude pinned tasks from the NUMA-balancing logic Ingo Molnar
2012-12-02 18:43 ` [PATCH 52/52] sched: Add RSS filter to NUMA-balancing Ingo Molnar
2012-12-03  5:09 ` [PATCH 00/52] RFC: Unified NUMA balancing tree, v1 Ingo Molnar
2012-12-03  9:25   ` [GIT] Unified NUMA balancing tree, v2 Ingo Molnar
2012-12-03 15:52 ` [PATCH 00/52] RFC: Unified NUMA balancing tree, v1 Rik van Riel
2012-12-03 17:11   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).