On Tue, Nov 22, 2016 at 8:48 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
Hello,
On Tue, Nov 22, 2016 at 04:47:49PM +0100, Vlastimil Babka wrote:
Thanks. Makes me wonder whether we should e.g. add __GFP_NOWARN to
GFP_NOWAIT globally at some point.
Yeah, that makes sense. The caller is explicitly saying that it's
okay to fail the allocation.
I'm not so convinced about the "atomic automatically means you shouldn't warn".
You'd certainly _hope_ that atomic allocations either have fallbacks
or are harmless if they fail, but I'd still rather see that
__GFP_NOWARN just to make that very much explicit.
Because as it is, atomic allocations certainly get to dig deeper into
our memory reserves, but they most definitely can fail, and I
definitely see how some code has no fallback because it thinks that
the deeper reserves mean that it will succeed.
Linus