Re: [PATCH v2] memcg: Don't call schedule_work when no spinning is allowed
From: Johannes Weiner
Date: Fri Sep 04 2026 - 14:48:20 EST
On Fri, Sep 04, 2026 at 10:31:45AM -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")
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> Signed-off-by: David Stevens <stevensd@xxxxxxxxxx>
Reviewed-by: Johannes Weiner <hannes@xxxxxxxxxxx>