public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: dsterba@suse.com, linux-kernel@vger.kernel.org,
	Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH] fs/affs: Replace binary semaphores with mutexes
Date: Wed, 30 Oct 2019 12:32:52 +0100	[thread overview]
Message-ID: <20191030113252.GD3001@suse.cz> (raw)
In-Reply-To: <20191027220143.10756-1-dave@stgolabs.net>

On Sun, Oct 27, 2019 at 03:01:43PM -0700, Davidlohr Bueso wrote:
> At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal
> than semaphores; it's also a nicer interface for mutual exclusion,
> which is why they are encouraged over binary semaphores, when possible.
> 
> For both i_link_lock and i_ext_lock (and hence i_hash_lock which I
> annotated for the hash lock mapping hackery for lockdep), their semantics
> imply traditional lock ownership; that is, the lock owner is the same for
> both lock/unlock operations and does not run in irq context. Therefore
> it is safe to convert.
> 
> Signed-off-by: Davidlohr Bueso <dbueso@suse.de>

Thanks, I'll add it to affs queue.

      reply	other threads:[~2019-10-30 11:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27 22:01 [PATCH] fs/affs: Replace binary semaphores with mutexes Davidlohr Bueso
2019-10-30 11:32 ` David Sterba [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=20191030113252.GD3001@suse.cz \
    --to=dsterba@suse.cz \
    --cc=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=dsterba@suse.com \
    --cc=linux-kernel@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