summaryrefslogtreecommitdiffstats
path: root/mm/page_counter.c
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2020-04-02 06:07:20 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 18:35:28 +0200
commit15b42562d46debadaebd77ac1a647abae139a231 (patch)
tree870fb610282ff7f4506932768df358439298fc32 /mm/page_counter.c
parentmm, memcg: prevent memory.high load/store tearing (diff)
downloadlinux-15b42562d46debadaebd77ac1a647abae139a231.tar.xz
linux-15b42562d46debadaebd77ac1a647abae139a231.zip
mm, memcg: prevent memory.max load tearing
This one is a bit more nuanced because we have memcg_max_mutex, which is mostly just used for enforcing invariants, but we still need to READ_ONCE since (despite its name) it doesn't really protect memory.max access. On write (page_counter_set_max() and memory_max_write()) we use xchg(), which uses smp_mb(), so that's already fine. Signed-off-by: Chris Down <chris@chrisdown.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Roman Gushchin <guro@fb.com> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/50a31e5f39f8ae6c8fb73966ba1455f0924e8f44.1584034301.git.chris@chrisdown.name Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_counter.c')
0 files changed, 0 insertions, 0 deletions