Re: [PATCH v2 8/8] mm: Centralize & improve oom reporting in show_mem.c

From: Kent Overstreet
Date: Mon Apr 25 2022 - 11:28:21 EST


On Mon, Apr 25, 2022 at 11:28:26AM +0200, Michal Hocko wrote:
>
> > Do you know if using memalloc_noreclaim_(save|restore) is sufficient for that,
> > or do we want GFP_ATOMIC? I'm already using GFP_ATOMIC for allocations when we
> > generate the report on slabs, since we're taking the slab mutex there.
>
> No it's not. You simply _cannot_ allocate from the oom context.

Hmm, no, that can't be right. I've been using the patch set and it definitely
works, at least in my testing. Do you mean to say that we shouldn't? Can you
explain why?