From: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
To: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
Cc: Kalle Valo <kalle.valo-X3B1VOXEql0@public.gmane.org>,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>,
"John W. Linville"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Subject: Re: mac80211: NOHZ: local_softirq_pending 08
Date: Fri, 11 Sep 2009 18:07:39 +0200 [thread overview]
Message-ID: <4AAA75CB.6040803@hartkopp.net> (raw)
In-Reply-To: <200909111707.23971.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
Michael Buesch wrote:
> On Friday 11 September 2009 16:57:54 Kalle Valo wrote:
>> Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> writes:
>>
>>> Hi,
>> Hallo,
>>
>>> mac80211 (or some other part of the networking stack) triggers this
>>> warning in the NOHZ code: NOHZ: local_softirq_pending 08
>>>
>>> 08 seems to be NET_RX_SOFTIRQ.
>>>
>>> It happens, because my test driver b43 handles all RX and TX-status
>>> callbacks in process context. I guess some part of the networking
>>> stack expects RX to be in tasklet and/or softirq context.
>>>
>>> We also have a report of this warning in wl1251, so it's probably not
>>> a b43 problem.
>> Yes, I see this with wl1251. It uses workqueues everywhere.
>>
>
> This patch seems to fix it.
>
> Signed-off-by: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
>
> Index: wireless-testing/net/mac80211/cfg.c
> ===================================================================
> --- wireless-testing.orig/net/mac80211/cfg.c 2009-08-09 18:47:11.000000000 +0200
> +++ wireless-testing/net/mac80211/cfg.c 2009-09-11 16:59:12.000000000 +0200
> @@ -606,7 +606,7 @@ static void ieee80211_send_layer2_update
> skb->dev = sta->sdata->dev;
> skb->protocol = eth_type_trans(skb, sta->sdata->dev);
> memset(skb->cb, 0, sizeof(skb->cb));
> - netif_rx(skb);
> + ieee80211_netif_rx(skb);
> }
>
> static void sta_apply_parameters(struct ieee80211_local *local,
> Index: wireless-testing/net/mac80211/ieee80211_i.h
> ===================================================================
> --- wireless-testing.orig/net/mac80211/ieee80211_i.h 2009-08-23 00:06:41.000000000 +0200
> +++ wireless-testing/net/mac80211/ieee80211_i.h 2009-09-11 17:02:05.000000000 +0200
> @@ -1053,6 +1053,14 @@ void ieee80211_tx_pending(unsigned long
> int ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
> int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);
>
> +/* rx handling */
> +static inline int ieee80211_netif_rx(struct sk_buff *skb)
> +{
> + if (in_interrupt())
> + return netif_rx(skb);
> + return netif_rx_ni(skb);
> +}
> +
Hello Michael,
i know this NOHZ warning from the CAN stack also - but now, i know what caused
this warning. I fixed it in my local tree and it works. Thanks!
As there are several users in the kernel do exact this test and call the
appropriate netif_rx() function, i would suggest to create a static inline
function:
static inline int netif_rx_ti(struct sk_buff *skb)
{
if (in_interrupt())
return netif_rx(skb);
return netif_rx_ni(skb);
}
('ti' for test in_interrupt())
in include/linux/netdevice.h
What do you think about that?
Regards,
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-09-11 16:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 14:48 mac80211: NOHZ: local_softirq_pending 08 Michael Buesch
2009-09-11 14:57 ` Kalle Valo
2009-09-11 15:07 ` Michael Buesch
[not found] ` <200909111707.23971.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2009-09-11 16:07 ` Kalle Valo
2009-09-11 16:07 ` Oliver Hartkopp [this message]
[not found] ` <4AAA75CB.6040803-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2009-09-11 16:13 ` Michael Buesch
2009-09-12 16:41 ` Oliver Hartkopp
[not found] ` <4AABCF28.6090505-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2009-09-12 16:51 ` Michael Buesch
[not found] ` <200909121851.46002.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2009-09-12 18:07 ` Oliver Hartkopp
2009-09-29 19:29 ` John W. Linville
[not found] ` <20090929192928.GF2678-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2009-09-30 11:56 ` Oliver Hartkopp
2009-09-30 14:33 ` Michael Buesch
[not found] ` <200909301633.04376.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2009-09-30 14:47 ` Kalle Valo
2009-09-30 14:54 ` Johannes Berg
[not found] ` <1254322466.3959.5.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-09-30 15:10 ` Michael Buesch
2009-09-30 15:21 ` Johannes Berg
[not found] ` <1254324077.3959.7.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-09-30 17:51 ` Oliver Hartkopp
[not found] ` <4AC39A90.6060602-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2009-09-30 18:18 ` [PATCH] net: fix " Oliver Hartkopp
[not found] ` <4AC3A0F1.3060306-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2009-09-30 18:47 ` John W. Linville
2009-09-30 23:33 ` David Miller
2009-10-01 7:08 ` Oliver Hartkopp
2009-10-01 14:04 ` Michael Buesch
[not found] ` <200910011604.42916.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2009-10-01 14:24 ` Kalle Valo
2009-10-01 18:42 ` Johannes Berg
[not found] ` <1254422548.3959.24.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-10-01 19:10 ` Michael Buesch
[not found] ` <200910012110.34216.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2009-10-01 19:26 ` Johannes Berg
2009-10-01 19:32 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AAA75CB.6040803@hartkopp.net \
--to=socketcan-fj+pqtutwrtk1umjsbkqmq@public.gmane.org \
--cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
--cc=kalle.valo-X3B1VOXEql0@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).