Re: [PATCH v1] kernel/trace:check the val against the available mem

From: Steven Rostedt
Date: Thu Apr 05 2018 - 10:31:00 EST


On Thu, 5 Apr 2018 07:22:58 -0700
Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> I understand you don't want GFP_NORETRY. But why is it more important for
> this allocation to succeed than other normal GFP_KERNEL allocations?

Not sure what you mean by "more important"? Does saying "RETRY_MAYFAIL"
make it more important? The difference is, if GFP_KERNEL fails, we
don't want to trigger an OOM, and simply clean up and report -ENOMEM to
the user. It has nothing to do with being more important than other
allocations.

If there's 100 Megs of memory available, and the user requests a gig of
memory, it's going to fail. Ideally, it doesn't trigger OOM, but
instead simply reports -ENOMEM to the user.

-- Steve