* [PATCH] Fix locking bug in lltx path
@ 2004-09-13 18:11 Andi Kleen
2004-09-13 19:18 ` David S. Miller
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Andi Kleen @ 2004-09-13 18:11 UTC (permalink / raw)
To: davem; +Cc: netdev, arjanv
Thanks to Arjan's spinlock debug kernel for finding it.
This fixes a silly missing spin lock in the relock path. For some
reason it seems to still work when you don't have spinlock debugging
enabled.
Please apply.
-Andi
--------------------------------------------------------------------
Fix missing spin lock in lltx path.
Thanks to Arjan's spinlock debug kernel for finding it.
Signed-off-by: Andi Kleen <ak@muc.de>
diff -u linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X linux-2.6.9rc1-bk19/net/sched/sch_generic.c
--- linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X 2004-09-13 08:51:46.000000000 +0200
+++ linux-2.6.9rc1-bk19/net/sched/sch_generic.c 2004-09-13 19:22:50.000000000 +0200
@@ -153,8 +153,10 @@
spin_lock(&dev->queue_lock);
return -1;
}
- if (ret == -1 && nolock)
+ if (ret == -1 && nolock) {
+ spin_lock(&dev->queue_lock);
goto collision;
+ }
}
/* Release the driver */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix locking bug in lltx path
2004-09-13 18:11 [PATCH] Fix locking bug in lltx path Andi Kleen
@ 2004-09-13 19:18 ` David S. Miller
2004-09-13 19:26 ` Andi Kleen
2004-09-13 19:39 ` Jeff Garzik
2004-09-14 1:43 ` jamal
2 siblings, 1 reply; 6+ messages in thread
From: David S. Miller @ 2004-09-13 19:18 UTC (permalink / raw)
To: Andi Kleen; +Cc: netdev, arjanv
On Mon, 13 Sep 2004 20:11:00 +0200
Andi Kleen <ak@muc.de> wrote:
> Thanks to Arjan's spinlock debug kernel for finding it.
>
> This fixes a silly missing spin lock in the relock path. For some
> reason it seems to still work when you don't have spinlock debugging
> enabled.
>
> Please apply.
Good catch, but I'll need to fix this up to use the new macros
defined in linux/netdevice.h
Thanks again.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix locking bug in lltx path
2004-09-13 19:18 ` David S. Miller
@ 2004-09-13 19:26 ` Andi Kleen
2004-09-13 20:02 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2004-09-13 19:26 UTC (permalink / raw)
To: David S. Miller; +Cc: Andi Kleen, netdev, arjanv
On Mon, Sep 13, 2004 at 12:18:59PM -0700, David S. Miller wrote:
> On Mon, 13 Sep 2004 20:11:00 +0200
> Andi Kleen <ak@muc.de> wrote:
>
> > Thanks to Arjan's spinlock debug kernel for finding it.
> >
> > This fixes a silly missing spin lock in the relock path. For some
> > reason it seems to still work when you don't have spinlock debugging
> > enabled.
> >
> > Please apply.
>
> Good catch, but I'll need to fix this up to use the new macros
> defined in linux/netdevice.h
Ok, do you want me to send a new patch with that?
I don't think the new macros are in -bk* snapshots yet,
and getting it otherwise is difficult for me.
It's probably fastest if you just apply it by hand.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix locking bug in lltx path
2004-09-13 18:11 [PATCH] Fix locking bug in lltx path Andi Kleen
2004-09-13 19:18 ` David S. Miller
@ 2004-09-13 19:39 ` Jeff Garzik
2004-09-14 1:43 ` jamal
2 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2004-09-13 19:39 UTC (permalink / raw)
To: Andi Kleen; +Cc: davem, netdev, arjanv
Andi Kleen wrote:
> Thanks to Arjan's spinlock debug kernel for finding it.
>
> This fixes a silly missing spin lock in the relock path. For some
> reason it seems to still work when you don't have spinlock debugging
> enabled.
>
> Please apply.
>
> -Andi
>
> --------------------------------------------------------------------
>
> Fix missing spin lock in lltx path.
>
> Thanks to Arjan's spinlock debug kernel for finding it.
>
> Signed-off-by: Andi Kleen <ak@muc.de>
>
> diff -u linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X linux-2.6.9rc1-bk19/net/sched/sch_generic.c
> --- linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X 2004-09-13 08:51:46.000000000 +0200
> +++ linux-2.6.9rc1-bk19/net/sched/sch_generic.c 2004-09-13 19:22:50.000000000 +0200
> @@ -153,8 +153,10 @@
> spin_lock(&dev->queue_lock);
> return -1;
> }
> - if (ret == -1 && nolock)
> + if (ret == -1 && nolock) {
> + spin_lock(&dev->queue_lock);
> goto collision;
> + }
please use the fancy new constants :)
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix locking bug in lltx path
2004-09-13 19:26 ` Andi Kleen
@ 2004-09-13 20:02 ` David S. Miller
0 siblings, 0 replies; 6+ messages in thread
From: David S. Miller @ 2004-09-13 20:02 UTC (permalink / raw)
To: Andi Kleen; +Cc: ak, netdev, arjanv
On Mon, 13 Sep 2004 21:26:49 +0200
Andi Kleen <ak@suse.de> wrote:
> On Mon, Sep 13, 2004 at 12:18:59PM -0700, David S. Miller wrote:
> > On Mon, 13 Sep 2004 20:11:00 +0200
> > Andi Kleen <ak@muc.de> wrote:
> >
> > > Thanks to Arjan's spinlock debug kernel for finding it.
> > >
> > > This fixes a silly missing spin lock in the relock path. For some
> > > reason it seems to still work when you don't have spinlock debugging
> > > enabled.
> > >
> > > Please apply.
> >
> > Good catch, but I'll need to fix this up to use the new macros
> > defined in linux/netdevice.h
>
> Ok, do you want me to send a new patch with that?
I'll take care of it.
> I don't think the new macros are in -bk* snapshots yet,
> and getting it otherwise is difficult for me.
It's in 2.6.9-rc2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix locking bug in lltx path
2004-09-13 18:11 [PATCH] Fix locking bug in lltx path Andi Kleen
2004-09-13 19:18 ` David S. Miller
2004-09-13 19:39 ` Jeff Garzik
@ 2004-09-14 1:43 ` jamal
2 siblings, 0 replies; 6+ messages in thread
From: jamal @ 2004-09-14 1:43 UTC (permalink / raw)
To: Andi Kleen; +Cc: David S. Miller, netdev, arjanv
Finaly got around to testing today and got bitten by this (was planning
to send patch);->
In any case, some good news: one of the NICs tested was e1000 with and
without LLTX pure forwarding (eth0->eth1 and eth1->eth0, 64 byte packets
beating up the interfaces at 1/48Mpps): did not see
much difference between the two. There did seem to be some latency
improvements (in the range of 50 microsecs or so for the LLTX but could
be experimental error, needs more validation).
I think perhaps a case where multi processors fanning into one NIC would
be a better test to see the value of LLTX.
The good news (for me) is it doesnt seem to affect things negatively.
[We saw some corrupt netpoll packets but that could be something else
broken].
cheers,
jamal
On Mon, 2004-09-13 at 14:11, Andi Kleen wrote:
> Thanks to Arjan's spinlock debug kernel for finding it.
>
> This fixes a silly missing spin lock in the relock path. For some
> reason it seems to still work when you don't have spinlock debugging
> enabled.
>
> Please apply.
>
> -Andi
>
> --------------------------------------------------------------------
>
> Fix missing spin lock in lltx path.
>
> Thanks to Arjan's spinlock debug kernel for finding it.
>
> Signed-off-by: Andi Kleen <ak@muc.de>
>
> diff -u linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X linux-2.6.9rc1-bk19/net/sched/sch_generic.c
> --- linux-2.6.9rc1-bk19/net/sched/sch_generic.c-X 2004-09-13 08:51:46.000000000 +0200
> +++ linux-2.6.9rc1-bk19/net/sched/sch_generic.c 2004-09-13 19:22:50.000000000 +0200
> @@ -153,8 +153,10 @@
> spin_lock(&dev->queue_lock);
> return -1;
> }
> - if (ret == -1 && nolock)
> + if (ret == -1 && nolock) {
> + spin_lock(&dev->queue_lock);
> goto collision;
> + }
> }
>
> /* Release the driver */
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-14 1:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-13 18:11 [PATCH] Fix locking bug in lltx path Andi Kleen
2004-09-13 19:18 ` David S. Miller
2004-09-13 19:26 ` Andi Kleen
2004-09-13 20:02 ` David S. Miller
2004-09-13 19:39 ` Jeff Garzik
2004-09-14 1:43 ` jamal
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).