* [PATCH net-next] net: napi: remove useless stack trace
@ 2020-06-17 16:40 Eric Dumazet
2020-06-19 3:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2020-06-17 16:40 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet
Whenever a buggy NAPI driver returns more than its budget,
we emit a stack trace that is of no use, since it does not
tell which driver is buggy.
Instead, emit a message giving the function name, and a
descriptive message.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/core/dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 6bc2388141f6fd7c66c0e8349514a326e5106db2..cea7fc1716caf9dbe8fcfcb5c5eec0ed21e20775 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6683,7 +6683,9 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll)
trace_napi_poll(n, work, weight);
}
- WARN_ON_ONCE(work > weight);
+ if (unlikely(work > weight))
+ pr_err_once("NAPI poll function %pS returned %d, exceeding its budget of %d.\n",
+ n->poll, work, weight);
if (likely(work < weight))
goto out_unlock;
--
2.27.0.290.gba653c62da-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: napi: remove useless stack trace
2020-06-17 16:40 [PATCH net-next] net: napi: remove useless stack trace Eric Dumazet
@ 2020-06-19 3:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-06-19 3:30 UTC (permalink / raw)
To: edumazet; +Cc: netdev, eric.dumazet
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 17 Jun 2020 09:40:51 -0700
> Whenever a buggy NAPI driver returns more than its budget,
> we emit a stack trace that is of no use, since it does not
> tell which driver is buggy.
>
> Instead, emit a message giving the function name, and a
> descriptive message.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-19 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 16:40 [PATCH net-next] net: napi: remove useless stack trace Eric Dumazet
2020-06-19 3:30 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.