Re: [linus:master] [mm] 01b9da291c: stress-ng.switch.ops_per_sec 67.7% regression
Qi Zheng <[email protected]> Wed, 13 May 2026 10:10:34 +0800
| Newsgroups | dev.linux.lists.oe-lkp,org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 5/13/26 12:03 AM, Shakeel Butt wrote:
> On Tue, May 12, 2026 at 08:56:52PM +0800, kernel test robot wrote:
>>
>>
>> Hello,
>>
>> kernel test robot noticed a 67.7% regression of stress-ng.switch.ops_per_sec on:
>>
>>
>> commit: 01b9da291c4969354807b52956f4aae1f41b4924 ("mm: memcontrol: convert objcg to be per-memcg per-node type")
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>
> This is most probably due to shuffling of struct mem_cgroup and struct
> mem_cgroup_per_node members.
Another possibility is that after objcg was split into per-node, the
slab accounting fast path is still designed assuming only one current
objcg per CPU:
struct obj_stock_pcp {
struct obj_cgroup *cached_objcg;
};
So it's may cause the following thrashing:
CPU stock cached = memcg/node0 objcg
free object tagged = memcg/node1 objcg
=> __refill_obj_stock --> objcg mismatch
=> drain_obj_stock()
=> cache switches to node1 objcg
next local allocation tagged = node0 objcg
=> mismatch again
=> drain_obj_stock()
>
> I will try to reproduce and will followup on this.
Thanks! I'll also try to reproduce it locally and work on a fix.