From: Neil Horman <nhorman@tuxdriver.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, klassert@mathematik.tu-chemnitz.de
Subject: Re: [PATCH] 3c59x: fix deadlock when using netconsole with 3c59x
Date: Tue, 10 Aug 2010 21:16:42 -0400 [thread overview]
Message-ID: <20100811011642.GA2060@localhost.localdomain> (raw)
In-Reply-To: <20100810.164803.13754555.davem@davemloft.net>
On Tue, Aug 10, 2010 at 04:48:03PM -0700, David Miller wrote:
> From: Neil Horman <nhorman@tuxdriver.com>
> Date: Mon, 9 Aug 2010 12:32:10 -0400
>
> > When using netpoll, its possible to deadlock the 3c59x driver. Since it takes
> > an internal spinlock (vp->lock) that serializes boomerang_interrupt and parts
> > of boomerang_start_xmit, if we call pr_debug in the former, we can go through
> > the tx path on the same cpu, and recurse into the same driver again, deadlocking
> > in the transmit routine.
> >
> > This patch fixes that problem by stopping the queues during interrupt
> > processing, so that subsequent transmits will get queued until a later point.
> > Its not a great solution, but we need to find some way to serialize access to
> > the register file on the card without enforcing a deadlock. I think the queue
> > stop is the best way to do that. And since we only print things in
> > boomerang_interrupt when we have debug enabled, we can mitigate the impact of
> > this change to only stop the queues when debug is on.
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>
> Nothing serialized changes to "vortex_debug" with the tests you're
> making here. Simply turning it off when a packet arrives can deadlock
> the send queue of the device.
>
> Even if proper serializatio did exist, I still see this as an awful
> solution.
>
> And the default value of this thing is "1" so it's always going to be
> doing this send queue state flipping for effectively everyone.
>
> Please find another way to solve this problem.
>
Crap-spackle, you're right. I was thinking the module_param defaulted it to
zero, but it doesn't. Regardless, sysfs would let us change this value and
deadlock it all to heck.
Recinded. I'll find a better way to fix this. Sorry for the noise
Neil
prev parent reply other threads:[~2010-08-11 1:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 16:32 [PATCH] 3c59x: fix deadlock when using netconsole with 3c59x Neil Horman
2010-08-10 23:48 ` David Miller
2010-08-11 1:16 ` Neil Horman [this message]
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=20100811011642.GA2060@localhost.localdomain \
--to=nhorman@tuxdriver.com \
--cc=davem@davemloft.net \
--cc=klassert@mathematik.tu-chemnitz.de \
--cc=netdev@vger.kernel.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).