mm, memcg: prevent missed memory.low load tears
Subsystems (2)
PATCH 1/1 mm, memcg: prevent missed memory.low load tears
Looks like one of these got missed when massaging in f86b810c2610 ("mm,
memcg: prevent memory.low load/store tearing") with other linux-mm changes.
Reported-by Michal Koutný <[email protected]>
Signed-off-by Chris Down <[email protected]>
--- mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
mm/memcontrol.c +3 -2
@@ -6416,7 +6416,7 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root,if (parent == root) { memcg->memory.emin =READ_ONCE (memcg->memory.min); - memcg->memory.elow = memcg->memory.low; + memcg->memory.elow =READ_ONCE (memcg->memory.low); goto out; }
@@ -6428,7 +6428,8 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, atomic_long_read(&parent->memory.children_min_usage)));WRITE_ONCE (memcg->memory.elow,effective_protection (usage, parent_usage, - memcg->memory.low,READ_ONCE (parent->memory.elow), +READ_ONCE (memcg->memory.low), +READ_ONCE (parent->memory.elow),atomic_long_read (&parent->memory.children_low_usage))); out:
Signature · 1 line
2.27.0
Quoted 6 lines · Chris Down
Looks like one of these got missed when massaging in
f86b810c2610("mm,
memcg: prevent memory.low load/store tearing") with other linux-mm changes.Reported-by Michal Koutný <[email protected]>Signed-off-by Chris Down <[email protected]>
Acked-by Michal Hocko <[email protected]>
Quoted 30 lines
--- mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)mm/memcontrol.c +3
-2@@ -6416,7 +6416,7 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root,if (parent == root) { memcg->memory.emin =READ_ONCE (memcg->memory.min); - memcg->memory.elow = memcg->memory.low; + memcg->memory.elow =READ_ONCE (memcg->memory.low); goto out; }@@ -6428,7 +6428,8 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, atomic_long_read(&parent->memory.children_min_usage)));WRITE_ONCE (memcg->memory.elow,effective_protection (usage, parent_usage, - memcg->memory.low,READ_ONCE (parent->memory.elow), +READ_ONCE (memcg->memory.low), +READ_ONCE (parent->memory.elow),atomic_long_read (&parent->memory.children_low_usage))); out:Signature · 1 line
2.27.0
Signature · 2 lines
Michal Hocko SUSE Labs