Re: [PATCH] net/skbuff: silence warnings under memory pressure
From: Eric Dumazet
Date: Thu Sep 05 2019 - 04:32:17 EST
On 9/4/19 10:42 PM, Qian Cai wrote:
> To summary, those look to me are all good long-term improvement that would
> reduce the likelihood of this kind of livelock in general especially for other
> unknown allocations that happen while processing softirqs, but it is still up to
> the air if it fixes it 100% in all situations as printk() is going to take more
> time and could deal with console hardware that involve irq_exit() anyway.
> On the other hand, adding __GPF_NOWARN in the build_skb() allocation will fix
> this known NET_TX_SOFTIRQ case which is common when softirqd involved at least
> in short-term. It even have a benefit to reduce the overall warn_alloc() noise
> out there.
> I can resubmit with an update changelog. Does it make any sense?
It does not make sense.
We have thousands other GFP_ATOMIC allocations in the networking stacks.
Soon you will have to send more and more patches adding __GFP_NOWARN once
your workloads/tests can hit all these various points.
It is really time to fix this problem generically, instead of having
to review hundreds of patches.
This was my initial feedback really, nothing really has changed since.
The ability to send a warning with a stack trace, holding the cpu
for many milliseconds should not be decided case by case, otherwise
every call points will decide to opt-out from the harmful warnings.