]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mm/vmstat.c: fix NUMA statistics updates
authorJanne Huttunen <janne.huttunen@nokia.com>
Fri, 16 Nov 2018 23:08:32 +0000 (15:08 -0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:08 +0000 (14:22 -0300)
commitac9ae2daec083abaed506e7e00992ef98578a2b7
tree15e2dfbc5a9efccbc5c89a9f29ee4e41f59581ae
parente6276cff5c114df1ad1f5649435f4b3942448014
mm/vmstat.c: fix NUMA statistics updates

BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit 13c9aaf7fa01cc7600c61981609feadeef3354ec ]

Scan through the whole array to see if an update is needed.  While we're
at it, use sizeof() to be safe against any possible type changes in the
future.

The bug here is that we wouldn't sync per-cpu counters into global ones
if there was an update of numa_stats for higher cpus.  Highly
theoretical one though because it is much more probable that zone_stats
are updated so we would refresh anyway.  So I wouldn't bother to mark
this for stable, yet something nice to fix.

[mhocko@suse.com: changelog enhancement]
Link: http://lkml.kernel.org/r/1541601517-17282-1-git-send-email-janne.huttunen@nokia.com
Fixes: 1d90ca897cb0 ("mm: update NUMA counter threshold size")
Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
mm/vmstat.c