Skip to content

RFC mm: kmem: optimize obj_cgroup pointer retrieval

Roman Gushchin cgroups linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm: kmem: optimize get_obj_cgroup_from_current()mm/memcontrol.c+14 -202 replies
2/2mm: kmem: add direct objcg pointer to task_structinclude/linux/sched.h mm/memcontrol.c+77 -114 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchShakeel Butt
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/2] mm: kmem: optimize obj_cgroup pointer retrieval

This patchset improves the performance of get_obj_cgroup_from_current(), which is used to get an objcg pointer on the kernel memory allocation fast path.

Results (1M 8-bytes accounted allocations):

| version         | accounted (us) | delta | unaccounted (us) |  delta |
|-----------------+----------------+-------+------------------+--------|
| baseline (6.1+) |          81042 |       |            45269 |        |
| patch 1         |          78756 | -2.8% |            42731 |  -5.6% |
| patch 2         |          73650 | -9.1% |            30662 | -32.3% |

Unaccounted allocations were performed from a user's task belonging to the root cgroup, so savings are particularly large because previously the root_mem_cgroup pointer was obtained first just to learn that it's corresponding objcg is NULL.

Roman Gushchin (2):
mm: kmem: optimize get_obj_cgroup_from_current()
mm: kmem: add direct objcg pointer to task_struct

 include/linux/sched.h |   4 ++
 mm/memcontrol.c       | 102 ++++++++++++++++++++++++++++++++----------
 2 files changed, 83 insertions(+), 23 deletions(-)
Signature · 1 line
2.39.0