]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: restore proper dirty throttling when memory.high changes
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 7 Aug 2020 06:22:12 +0000 (23:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:26 +0000 (11:33 -0700)
commit8b1b654141f317403b723bebf2fb68af4c54cc37
tree5d92aa74bbce27717edea2da2578dc14e300d2fe
parentdf69ea7c79770f5f409a863875090f0c88cb171a
mm: memcontrol: restore proper dirty throttling when memory.high changes

Commit 86e304a2ec41 ("mm: memcontrol: try harder to set a new
memory.high") inadvertently removed a callback to recalculate the
writeback cache size in light of a newly configured memory.high limit.

Without letting the writeback cache know about a potentially heavily
reduced limit, it may permit too many dirty pages, which can cause
unnecessary reclaim latencies or even avoidable OOM situations.

This was spotted while reading the code, it hasn't knowingly caused any
problems in practice so far.

Fixes: 86e304a2ec41 ("mm: memcontrol: try harder to set a new memory.high")
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Chris Down <chris@chrisdown.name>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Link: http://lkml.kernel.org/r/20200728135210.379885-1-hannes@cmpxchg.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c