Skip to contentSkip to conversation

percpu changes for v5.14-rc1

GIT PULL Merged Dennis Zhou 2 participants 2 messages Jul 1, 2021 – Jul 2, 2021 Memory management

lore
Share & tools
lore
#0 lore raw

Hi Linus,

This pull request contains:
- percpu chunk depopulation - depopulate backing pages for chunks with empty pages when we exceed a global threshold without those pages. This lets us reclaim a portion of memory that would previously be lost until the full chunk would be freed (possibly never).

- memcg accounting cleanup - previously separate chunks were managed for normal allocations and __GFP_ACCOUNT allocations. These are now consolidated which cleans up the code quite a bit.

- a few misc clean ups for clang warnings

Two notes though. First there is a small conflict in mm/memcontrol.c and I have an example merge in percpu#for-5.14-merge [1]. Second, I have an outstanding patch to do some level of batching for percpu depopulation. Oliver Wang (krobot tests) is reporting a regression only on Knights Landing cpus [2]. I am working on debugging it and hopefully will have it figured out soon.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git/log/?h=for-5.14-merge
[2] https://lore.kernel.org/lkml/20210630074500.GB10248@xsang-OptiPlex-9020/

Thanks,
Dennis

The following changes since commit d434405aaab7d0ebc516b68a8fc4100922d7f5ef:

Linux 5.12-rc7 (2021-04-11 15:16:13 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.14

for you to fetch changes up to e4d777003a43feab2e000749163e531f6c48c385:

percpu: optimize locking in pcpu_balance_workfn() (2021-06-17 23:05:24 +0000)

----------------------------------------------------------------
Dennis Zhou (2):
percpu: use pcpu_free_slot instead of pcpu_nr_slots - 1
percpu: initialize best_upa variable

Roman Gushchin (8):
percpu: fix a comment about the chunks ordering
percpu: split __pcpu_balance_workfn()
percpu: factor out pcpu_check_block_hint()
percpu: implement partial chunk depopulation
mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as __ro_after_init mm, memcg: introduce mem_cgroup_kmem_disabled()
percpu: rework memcg accounting
percpu: optimize locking in pcpu_balance_workfn()

Wei Yongjun (1):
percpu: make symbol 'pcpu_free_slot' static

 include/linux/memcontrol.h |   5 +
 mm/memcontrol.c            |  11 +-
 mm/percpu-internal.h       |  56 +------
 mm/percpu-km.c             |  10 +-
 mm/percpu-stats.c          |  44 ++----
 mm/percpu-vm.c             |  35 ++++-
 mm/percpu.c                | 368 +++++++++++++++++++++++++++++++++------------
 7 files changed, 343 insertions(+), 186 deletions(-)