* RPS vs. hard-irq-context netif_rx()
@ 2010-07-30 13:03 Johannes Berg
2010-07-30 13:21 ` Johannes Berg
2010-08-17 11:52 ` Luca Tettamanti
0 siblings, 2 replies; 4+ messages in thread
From: Johannes Berg @ 2010-07-30 13:03 UTC (permalink / raw)
To: netdev
I got the following on a kvm instance I use for testing:
[ 51.358803] WARNING: at kernel/lockdep.c:2327 trace_hardirqs_on_caller+0x167/0x200()
[ 51.360210] Hardware name: Bochs
[ 51.360210] Modules linked in:
[ 51.360210] Pid: 1546, comm: dhclient3 Tainted: G W 2.6.35-rc6-wl+ #588
[ 51.360210] Call Trace:
[ 51.360210] <IRQ> [<ffffffff8104e87f>] warn_slowpath_common+0x7f/0xc0
[ 51.360210] [<ffffffff8104e8da>] warn_slowpath_null+0x1a/0x20
[ 51.360210] [<ffffffff81087977>] trace_hardirqs_on_caller+0x167/0x200
[ 51.360210] [<ffffffff81087a1d>] trace_hardirqs_on+0xd/0x10
[ 51.360210] [<ffffffff81056ade>] local_bh_enable+0x9e/0x130
[ 51.360210] [<ffffffff8139fa82>] netif_rx+0xc2/0x250
[ 51.360210] [<ffffffff813146d7>] ei_receive+0x1b7/0x2c0
[ 51.360210] [<ffffffff81314ca2>] __ei_interrupt+0x282/0x360
[ 51.360210] [<ffffffff81314dce>] ei_interrupt+0xe/0x10
[ 51.360210] [<ffffffff810abe85>] handle_IRQ_event+0x85/0x300
[ 51.360210] [<ffffffff810aead5>] handle_level_irq+0x95/0x120
[ 51.360210] [<ffffffff81005a12>] handle_irq+0x22/0x30
[ 51.360210] [<ffffffff814394b3>] do_IRQ+0x73/0xf0
...
The reason seems to be that
* RCU_TREE uses local_bh_disable/enable
* CONFIG_RPS uses RCU within netif_rx()
* the driver I'm using calls netif_rx() within the irq context
So .. where's the bug? I'd point to CONFIG_RPS since it's newest.
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RPS vs. hard-irq-context netif_rx()
2010-07-30 13:03 RPS vs. hard-irq-context netif_rx() Johannes Berg
@ 2010-07-30 13:21 ` Johannes Berg
2010-08-17 11:52 ` Luca Tettamanti
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2010-07-30 13:21 UTC (permalink / raw)
To: netdev
On Fri, 2010-07-30 at 15:03 +0200, Johannes Berg wrote:
> The reason seems to be that
> * RCU_TREE uses local_bh_disable/enable
> * CONFIG_RPS uses RCU within netif_rx()
> * the driver I'm using calls netif_rx() within the irq context
>
> So .. where's the bug? I'd point to CONFIG_RPS since it's newest.
Disabling RPS gives me the same result due to netpoll since
commit de85d99eb7b595f6751550184b94c1e2f74a828b
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu Jun 10 16:12:44 2010 +0000
netpoll: Fix RCU usage
Disabling netpoll as well gets me a warning-free boot, but I suspect
that's not really what it should be like...
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RPS vs. hard-irq-context netif_rx()
2010-07-30 13:03 RPS vs. hard-irq-context netif_rx() Johannes Berg
2010-07-30 13:21 ` Johannes Berg
@ 2010-08-17 11:52 ` Luca Tettamanti
2010-08-17 14:54 ` Eric Dumazet
1 sibling, 1 reply; 4+ messages in thread
From: Luca Tettamanti @ 2010-08-17 11:52 UTC (permalink / raw)
To: netdev; +Cc: Johannes Berg
> I got the following on a kvm instance I use for testing:
>
> [ 51.358803] WARNING: at kernel/lockdep.c:2327trace_hardirqs_on_caller+0x167/0x200()
> [ 51.360210] Hardware name: Bochs
> [ 51.360210] Modules linked in:
> [ 51.360210] Pid: 1546, comm: dhclient3 Tainted: G W 2.6.35-rc6-wl+ #588
> [ 51.360210] Call Trace:
> [ 51.360210] <IRQ> [<ffffffff8104e87f>] warn_slowpath_common+0x7f/0xc0
> [ 51.360210] [<ffffffff8104e8da>] warn_slowpath_null+0x1a/0x20
> [ 51.360210] [<ffffffff81087977>] trace_hardirqs_on_caller+0x167/0x200
> [ 51.360210] [<ffffffff81087a1d>] trace_hardirqs_on+0xd/0x10
> [ 51.360210] [<ffffffff81056ade>] local_bh_enable+0x9e/0x130
> [ 51.360210] [<ffffffff8139fa82>] netif_rx+0xc2/0x250
> [ 51.360210] [<ffffffff813146d7>] ei_receive+0x1b7/0x2c0
> [ 51.360210] [<ffffffff81314ca2>] __ei_interrupt+0x282/0x360
> [ 51.360210] [<ffffffff81314dce>] ei_interrupt+0xe/0x10
> [ 51.360210] [<ffffffff810abe85>] handle_IRQ_event+0x85/0x300
> [ 51.360210] [<ffffffff810aead5>] handle_level_irq+0x95/0x120
> [ 51.360210] [<ffffffff81005a12>] handle_irq+0x22/0x30
> [ 51.360210] [<ffffffff814394b3>] do_IRQ+0x73/0xf0
[...]
>So .. where's the bug? I'd point to CONFIG_RPS since it's newest.
Hello,
I just hit the same warning, with 2.6.36-rc1:
[ 228.001459] WARNING: at /home/kronos/src/linux-2.6.git/kernel/softirq.c:143 local_bh_enable+0x3c/0x9a()
[ 228.004096] Hardware name: F3Sa
[ 228.004175] Modules linked in: [...]
[ 228.015974] Pid: 2818, comm: irqbalance Not tainted 2.6.36-rc1 #274
[ 228.015974] Call Trace:
[ 228.015974] <IRQ> [<ffffffff81034b32>] warn_slowpath_common+0x80/0x98
[ 228.015974] [<ffffffff81034b5f>] warn_slowpath_null+0x15/0x17
[ 228.015974] [<ffffffff8103a009>] local_bh_enable+0x3c/0x9a
[ 228.015974] [<ffffffff8120dc16>] netif_rx+0x75/0x145
[ 228.015974] [<ffffffff8115162f>] ? unmap_single+0x4a/0x52
[ 228.015974] [<ffffffff811e7fcd>] atl1_intr+0x96c/0xa35
[ 228.015974] [<ffffffff8104edf4>] ? hrtimer_wakeup+0x0/0x21
[ 228.015974] [<ffffffff810707b2>] handle_IRQ_event+0x20/0x9a
[ 228.015974] [<ffffffff810723ba>] handle_edge_irq+0xf5/0x141
[ 228.015974] [<ffffffff81004d53>] handle_irq+0x83/0x8c
[ 228.015974] [<ffffffff81004332>] do_IRQ+0x5e/0xc4
[ 228.015974] [<ffffffff812843d3>] ret_from_intr+0x0/0xa
CONFIG_TREE_RCU=y
CONFIG_RPS=y
I never saw the warning with 2.6.35 and earlier kernels though.
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RPS vs. hard-irq-context netif_rx()
2010-08-17 11:52 ` Luca Tettamanti
@ 2010-08-17 14:54 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2010-08-17 14:54 UTC (permalink / raw)
To: Luca Tettamanti; +Cc: netdev, Johannes Berg
Le mardi 17 août 2010 à 13:52 +0200, Luca Tettamanti a écrit :
> > I got the following on a kvm instance I use for testing:
> >
> > [ 51.358803] WARNING: at kernel/lockdep.c:2327trace_hardirqs_on_caller+0x167/0x200()
> > [ 51.360210] Hardware name: Bochs
> > [ 51.360210] Modules linked in:
> > [ 51.360210] Pid: 1546, comm: dhclient3 Tainted: G W 2.6.35-rc6-wl+ #588
> > [ 51.360210] Call Trace:
> > [ 51.360210] <IRQ> [<ffffffff8104e87f>] warn_slowpath_common+0x7f/0xc0
> > [ 51.360210] [<ffffffff8104e8da>] warn_slowpath_null+0x1a/0x20
> > [ 51.360210] [<ffffffff81087977>] trace_hardirqs_on_caller+0x167/0x200
> > [ 51.360210] [<ffffffff81087a1d>] trace_hardirqs_on+0xd/0x10
> > [ 51.360210] [<ffffffff81056ade>] local_bh_enable+0x9e/0x130
> > [ 51.360210] [<ffffffff8139fa82>] netif_rx+0xc2/0x250
> > [ 51.360210] [<ffffffff813146d7>] ei_receive+0x1b7/0x2c0
> > [ 51.360210] [<ffffffff81314ca2>] __ei_interrupt+0x282/0x360
> > [ 51.360210] [<ffffffff81314dce>] ei_interrupt+0xe/0x10
> > [ 51.360210] [<ffffffff810abe85>] handle_IRQ_event+0x85/0x300
> > [ 51.360210] [<ffffffff810aead5>] handle_level_irq+0x95/0x120
> > [ 51.360210] [<ffffffff81005a12>] handle_irq+0x22/0x30
> > [ 51.360210] [<ffffffff814394b3>] do_IRQ+0x73/0xf0
> [...]
> >So .. where's the bug? I'd point to CONFIG_RPS since it's newest.
>
> Hello,
> I just hit the same warning, with 2.6.36-rc1:
>
> [ 228.001459] WARNING: at /home/kronos/src/linux-2.6.git/kernel/softirq.c:143 local_bh_enable+0x3c/0x9a()
> [ 228.004096] Hardware name: F3Sa
> [ 228.004175] Modules linked in: [...]
> [ 228.015974] Pid: 2818, comm: irqbalance Not tainted 2.6.36-rc1 #274
> [ 228.015974] Call Trace:
> [ 228.015974] <IRQ> [<ffffffff81034b32>] warn_slowpath_common+0x80/0x98
> [ 228.015974] [<ffffffff81034b5f>] warn_slowpath_null+0x15/0x17
> [ 228.015974] [<ffffffff8103a009>] local_bh_enable+0x3c/0x9a
> [ 228.015974] [<ffffffff8120dc16>] netif_rx+0x75/0x145
> [ 228.015974] [<ffffffff8115162f>] ? unmap_single+0x4a/0x52
> [ 228.015974] [<ffffffff811e7fcd>] atl1_intr+0x96c/0xa35
> [ 228.015974] [<ffffffff8104edf4>] ? hrtimer_wakeup+0x0/0x21
> [ 228.015974] [<ffffffff810707b2>] handle_IRQ_event+0x20/0x9a
> [ 228.015974] [<ffffffff810723ba>] handle_edge_irq+0xf5/0x141
> [ 228.015974] [<ffffffff81004d53>] handle_irq+0x83/0x8c
> [ 228.015974] [<ffffffff81004332>] do_IRQ+0x5e/0xc4
> [ 228.015974] [<ffffffff812843d3>] ret_from_intr+0x0/0xa
>
> CONFIG_TREE_RCU=y
> CONFIG_RPS=y
>
> I never saw the warning with 2.6.35 and earlier kernels though.
This is a known problem, related to netpoll
http://www.kerneltrap.com/mailarchive/linux-netdev/2010/8/10/6282780
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-17 14:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30 13:03 RPS vs. hard-irq-context netif_rx() Johannes Berg
2010-07-30 13:21 ` Johannes Berg
2010-08-17 11:52 ` Luca Tettamanti
2010-08-17 14:54 ` Eric Dumazet
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).