Re: [PATCH] memcg: Don't call schedule_work when no spinning is allowed
From: David Stevens
Date: Fri Sep 04 2026 - 13:58:52 EST
On Fri, Sep 4, 2026 at 9:25 AM Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx> wrote:
>
> On Mon, Aug 31, 2026 at 04:43:39PM -0700, David Stevens wrote:
> > Memcg charging can be done from any context, but calling schedule_work()
> > isn't safe from an NMI. If memory.high is breached from a context where
> > spinning isn't allowed, use irq_work to schedule the reclaim work.
> >
> > Fixes: 3ac4638a734a ("memcg: make memcg_rstat_updated nmi safe")
> > Signed-off-by: David Stevens <stevensd@xxxxxxxxxx>
>
> This is in mm-unstable and breaks the build for me :)
>
> In general - please don't rely on implicit header includes, if you're using
> functions from a header that's not included, add the include because your local
> config might happen to import it but another one might be broken.
Sorry about that, I'll be sure to be more careful in the future. I've
sent out a v2 with the missing includes.
-David