From: Simon Kagstrom <simon.kagstrom@netinsight.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, davej@redhat.com, ben@decadent.org.uk
Subject: Re: [PATCH 0/3]: via-velocity: Fixes for locking issues
Date: Wed, 10 Feb 2010 10:33:58 +0100 [thread overview]
Message-ID: <20100210103358.41a45851@marrow.netinsight.se> (raw)
In-Reply-To: <20100209.163133.38216503.davem@davemloft.net>
Hi David!
Thanks for the comments, I understand the problem more clearly now.
On Tue, 09 Feb 2010 16:31:33 -0800 (PST)
David Miller <davem@davemloft.net> wrote:
> The proper thing to do is make the ->poll() handler use the lock
> correctly by disabling interrupts.
In reply to this message is an updated patch series which uses
spin_lock_irqsave/restore in velocity_poll instead.
> If the VIA driver wants to avoid holding interrupts disabled for long
> periods of time in ->poll(), it's locking mechanisms will need to be
> rewritten completely. The only safe way to do this is to do something
> like how the tg3 driver works, wherein the interrupt handler runs
> lockless, there is a special IRQ quiesce sequence when shutting down
> the chip, and the ->poll() handler et al. use softirq safe locks
> instead of hardirq safe ones.
Yes, I guess that would be the long-term solution for this driver. The
main problem with running the interrupt handler unlocked now is the
error handler, which is executed directly from the interrupt handler.
Anyway, when you are happy with the patch series, I think it is 2.6.33
material as the velocity driver would otherwise contain a regression
compared to 2.6.32.
Changes in the patch series:
* Patch 1: Unchanged
* Patch 2: Unchanged
* Patch 3: Use spin_lock_irqsave in velocity_poll and remove
spin_trylock from the interrupt handler.
As before, I'm only able to test it on a uniprocessor with spinlock
debugging turned on. With the patch set, I can no longer get it to
lockup when running heavy traffic for both interrupt sources (which was
easy without the patches).
Thanks,
// Simon
next prev parent reply other threads:[~2010-02-10 9:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 15:52 [PATCH 0/3]: via-velocity: Fixes for locking issues Simon Kagstrom
2010-02-05 15:54 ` [PATCH 1/3] via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv Simon Kagstrom
2010-02-05 15:55 ` [PATCH 2/3] via-velocity: Take spinlock on set coalesce Simon Kagstrom
2010-02-05 15:55 ` [PATCH 3/3] via-velocity: Fix races on shared interrupts Simon Kagstrom
2010-02-10 17:41 ` Laurent Chavey
2010-02-11 8:05 ` Simon Kagstrom
2010-02-10 0:31 ` [PATCH 0/3]: via-velocity: Fixes for locking issues David Miller
2010-02-10 9:33 ` Simon Kagstrom [this message]
2010-02-10 9:37 ` [PATCH v2 1/3] via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv Simon Kagstrom
2010-02-10 9:38 ` [PATCH v2 2/3] via-velocity: Take spinlock on set coalesce Simon Kagstrom
2010-02-10 9:38 ` [PATCH v2 3/3] via-velocity: Fix races on shared interrupts Simon Kagstrom
2010-02-10 18:55 ` [PATCH 0/3]: via-velocity: Fixes for locking issues 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=20100210103358.41a45851@marrow.netinsight.se \
--to=simon.kagstrom@netinsight.net \
--cc=ben@decadent.org.uk \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--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).