From: Nick Piggin <npiggin@suse.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Frank Mayhar <fmayhar@google.com>,
John Stultz <johnstul@us.ibm.com>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [patch 2/4] lglock: introduce special lglock and brlock spin locks
Date: Sat, 5 Jun 2010 00:13:18 +1000 [thread overview]
Message-ID: <20100604141318.GC26335@laptop> (raw)
In-Reply-To: <1275638163.2482.2.camel@edumazet-laptop>
On Fri, Jun 04, 2010 at 09:56:03AM +0200, Eric Dumazet wrote:
> Le vendredi 04 juin 2010 à 16:43 +1000, Nick Piggin a écrit :
> > pièce jointe document texte brut (kernel-introduce-brlock.patch)
> > This patch introduces "local-global" locks (lglocks). These can be used to:
> >
> > - Provide fast exclusive access to per-CPU data, with exclusive access to
> > another CPU's data allowed but possibly subject to contention, and to provide
> > very slow exclusive access to all per-CPU data.
> > - Or to provide very fast and scalable read serialisation, and to provide
> > very slow exclusive serialisation of data (not necessarily per-CPU data).
> >
> > Brlocks are also implemented as a short-hand notation for the latter use
> > case.
> >
> > Thanks to Paul for local/global naming convention.
> >
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-fsdevel@vger.kernel.org
> > Cc: Al Viro <viro@ZenIV.linux.org.uk>
> > Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > Cc: Frank Mayhar <fmayhar@google.com>,
> > Cc: John Stultz <johnstul@us.ibm.com>
> > Cc: Andi Kleen <ak@linux.intel.com>
> > Signed-off-by: Nick Piggin <npiggin@suse.de>
> > ---
> > include/linux/lglock.h | 165 +++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 165 insertions(+)
> >
>
> IMHO some changes in Documentation/ would be needed
I wonder where, and what?
> > + void name##_global_lock(void) { \
> > + int i; \
> > + preempt_disable(); \
> > + rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \
> > + for_each_online_cpu(i) { \
>
> for_each_possible_cpu()
Oh good spotting. brlock does not need this but lglock does if it
protects offline cpu data too. Maybe better to move file handles in
the event of hotplug.
next prev parent reply other threads:[~2010-06-04 14:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 6:43 [patch 0/4] Initial vfs scalability patches again Nick Piggin
2010-06-04 6:43 ` [patch 1/4] fs: cleanup files_lock Nick Piggin
2010-06-04 8:38 ` Christoph Hellwig
2010-06-04 14:20 ` Nick Piggin
2010-06-04 14:39 ` Andi Kleen
2010-06-04 15:10 ` Christoph Hellwig
2010-06-04 18:39 ` [PATCH, RFC] tty: stop abusing file->f_u.fu_list Christoph Hellwig
2010-06-04 19:35 ` Al Viro
2010-06-05 11:39 ` Nick Piggin
2010-06-08 5:22 ` Nick Piggin
2010-06-04 6:43 ` [patch 2/4] lglock: introduce special lglock and brlock spin locks Nick Piggin
2010-06-04 7:56 ` Eric Dumazet
2010-06-04 14:13 ` Nick Piggin [this message]
2010-06-04 14:24 ` Eric Dumazet
2010-06-04 15:03 ` Paul E. McKenney
2010-06-04 15:12 ` Nick Piggin
2010-06-04 6:43 ` [patch 3/4] fs: scale files_lock Nick Piggin
2010-06-04 6:43 ` [patch 4/4] fs: brlock vfsmount_lock Nick Piggin
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=20100604141318.GC26335@laptop \
--to=npiggin@suse.de \
--cc=ak@linux.intel.com \
--cc=eric.dumazet@gmail.com \
--cc=fmayhar@google.com \
--cc=johnstul@us.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=viro@ZenIV.linux.org.uk \
/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).