Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched/numa: Fix period_slot recalculation

The original code is as intended and was meant to scale the difference
between the NUMA_PERIOD_THRESHOLD and local/remote ratio when adjusting
the scan period. The period_slot recalculation can be dropped.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rik van Riel <riel@redhat.com>
Link: http://lkml.kernel.org/r/1386833006-6600-4-git-send-email-liwanp@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Wanpeng Li and committed by
Ingo Molnar
e777b63b 82897b4f

-1
-1
kernel/sched/fair.c
··· 1342 1342 * scanning faster if shared accesses dominate as it may 1343 1343 * simply bounce migrations uselessly 1344 1344 */ 1345 - period_slot = DIV_ROUND_UP(diff, NUMA_PERIOD_SLOTS); 1346 1345 ratio = DIV_ROUND_UP(private * NUMA_PERIOD_SLOTS, (private + shared)); 1347 1346 diff = (diff * ratio) / NUMA_PERIOD_SLOTS; 1348 1347 }