Thread (11 messages) 11 messages, 3 authors, 2021-07-09

Re: [PATCH 3/3] mm, memcg: inline swap-related functions to improve disabled memcg config

From: Johannes Weiner <hannes@cmpxchg.org>
Date: 2021-07-09 14:49:51
Also in: cgroups, lkml

On Thu, Jul 08, 2021 at 05:05:09PM -0700, Suren Baghdasaryan wrote:
Inline mem_cgroup_try_charge_swap, mem_cgroup_uncharge_swap and
cgroup_throttle_swaprate functions to perform mem_cgroup_disabled static
key check inline before calling the main body of the function. This
minimizes the memcg overhead in the pagefault and exit_mmap paths when
memcgs are disabled using cgroup_disable=memory command-line option.
This change results in ~1% overhead reduction when running PFT test
comparing {CONFIG_MEMCG=n} against {CONFIG_MEMCG=y, cgroup_disable=memory}
configuration on an 8-core ARM64 Android device.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Looks reasonable to me as well.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help