mbox series

[-v4,next,0/4] Some cleanup for memcg

Message ID 20250124073514.2375622-1-chenridong@huaweicloud.com (mailing list archive)
Headers show
Series Some cleanup for memcg | expand

Message

Chen Ridong Jan. 24, 2025, 7:35 a.m. UTC
From: Chen Ridong <chenridong@huawei.com>

Some cleanup for memcg.

In this series, patches 1-3 have been reviewed.
Patch 4 is new, which adds CONFIG_MEMCG_V1 for the local functions,
suggested by Johannes Weiner.

---

v3->v4:
 - keep the 'local' functions in the memcontrol-v1.c and add
   CONFIG_MEMCG_V1 for them.

v2->v3:
 - move the wrapper function definitions to header files.
 - add a patch to move the 'local' functions to the memcontrol-v1.c.

v1->v2:
 - drop the patch 'simplify the mem_cgroup_update_lru_size function'.
 - for patch 3, rename '__refill_obj_stock' to replace_stock_objcg, and
   keep the 'objcg equal' check in the calling functions.

Chen Ridong (4):
  memcg: use OFP_PEAK_UNSET instead of -1
  memcg: call the free function when allocation of pn fails
  memcg: factor out the replace_stock_objcg function
  memcg: add CONFIG_MEMCG_V1 for 'local' functions

 mm/memcontrol-v1.h |  6 ++---
 mm/memcontrol.c    | 61 ++++++++++++++++++++++++++--------------------
 2 files changed, 38 insertions(+), 29 deletions(-)