From: Christoph Paasch <christoph.paasch@uclouvain.be>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: g@neilslaptop.think-freely.org,
Bart Van Assche <bvanassche@acm.org>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH RFC] spinlock: split out debugging check from spin_lock_mutex
Date: Thu, 11 Apr 2013 19:51:20 +0200 [thread overview]
Message-ID: <3142935.JcJEKt2WmH@cpaasch-mac> (raw)
In-Reply-To: <20130411170404.GE8986@neilslaptop.think-freely.org>
On Thursday 11 April 2013 13:04:05 Neil Horman wrote:
> I dont believe the deadlock you describe can happen. The spin_lock_mutex
> operation disables irqs on the local cpu with local_irq_save, so we won't
> loose the cpu while we're holding the spinlock. Likewise we don't restore
> the irq flags until after we release said lock. Once we have the mutex, if
> we're preempted by another path that goes through the netpoll_poll_dev
> path, then we hit the trylock api call. The spinlock is either released or
> held on another cpu (read: no deadlock), and if the mutex is held, then the
> trylock simply fails.
Thanks for explaining this to me. I was looking for a local_bh_disable() - but
local_irq_save does the job too.
Thanks,
Christoph
--
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://multipath-tcp.org
UCLouvain
--
next prev parent reply other threads:[~2013-04-11 17:51 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 13:42 Netpoll triggers soft lockup Bart Van Assche
2013-04-11 14:08 ` Neil Horman
2013-04-11 15:18 ` [PATCH RFC] spinlock: split out debugging check from spin_lock_mutex Neil Horman
2013-04-11 15:54 ` Christoph Paasch
2013-04-11 17:04 ` Neil Horman
2013-04-11 17:51 ` Christoph Paasch [this message]
2013-04-11 15:57 ` Eric Dumazet
2013-04-11 16:56 ` Neil Horman
2013-04-11 17:31 ` Bart Van Assche
2013-04-11 17:52 ` Neil Horman
2013-04-11 19:14 ` Neil Horman
2013-04-12 6:27 ` Bart Van Assche
2013-04-12 11:32 ` Neil Horman
2013-04-12 14:01 ` Bart Van Assche
2013-04-12 18:45 ` Neil Horman
2013-04-13 7:35 ` Bart Van Assche
2013-04-13 12:03 ` Neil Horman
2013-04-15 14:16 ` Neil Horman
[not found] ` <CAO+b5-oBfH3M0dnrQSs-p1BF_5hKy2tsU-dD=EP9+S=iqPs5ew@mail.gmail.com>
2013-04-16 17:24 ` Neil Horman
2013-04-18 19:29 ` Neil Horman
2013-04-22 20:12 ` Neil Horman
[not found] ` <CAO+b5-r5jVJNZWuREUH5MQ3baeSPR8fVV1p9pMnukmiZd9nRhg@mail.gmail.com>
2013-04-23 13:23 ` Neil Horman
[not found] ` <CAO+b5-rQPyO9QE9v+oQTeo+G-ftcsehSB5=63AZ13QW4EJ1X0Q@mail.gmail.com>
2013-04-23 13:44 ` Neil Horman
2013-04-23 17:33 ` David Miller
2013-04-23 17:50 ` Neil Horman
2013-04-27 18:53 ` bvba Bart Van Assche
2013-04-29 18:13 ` Neil Horman
2013-04-29 19:12 ` Bart Van Assche
2013-04-30 15:35 ` [PATCH RFC] netpoll: convert mutex into a semaphore Neil Horman
2013-05-01 19:00 ` David Miller
2013-05-01 19:34 ` Neil Horman
2013-04-19 8:38 ` [PATCH RFC] spinlock: split out debugging check from spin_lock_mutex Ingo Molnar
2013-04-19 12:52 ` Neil Horman
2013-04-28 2:34 Neil Horman
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=3142935.JcJEKt2WmH@cpaasch-mac \
--to=christoph.paasch@uclouvain.be \
--cc=bvanassche@acm.org \
--cc=davem@davemloft.net \
--cc=g@neilslaptop.think-freely.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
/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).