[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1337107245.15553.14.camel@jlt3.sipsolutions.net>
Date: Tue, 15 May 2012 20:40:45 +0200
From: Johannes Berg <johannes@...solutions.net>
To: David Miller <davem@...emloft.net>
Cc: joe@...ches.com, netdev@...r.kernel.org,
linux-decnet-user@...ts.sourceforge.net,
netfilter-devel@...r.kernel.org, netfilter@...r.kernel.org,
coreteam@...filter.org, linux-wireless@...r.kernel.org,
dev@...nvswitch.org, linux-sctp@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC net-next 0/2] net: Use net_<level>_ratelimit
On Tue, 2012-05-15 at 14:29 -0400, David Miller wrote:
> From: Johannes Berg <johannes@...solutions.net>
> Date: Tue, 15 May 2012 20:27:10 +0200
>
> > On Tue, 2012-05-15 at 10:59 -0700, Joe Perches wrote:
> >
> >> OK, but fyi, there's a possible issue with !CONFIG_DEBUG
> >> builds because these patches converted some uses of
> >> if (net_ratelimit())
> >> printk(KERN_DEBUG ...
> >> to
> >> net_dbg_ratelimited()
> >>
> >> These messages are no longer emitted when DEBUG isn't defined
> >> and not using dynamic_debug. I'm not sure that's a real
> >> problem, but it's a difference.
> >>
> >> I could produce a net_printk_ratelimited that would keep
> >> the original behavior if necessary.
> >>
> >> net_printk_ratelimited(KERN_DEBUG etc...)
> >
> > Btw, what would the difference be to just plain printk_ratelimited()?
>
> printk_ratelimited() drops a local ratelimit cookie into each call-site,
> whereas we have a global one for the networking which these new interfaces
> use.
>
> Joe explained this completely in his 0/2 patch posting.
I don't see that explicitly mentioned, but it doesn't matter much
anyway.
In the mac80211 case, messages are warnings/hints to the user, we just
don't want them to flood the logs too much. I'd rather have that kind of
change (limit cookie per callsite) in the rate limiting semantics than
the change in the when it gets printed at all.
I simply feel that obscuring the debugging even further wouldn't be a
good thing to do right now. I'd rather have somebody convert all of it
to the new debugging infrastructure but that seems a lot more effort
than changing these back to something that isn't impacted by dynamic
printk.
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists