mm-kmem-switch-to-static_branch_likely-in-memcg_kmem_enabled.patch removed from -mm tree
The patch titled
Subject: mm: kmem: switch to static_branch_likely() in memcg_kmem_enabled()
has been removed from the -mm tree. Its filename was
mm-kmem-switch-to-static_branch_likely-in-memcg_kmem_enabled.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Roman Gushchin <[email protected]>
Subject: mm: kmem: switch to static_branch_likely() in memcg_kmem_enabled()
Currently memcg_kmem_enabled() is optimized for the kernel memory accounting being off. It was so for a long time, and arguably the reason behind was that the kernel memory accounting was initially an opt-in feature. However, now it's on by default on both cgroup v1 and cgroup v2, and it's on for all cgroups. So let's switch over to static_branch_likely() to reflect this fact.
Unlikely there is a significant performance difference, as the cost of a memory allocation and its accounting significantly exceeds the cost of a jump. However, the conversion makes the code look more logically.
---
include/linux/memcontrol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~mm-kmem-switch-to-static_branch_likely-in-memcg_kmem_enabled +1 -1
@@ -1448,7 +1448,7 @@ void memcg_put_cache_ids(void);static inline bool memcg_kmem_enabled (void ) { -return static_branch_unlikely (&memcg_kmem_enabled_key); +return static_branch_likely (&memcg_kmem_enabled_key); }static inline bool memcg_kmem_bypass (void )
_
Patches currently in -mm which might be from [email protected] are
percpu-return-number-of-released-bytes-from-pcpu_free_area.patch mm-memcg-percpu-account-percpu-memory-to-memory-cgroups.patch mm-memcg-percpu-per-memcg-percpu-memory-statistics.patch mm-memcg-percpu-per-memcg-percpu-memory-statistics-v3.patch mm-memcg-charge-memcg-percpu-memory-to-the-parent-cgroup.patch kselftests-cgroup-add-perpcu-memory-accounting-test.patch mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings.patch mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix.patch