All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andrei Vagin <avagin@virtuozzo.com>
Cc: "Nambiar, Amritha" <amritha.nambiar@intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	netdev@vger.kernel.org, davem@davemloft.net,
	alexander.h.duyck@intel.com, willemdebruijn.kernel@gmail.com,
	sridhar.samudrala@intel.com, alexander.duyck@gmail.com,
	edumazet@google.com, hannes@stressinduktion.org,
	tom@herbertland.com, tom@quantonium.net, jasowang@redhat.com,
	gaowanlong@cn.fujitsu.com
Subject: Re: [net-next, v6, 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue
Date: Thu, 19 Jul 2018 11:16:07 +0200	[thread overview]
Message-ID: <20180719091607.GZ2494@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180718182235.GA28548@outlook.office365.com>

On Wed, Jul 18, 2018 at 11:22:36AM -0700, Andrei Vagin wrote:
> > > [    1.085679]   lock(cpu_hotplug_lock.rw_sem);
> > > [    1.085753]   lock(cpu_hotplug_lock.rw_sem);
> > > [    1.085828] 
> > > [    1.085828]  *** DEADLOCK ***

> Peter and Ingo, maybe you could explain why it isn't safe to take one
> reader lock twice?

Very simple, because rwsems are fair and !recursive.

So if another CPU were to issue a write-lock in between these, then the
second would block because there is a writer pending. But because we
then already have a reader we're deadlocked.

  parent reply	other threads:[~2018-07-19  9:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30  4:26 [net-next PATCH v6 0/7] Symmetric queue selection using XPS for Rx queues Amritha Nambiar
2018-06-30  4:26 ` [net-next PATCH v6 1/7] net: Refactor XPS for CPUs and " Amritha Nambiar
2018-06-30  4:26 ` [net-next PATCH v6 2/7] net: Use static_key for XPS maps Amritha Nambiar
2018-06-30  4:26 ` [net-next PATCH v6 3/7] net: sock: Change tx_queue_mapping in sock_common to unsigned short Amritha Nambiar
2018-06-30  4:26 ` [net-next PATCH v6 4/7] net: Record receive queue number for a connection Amritha Nambiar
2018-06-30  4:27 ` [net-next PATCH v6 5/7] net: Enable Tx queue selection based on Rx queues Amritha Nambiar
2018-06-30  4:27 ` [net-next PATCH v6 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue Amritha Nambiar
2018-07-04  7:20   ` [net-next, v6, " Andrei Vagin
2018-07-11  2:28     ` Nambiar, Amritha
2018-07-18 18:22       ` Andrei Vagin
2018-07-18 19:24         ` Stephen Hemminger
2018-07-19  9:16         ` Peter Zijlstra [this message]
2018-08-02  0:11       ` Andrei Vagin
2018-08-02 21:04         ` Nambiar, Amritha
2018-08-02 21:08           ` Michael S. Tsirkin
2018-08-02 21:08           ` Michael S. Tsirkin
2018-08-03 19:06             ` Andrei Vagin
2018-08-03 19:12               ` Michael S. Tsirkin
2018-08-03 21:19                 ` Andrei Vagin
2018-08-04  4:30                 ` Andrei Vagin
2018-08-03 19:12               ` Michael S. Tsirkin
2018-06-30  4:27 ` [net-next PATCH v6 7/7] Documentation: Add explanation for XPS using Rx-queue(s) map Amritha Nambiar
2018-07-02  0:11 ` [net-next PATCH v6 0/7] Symmetric queue selection using XPS for Rx queues 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=20180719091607.GZ2494@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=avagin@virtuozzo.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=hannes@stressinduktion.org \
    --cc=jasowang@redhat.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sridhar.samudrala@intel.com \
    --cc=tom@herbertland.com \
    --cc=tom@quantonium.net \
    --cc=willemdebruijn.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.