linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Amir Levy <amir.jer.levy@intel.com>,
	andreas.noever@gmail.com, bhelgaas@google.com, corbet@lwn.net,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	thunderbolt-linux@intel.com, mika.westerberg@intel.com,
	tomas.winkler@intel.com
Subject: Re: [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware)
Date: Fri, 29 Jul 2016 14:48:38 -0700	[thread overview]
Message-ID: <20160729214838.GA14827@kroah.com> (raw)
In-Reply-To: <20160729140224.137dbaac@xeon-e3>

On Fri, Jul 29, 2016 at 02:02:24PM -0700, Stephen Hemminger wrote:
> On Thu, 28 Jul 2016 11:15:17 +0300
> Amir Levy <amir.jer.levy@intel.com> wrote:
> 
> > +static LIST_HEAD(controllers_list);
> > +static DECLARE_RWSEM(controllers_list_rwsem);
> 
> Why use a semaphore when simple spinlock or mutex would be better?

And never use a RW semaphore unless you can benchmark the difference
from a normal lock.  If you can't benchmark it, then don't use it...

  reply	other threads:[~2016-07-29 21:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28  8:15 [PATCH v5 0/8] thunderbolt: Introducing Thunderbolt(TM) networking Amir Levy
2016-07-28  8:15 ` [PATCH v5 1/8] thunderbolt: Macro rename Amir Levy
2016-07-28  8:15 ` [PATCH v5 2/8] thunderbolt: Updating the register definitions Amir Levy
2016-07-28  8:15 ` [PATCH v5 3/8] thunderbolt: Kconfig for Thunderbolt(TM) networking Amir Levy
2016-07-28  8:15 ` [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware) Amir Levy
2016-07-29 21:02   ` Stephen Hemminger
2016-07-29 21:48     ` Greg KH [this message]
2016-07-31 10:18       ` Levy, Amir (Jer)
2016-07-29 21:03   ` Stephen Hemminger
2016-07-31 12:07     ` Levy, Amir (Jer)
2016-07-28  8:15 ` [PATCH v5 5/8] thunderbolt: Networking state machine Amir Levy
2016-07-28 11:35   ` Lukas Wunner
2016-07-31 11:58     ` Levy, Amir (Jer)
2016-07-28  8:15 ` [PATCH v5 6/8] thunderbolt: Networking transmit and receive Amir Levy
2016-07-29 21:07   ` Stephen Hemminger
2016-07-31 10:15     ` Levy, Amir (Jer)
2016-07-31 18:45       ` David Miller
2016-08-01  4:30         ` Levy, Amir (Jer)
2016-07-28  8:15 ` [PATCH v5 7/8] thunderbolt: Networking doc Amir Levy
2016-07-28  8:15 ` [PATCH v5 8/8] thunderbolt: Adding maintainer entry Amir Levy

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=20160729214838.GA14827@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=amir.jer.levy@intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=thunderbolt-linux@intel.com \
    --cc=tomas.winkler@intel.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).