Re: [PATCH v5 1/3] ipc/sem: account dynamically allocated sops arrays to memcg

From
Andrew Morton <akpm@linux-foundation.org>
Date
2026-11-16 16:00:14
Also in
cgroups, linux-hardening, linux-man, linux-mm, lkml, stable
Reply to
Yingjie Wang, 2026-11-16
On Mon, 16 Nov 2026 08:20:52 +0000 Yingjie Wang [off-list ref] wrote:
quoted
There is no kmem accounting in root cgroup, do you know why there is an increase
of 2.3% there?
I think the 2.3% mainly reflects boot-to-boot variation. The unchanged
64-operation stack path also slowed down by 1.9%, even though it does
not reach the changed allocation.

For successful calls, the per-boot medians were:

  nops  V4 boots (ns)           V5 boots (ns)
  64    230.5 229.4 230.0       231.2 235.0 235.4
  65    546.0 551.2 548.2       551.2 562.6 566.3

The first V5 boot was very close to the upper end of the V4 results at
65 operations, while the later two boots were slower at both sizes.
That is why I interpret the increase mainly as boot-to-boot variation,
rather than root-cgroup charging.

__GFP_ACCOUNT does still change the allocation path, including selecting
the kmalloc-cg cache, so a small contribution from that is also possible.

Andrew, could we clarify the root-cgroup result in the [1/3] changelog?
Please change

  and successful calls in the root cgroup by at most 2.3%.

to

  and successful calls in the root cgroup by at most 2.3%, which
  appears to be mainly boot-to-boot variation.
Yes, I have made both requested edits.
Thread (11 messages) 11 messages, 3 authors, last reply 11h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help