Re: [PATCH 1/9] memcg: accounting for allocations called with disabled BH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 10-03-21 12:11:26, Vasily Averin wrote:
> On 3/9/21 5:57 PM, Michal Hocko wrote:
> > On Tue 09-03-21 11:03:48, Vasily Averin wrote:
> >> 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() sections
> > 
> > Is 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux