Re: [PATCH 1/9] memcg: accounting for allocations called with disabled BH
From: Michal Hocko <hidden>
Date: 2021-03-10 09:40:53
Also in:
linux-mm
From: Michal Hocko <hidden>
Date: 2021-03-10 09:40:53
Also in:
linux-mm
On Wed 10-03-21 12:11:26, Vasily Averin wrote:
On 3/9/21 5:57 PM, Michal Hocko wrote:quoted
On Tue 09-03-21 11:03:48, Vasily Averin wrote:quoted
in_interrupt() check in memcg_kmem_bypass() is incorrect because it does not allow to account memory allocation called from task context with disabled BH, i.e. inside spin_lock_bh()/spin_unlock_bh() sectionsIs there any existing user in the tree? Or is this more of a preparatory patch for a later one which will need it? In other words, is this a bug fix or a preparatory work.struct fib6_node objects are allocated by this way net/ipv6/route.c::__ip6_ins_rt() ... write_lock_bh(&table->tb6_lock); err = fib6_add(&table->tb6_root, rt, info, mxc); write_unlock_bh(&table->tb6_lock); I spend some time to understand why properly entries from properly configured cache was not accounted to container's memcg.
OK, that is a valuable information. If there are no other users currently then I would recommend squashing this patch into the one which introduces accounting for fib6_node cache (patch 2, IIUC). -- Michal Hocko SUSE Labs