mm/memcontrol.c: prevent missed memory.low load tears
Looks like one of these got missed when massaging in f86b810c26
("mm,
memcg: prevent memory.low load/store tearing") with other linux-mm
changes.
Link: http://lkml.kernel.org/r/20200612174437.GA391453@chrisdown.name
Signed-off-by: Chris Down <chris@chrisdown.name>
Reported-by: Michal Koutny <mkoutny@suse.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>
This commit is contained in:
parent
3a98990ae2
commit
03960e3318
@ -6423,7 +6423,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;
|
||||
}
|
||||
|
||||
@ -6435,7 +6435,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:
|
||||
|
Loading…
Reference in New Issue
Block a user