Re: [PATCH v3] memcg: cache obj_stock by memcg, not by objcg pointer
From: Harry Yoo
Date: Tue May 19 2026 - 19:39:53 EST
On 5/20/26 5:11 AM, Shakeel Butt wrote:
On Wed, May 20, 2026 at 12:00:16AM +0900, Harry Yoo wrote:
[...]
The full clean solution might take one more cycle and I think we can not just
ignore 67% regression on 7.1.
That is valid point, unfortunately.
One more thing I have to ask... for v7.1, wouldn't it be a safer option to
revert the per-node object change and re-introduce it once we have a cleaner
solution?
The issue with that revert is that we reintroduce all node lru locking in the
objcg reparenting path.
I'm not sure the problems with all-node locking are serious enough to rule it out as an option for 7.1.
It is not ideal, but given that the critical section for reparenting is independent of folio count, would this actually be a significant problem in practice? (even large servers rarely go beyond 8 NUMA nodes...)
This change was introduced in v5, but the implementation before v4 had been
exposed in -next for a while, and I think we don't have enough justification
to keep the per-node objcgs change, at least for v7.1, given that we have an
unexpected last-minute regression and
correctness concerns (albeit slight).
I am waiting for Oliver to test the multi-objcg patch I sent. If that also
resolves the regression then we have one more option i.e. backport that to 7.1
to fix the regression.
Yeah, If per-node objcg is required in future kernels anyway, this option would be more ideal (if available).
So to summarize, for future kernels we will be having multi-objcg in some form.
For 7.1, we have to decide between (1) do nothing (2) this patch or (3) backport
the multi-objcg path to 7.1.
Ack.
Thanks!
--
Cheers,
Harry / Hyeonggon