]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - mm/mempolicy.c
sched/numa, mm: Use active_nodes nodemask to limit numa migrations
authorRik van Riel <riel@redhat.com>
Mon, 27 Jan 2014 22:03:44 +0000 (17:03 -0500)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 Jan 2014 12:17:07 +0000 (13:17 +0100)
commit10f39042711ba21773763f267b4943a2c66c8bef
tree394f8399c6f9b980f5673e1034b125b91844f662
parent20e07dea286a90f096a779706861472d296397c6
sched/numa, mm: Use active_nodes nodemask to limit numa migrations

Use the active_nodes nodemask to make smarter decisions on NUMA migrations.

In order to maximize performance of workloads that do not fit in one NUMA
node, we want to satisfy the following criteria:

  1) keep private memory local to each thread

  2) avoid excessive NUMA migration of pages

  3) distribute shared memory across the active nodes, to
     maximize memory bandwidth available to the workload

This patch accomplishes that by implementing the following policy for
NUMA migrations:

  1) always migrate on a private fault

  2) never migrate to a node that is not in the set of active nodes
     for the numa_group

  3) always migrate from a node outside of the set of active nodes,
     to a node that is in that set

  4) within the set of active nodes in the numa_group, only migrate
     from a node with more NUMA page faults, to a node with fewer
     NUMA page faults, with a 25% margin to avoid ping-ponging

This results in most pages of a workload ending up on the actively
used nodes, with reduced ping-ponging of pages between those nodes.

Signed-off-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Chegu Vinod <chegu_vinod@hp.com>
Link: http://lkml.kernel.org/r/1390860228-21539-6-git-send-email-riel@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h
kernel/sched/fair.c
mm/mempolicy.c