[PATCH v2 0/2] mm, memcg: fix memory.peak reset clobbering other fds' watermark

Ridong <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.cgroups,gmane.linux.kernel.mm
Message-ID <[email protected]>
From: Ridong Chen <[email protected]>

Two fixes for the per-fd memory.peak / memory.swap.peak handlers added in
c6f53ed8f213. Each open fd reads back max(its own value, the shared
local_watermark), and both bugs live in that scheme.

---

Changes since v1 [1]:
 - New patch 1: hold peaks_lock in the peak readers (Sashiko).
 - Patch 2: floor the peers with max(usage, local_watermark), mirroring
   peak_show(), and skip the writing fd (Johannes Weiner).

[1] https://lore.kernel.org/all/[email protected]/

Ridong Chen (2):
  memcg: acquire peaks_lock when reading memory.peak
  mm, memcg: fix memory.peak reset clobbering other fds' watermark

 mm/memcontrol.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.