sched/numa: Slow down scan rate if shared faults dominate
authorRik van Riel <riel@redhat.com>
Mon, 31 Jul 2017 19:28:46 +0000 (15:28 -0400)
committerIngo Molnar <mingo@kernel.org>
Thu, 10 Aug 2017 10:18:16 +0000 (12:18 +0200)
commit37ec97deb3a8c68a7adfab61beb261ffeab19d09
tree6e1c13c810d1c45e9ba84f382eeeba97ca6cbf19
parentf235a54f00449c611f85173fe8a66c4d189c5ce1
sched/numa: Slow down scan rate if shared faults dominate

The comment above update_task_scan_period() says the scan period should
be increased (scanning slows down) if the majority of memory accesses
are on the local node, or if the majority of the page accesses are
shared with other tasks.

However, with the current code, all a high ratio of shared accesses
does is slow down the rate at which scanning is made faster.

This patch changes things so either lots of shared accesses or
lots of local accesses will slow down scanning, and numa scanning
is sped up only when there are lots of private faults on remote
memory pages.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: jhladky@redhat.com
Cc: lvenanci@redhat.com
Link: http://lkml.kernel.org/r/20170731192847.23050-2-riel@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c