mm: consider the number in local CPUs when reading NUMA stats
authorKemi Wang <[email protected]>
Fri, 8 Sep 2017 23:12:55 +0000 (16:12 -0700)
committerLinus Torvalds <[email protected]>
Sat, 9 Sep 2017 01:26:47 +0000 (18:26 -0700)
commit638032224ed762a29baca1fc37f1168efc2554ae
tree41ec4e67d4698b0c3208afd182297882f49ecc1f
parent1d90ca897cb05cf38bd62f36756d219e02913b7d
mm: consider the number in local CPUs when reading NUMA stats

To avoid deviation, the per cpu number of NUMA stats in
vm_numa_stat_diff[] is included when a user *reads* the NUMA stats.

Since NUMA stats does not be read by users frequently, and kernel does not
need it to make a decision, it will not be a problem to make the readers
more expensive.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kemi Wang <[email protected]>
Reported-by: Jesper Dangaard Brouer <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Aaron Lu <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Christopher Lameter <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Ying Huang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/vmstat.h
mm/vmstat.c