lkml.org 
[lkml]   [2022]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[PATCH v3 0/3] mm: memcg: fix protection of reclaim target memcg
From
This series fixes a bug in calculating the protection of the reclaim
target memcg where we end up using stale effective protection values from
the last reclaim operation, instead of completely ignoring the
protection of the reclaim target as intended. More detailed explanation
and examples in patch 1, which includes the fix.
Patches 2 & 3 introduce a selftest case that catches the bug.

v2 -> v3:
- Refactoring selftest helper reclaim_until (suggested by Roman).
- Collected review tags on patch 1 & 3 from Roman (Thanks!).

v1 -> v2:
- Instead of adding a new helper, extended
mem_cgroup_supports_protection() to check if the current memcg is the
target memcg, renamed to mem_cgroup_unprotected() which is much easier
to reason about (suggested by Roman).
- Add a selftest case to catch the bug (suggested by Roman).

Yosry Ahmed (3):
mm: memcg: fix stale protection of reclaim target memcg
selftests: cgroup: refactor proactive reclaim code to reclaim_until()
selftests: cgroup: make sure reclaim target memcg is unprotected

include/linux/memcontrol.h | 31 +++++--
mm/vmscan.c | 11 ++-
.../selftests/cgroup/test_memcontrol.c | 91 +++++++++++--------
3 files changed, 82 insertions(+), 51 deletions(-)

--
2.39.0.rc0.267.gcb52ba06e7-goog

\
 
 \ /
  Last update: 2022-12-02 04:16    [W:0.053 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site