Re: [PATCH] mm: avoid bothering interrupted task when charge memcg in softirq

From: Shakeel Butt
Date: Sat Jul 14 2018 - 11:38:36 EST


On Sat, Jul 14, 2018 at 1:32 AM Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
>
> try_charge maybe executed in packet receive path, which is in interrupt
> context.
> In this situation, the 'current' is the interrupted task, which may has
> no relation to the rx softirq, So it is nonsense to use 'current'.
>

Have you actually seen this occurring? I am not very familiar with the
network code but I can think of two ways try_charge() can be called
from network code. Either through kmem charging or through
mem_cgroup_charge_skmem() and both locations correctly handle
interrupt context.

Shakeel