From: David Miller <davem@davemloft.net>
To: sowmini.varadhan@oracle.com
Cc: netdev@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: [PATCHv5 3/4] sparc64: Avoid irqsave/restore on vio.lock if in_softirq()
Date: Sat, 25 Oct 2014 14:28:22 -0400 (EDT) [thread overview]
Message-ID: <20141025.142822.141874034124023889.davem@davemloft.net> (raw)
In-Reply-To: <20141022221245.GE17252@oracle.com>
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Wed, 22 Oct 2014 18:12:45 -0400
>
> For NAPIfied drivers , there is no need to
> synchronize by doing irqsave/restore on vio.lock in the I/O
> path.
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Conditional locking is broken locking, and the bug you introduce
here is a good example of why that is.
If the vio->timer has to be triggered when vio_port_up() is
invoked, it will next run fron in_softirq() context regardless
of whether the user is sunvnet or sunvdc. So it will elide
the locking regardless of who is using this vio context.
Never, ever, use conditional locking.
This locking is harmless overhead in a slow path, just leave
it alone for now.
prev parent reply other threads:[~2014-10-25 18:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 22:12 [PATCHv5 3/4] sparc64: Avoid irqsave/restore on vio.lock if in_softirq() Sowmini Varadhan
2014-10-25 18:28 ` David Miller [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=20141025.142822.141874034124023889.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sowmini.varadhan@oracle.com \
--cc=sparclinux@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).