From: Tim Chen <tim.c.chen@linux.intel.com>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de,
akpm@linux-foundation.org, paulmck@linux.vnet.ibm.com,
hpa@zytor.com, waiman.long@hp.com, jason.low2@hp.com,
aswin@hp.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mutex: Documentation rewrite
Date: Wed, 21 May 2014 12:02:56 -0700 [thread overview]
Message-ID: <1400698977.2970.308.camel@schen9-DESK> (raw)
In-Reply-To: <1400694115.2646.4.camel@buesod1.americas.hpqcorp.net>
On Wed, 2014-05-21 at 10:41 -0700, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <davidlohr@hp.com>
>
> Our mutexes have gone a long ways since the original implementation
> back in 2005/2006. However, the mutex-design.txt document is still
> stuck in the past, to the point where most of the information there
> is practically useless and, more important, simply incorrect. This
> patch pretty much rewrites it to resemble what we have nowadays.
>
> Since regular semaphores are almost much extinct in the kernel
> (most users now rely on mutexes or rwsems), it no longer makes
> sense to have such a close comparison, which was copied from most
> of the cover letter when Ingo introduced the generic mutex subsystem.
>
> While users who really want to learn more about kernel mutexes can
> go and read the code, I have marked this RFC since I'm sure more gory
> details can be included. Also, ww_mutexes are intentionally left out,
> leaving things as generic as possible.
>
> Comments welcome!
Thanks for doing this.
> +
> +(iii) slowpath: last resource, if the lock is still unable to be acquired
change "last resource" to "last resort"
>
> Disadvantages
> -------------
>
> -The stricter mutex API means you cannot use mutexes the same way you
> -can use semaphores: e.g. they cannot be used from an interrupt context,
> -nor can they be unlocked from a different context that which acquired
> -it. [ I'm not aware of any other (e.g. performance) disadvantages from
> -using mutexes at the moment, please let me know if you find any. ]
> -
Should we keep this instead of deleting it? It is still true we
cannot use mutex from an interrupt context.
Tim
next prev parent reply other threads:[~2014-05-21 19:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 17:41 Davidlohr Bueso
2014-05-21 19:02 ` Tim Chen [this message]
2014-05-21 19:52 ` Davidlohr Bueso
2014-05-21 21:16 ` Jason Low
2014-05-21 22:42 ` Davidlohr Bueso
2014-05-22 16:41 ` [PATCH v2] " Davidlohr Bueso
2014-05-22 17:09 ` Randy Dunlap
2014-05-23 15:16 ` [PATCH v3] " Davidlohr Bueso
2014-05-27 16:03 ` Waiman Long
2014-05-27 17:33 ` Jason Low
2014-05-29 4:36 ` [PATCH v4] " Davidlohr Bueso
2014-06-05 14:40 ` [tip:locking/core] locking/mutexes: Documentation update/rewrite tip-bot for Davidlohr Bueso
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=1400698977.2970.308.camel@schen9-DESK \
--to=tim.c.chen@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=aswin@hp.com \
--cc=davidlohr@hp.com \
--cc=hpa@zytor.com \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=waiman.long@hp.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
all inboxes | Powered by JetHome®