On 6/28/2023 9:56 AM, Alexei Starovoitov wrote: > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > In certain scenarios alloc_bulk() migth be taking free objects mainly from > free_by_rcu_ttrace list. In such case get_memcg() and set_active_memcg() are > redundant, but they show up in perf profile. Split the loop and only set memcg > when allocating from slab. No performance difference in this patch alone, but > it helps in combination with further patches. > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> Acked-by: Hou Tao <houtao1@xxxxxxxxxx>