* [PATCH] net: Ensure tx watchdog failures always print.
@ 2011-06-14 16:50 greearb
2011-06-14 17:14 ` Eric Dumazet
2011-06-14 17:33 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: greearb @ 2011-06-14 16:50 UTC (permalink / raw)
To: netdev; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
These are too important to not have some log message
generated. But, keep the logic that only prints
a single stack dump.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 90939ba... fce5558... M net/sched/sch_generic.c
net/sched/sch_generic.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 90939ba..fce5558 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -252,8 +252,20 @@ static void dev_watchdog(unsigned long arg)
if (some_queue_timedout) {
char drivername[64];
- WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
- dev->name, netdev_drivername(dev, drivername, 64), i);
+ static bool do_once = true;
+ printk(KERN_INFO "NETDEV WATCHDOG: %s (%s):"
+ " transmit queue %u timed out,"
+ " trans_start: %lu, wd-timeout: %i"
+ " jiffies: %lu tx-queues: %i\n",
+ dev->name,
+ netdev_drivername(dev, drivername, 64),
+ i,
+ trans_start, dev->watchdog_timeo,
+ jiffies, dev->num_tx_queues);
+ if (do_once) {
+ do_once = false;
+ WARN_ON(1);
+ }
dev->netdev_ops->ndo_tx_timeout(dev);
}
if (!mod_timer(&dev->watchdog_timer,
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] net: Ensure tx watchdog failures always print.
2011-06-14 16:50 [PATCH] net: Ensure tx watchdog failures always print greearb
@ 2011-06-14 17:14 ` Eric Dumazet
2011-06-14 17:25 ` Ben Greear
2011-06-14 17:33 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2011-06-14 17:14 UTC (permalink / raw)
To: greearb; +Cc: netdev
Le mardi 14 juin 2011 à 09:50 -0700, greearb@candelatech.com a écrit :
> From: Ben Greear <greearb@candelatech.com>
>
> These are too important to not have some log message
> generated. But, keep the logic that only prints
> a single stack dump.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> :100644 100644 90939ba... fce5558... M net/sched/sch_generic.c
> net/sched/sch_generic.c | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 90939ba..fce5558 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -252,8 +252,20 @@ static void dev_watchdog(unsigned long arg)
>
> if (some_queue_timedout) {
> char drivername[64];
> - WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
> - dev->name, netdev_drivername(dev, drivername, 64), i);
> + static bool do_once = true;
> + printk(KERN_INFO "NETDEV WATCHDOG: %s (%s):"
> + " transmit queue %u timed out,"
> + " trans_start: %lu, wd-timeout: %i"
> + " jiffies: %lu tx-queues: %i\n",
> + dev->name,
> + netdev_drivername(dev, drivername, 64),
> + i,
> + trans_start, dev->watchdog_timeo,
> + jiffies, dev->num_tx_queues);
> + if (do_once) {
> + do_once = false;
> + WARN_ON(1);
You could use WARN_ON_ONCE(1) here
> + }
> dev->netdev_ops->ndo_tx_timeout(dev);
> }
> if (!mod_timer(&dev->watchdog_timer,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net: Ensure tx watchdog failures always print.
2011-06-14 17:14 ` Eric Dumazet
@ 2011-06-14 17:25 ` Ben Greear
2011-06-14 17:34 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2011-06-14 17:25 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
On 06/14/2011 10:14 AM, Eric Dumazet wrote:
> Le mardi 14 juin 2011 à 09:50 -0700, greearb@candelatech.com a écrit :
>> From: Ben Greear<greearb@candelatech.com>
>>
>> These are too important to not have some log message
>> generated. But, keep the logic that only prints
>> a single stack dump.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>> :100644 100644 90939ba... fce5558... M net/sched/sch_generic.c
>> net/sched/sch_generic.c | 16 ++++++++++++++--
>> 1 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
>> index 90939ba..fce5558 100644
>> --- a/net/sched/sch_generic.c
>> +++ b/net/sched/sch_generic.c
>> @@ -252,8 +252,20 @@ static void dev_watchdog(unsigned long arg)
>>
>> if (some_queue_timedout) {
>> char drivername[64];
>> - WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
>> - dev->name, netdev_drivername(dev, drivername, 64), i);
>> + static bool do_once = true;
>> + printk(KERN_INFO "NETDEV WATCHDOG: %s (%s):"
>> + " transmit queue %u timed out,"
>> + " trans_start: %lu, wd-timeout: %i"
>> + " jiffies: %lu tx-queues: %i\n",
>> + dev->name,
>> + netdev_drivername(dev, drivername, 64),
>> + i,
>> + trans_start, dev->watchdog_timeo,
>> + jiffies, dev->num_tx_queues);
>> + if (do_once) {
>> + do_once = false;
>> + WARN_ON(1);
>
> You could use WARN_ON_ONCE(1) here
Er, right..don't know what I was thinking.
Will re-send.
Thanks,
Ben
>
>> + }
>> dev->netdev_ops->ndo_tx_timeout(dev);
>> }
>> if (!mod_timer(&dev->watchdog_timer,
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net: Ensure tx watchdog failures always print.
2011-06-14 16:50 [PATCH] net: Ensure tx watchdog failures always print greearb
2011-06-14 17:14 ` Eric Dumazet
@ 2011-06-14 17:33 ` David Miller
2011-06-14 17:41 ` Ben Greear
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2011-06-14 17:33 UTC (permalink / raw)
To: greearb; +Cc: netdev
From: greearb@candelatech.com
Date: Tue, 14 Jun 2011 09:50:13 -0700
> From: Ben Greear <greearb@candelatech.com>
>
> These are too important to not have some log message
> generated. But, keep the logic that only prints
> a single stack dump.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
We specifically made this print out only once, and yes
all of it.
Because it spams people's logs to the point that the message
is not useful and only scrolls out other more important
messages.
I'm not applying this, sorry.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net: Ensure tx watchdog failures always print.
2011-06-14 17:25 ` Ben Greear
@ 2011-06-14 17:34 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-06-14 17:34 UTC (permalink / raw)
To: greearb; +Cc: eric.dumazet, netdev
From: Ben Greear <greearb@candelatech.com>
Date: Tue, 14 Jun 2011 10:25:13 -0700
> Will re-send.
Please, don't bother, see my other reply.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net: Ensure tx watchdog failures always print.
2011-06-14 17:33 ` David Miller
@ 2011-06-14 17:41 ` Ben Greear
0 siblings, 0 replies; 6+ messages in thread
From: Ben Greear @ 2011-06-14 17:41 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On 06/14/2011 10:33 AM, David Miller wrote:
> From: greearb@candelatech.com
> Date: Tue, 14 Jun 2011 09:50:13 -0700
>
>> From: Ben Greear<greearb@candelatech.com>
>>
>> These are too important to not have some log message
>> generated. But, keep the logic that only prints
>> a single stack dump.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>
> We specifically made this print out only once, and yes
> all of it.
>
> Because it spams people's logs to the point that the message
> is not useful and only scrolls out other more important
> messages.
>
> I'm not applying this, sorry.
Is it really legit for a driver to spam this message? I hit
this due to bugs in my code that sent pkts to the wrong
driver queue, but aside from that, we rarely if ever see
the message print.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-14 17:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 16:50 [PATCH] net: Ensure tx watchdog failures always print greearb
2011-06-14 17:14 ` Eric Dumazet
2011-06-14 17:25 ` Ben Greear
2011-06-14 17:34 ` David Miller
2011-06-14 17:33 ` David Miller
2011-06-14 17:41 ` Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).