sched/numa: Do statistics calculation using local variables only
sched/numa: Do statistics calculation using local variables only

The current code in task_numa_placement calculates the difference
between the old and the new value, but also temporarily stores half
of the old value in the per-process variables.

The NUMA balancing code looks at those per-process variables, and
having other tasks temporarily see halved statistics could lead to
unwanted numa migrations. This can be avoided by doing all the math
in local variables.

This change also simplifies the code a little.

Signed-off-by: Rik van Riel <a21938f5d463ddf41aa718934c205ca2cce8ebbc@redhat.com>
Acked-by: Mel Gorman <39ea6a09710987173e32e37c86918024a0f441c1@suse.de>
Signed-off-by: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Chegu Vinod <c44f108d0c0ea96d2d5cd3344b32a14518a74e59@hp.com>
Link: http://lkml.kernel.org/r/1390860228-21539-8-git-send-email-a21938f5d463ddf41aa718934c205ca2cce8ebbc@redhat.com
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs