From: Davidlohr Bueso <dave@stgolabs.net>
To: mingo@kernel.org, peterz@infradead.org, akpm@linux-foundation.org
Cc: jack@suse.cz, kirill.shutemov@linux.intel.com,
ldufour@linux.vnet.ibm.com, mhocko@suse.com,
mgorman@techsingularity.net, dave@stgolabs.net,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 -tip 0/6] locking: Introduce range reader/writer lock
Date: Thu, 6 Apr 2017 01:46:14 -0700 [thread overview]
Message-ID: <20170406084620.22700-1-dave@stgolabs.net> (raw)
Changes from v1 (https://lwn.net/Articles/716383/), all in patch 2:
- s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL
- Made the tree walks a foreach loop, instead of while.
- Fixed signal_pending() lockup issue for unaccounted waiters.
- Fixed initialization macros.
- Check condition before signal_pending in loop.
- Make building the interval-tree unconditionally a separate patch.
- More/better documentation.
- Added jack's reviewed-by.
- Renamed inf to full.
** What's still pending:
- Debug support (it's been a pain to use lockdep with range locking).
- Renaming the lock; I don't agree that rwlock's should have exclusivity
on such a generic name; maybe they should be called rwspinlocks :)
- lustre 32bit offset caveat.
Hi,
Here's a very tardy proposal for enhancements to Jan's original[1] range lock
using interval trees. Because at some point it would be awesome to switch mmap_sem
from rwsem to range rwlock, I've focused on making it sharable and performance
enhancements reducing the performance delta between this and conventional locks as
much as possible -- details in patch 2.
The rest of the patches adds support for testing the new lock and actually
makes use of it for lustre. It has passed quite a bit of artificial pounding and
I believe/hope it is in shape to consider.
Laurent, while there are some pending items Peter wants, it might be worth
using this series for any further mmap_sem testing.
Applies on top of tip v4.11-rc5
[1] https://lkml.org/lkml/2013/1/31/483
Thanks!
Davidlohr Bueso (6):
interval-tree: Build unconditionally
locking: Introduce range reader/writer lock
locking/locktorture: Fix rwsem reader_delay
locking/locktorture: Fix num reader/writer corner cases
locking/locktorture: Support range rwlocks
staging/lustre: Use generic range rwlock
drivers/gpu/drm/Kconfig | 2 -
drivers/gpu/drm/i915/Kconfig | 1 -
drivers/staging/lustre/lustre/llite/Makefile | 2 +-
drivers/staging/lustre/lustre/llite/file.c | 21 +-
.../staging/lustre/lustre/llite/llite_internal.h | 4 +-
drivers/staging/lustre/lustre/llite/llite_lib.c | 3 +-
drivers/staging/lustre/lustre/llite/range_lock.c | 239 ---------
drivers/staging/lustre/lustre/llite/range_lock.h | 82 ---
include/linux/range_rwlock.h | 115 +++++
kernel/locking/Makefile | 2 +-
kernel/locking/locktorture.c | 299 ++++++++---
kernel/locking/range_rwlock.c | 554 +++++++++++++++++++++
lib/Kconfig | 14 -
lib/Kconfig.debug | 1 -
lib/Makefile | 3 +-
15 files changed, 903 insertions(+), 439 deletions(-)
delete mode 100644 drivers/staging/lustre/lustre/llite/range_lock.c
delete mode 100644 drivers/staging/lustre/lustre/llite/range_lock.h
create mode 100644 include/linux/range_rwlock.h
create mode 100644 kernel/locking/range_rwlock.c
--
2.12.0
next reply other threads:[~2017-04-06 8:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 8:46 Davidlohr Bueso [this message]
2017-04-06 8:46 ` [PATCH 1/6] interval-tree: Build unconditionally Davidlohr Bueso
2017-04-06 8:46 ` [PATCH 2/6] locking: Introduce range reader/writer lock Davidlohr Bueso
2017-04-06 9:01 ` Laurent Dufour
2017-04-06 16:50 ` Davidlohr Bueso
2017-04-13 8:07 ` Laurent Dufour
2017-04-13 8:38 ` Jan Kara
2017-04-13 8:58 ` Laurent Dufour
2017-04-06 10:24 ` Peter Zijlstra
2017-04-18 13:57 ` Laurent Dufour
2017-04-20 16:01 ` Davidlohr Bueso
2017-04-21 7:00 ` Laurent Dufour
2017-04-06 8:46 ` [PATCH 3/6] locking/locktorture: Fix rwsem reader_delay Davidlohr Bueso
2017-04-06 8:46 ` [PATCH 4/6] locking/locktorture: Fix num reader/writer corner cases Davidlohr Bueso
2017-04-06 8:46 ` [PATCH 5/6] locking/locktorture: Support range rwlocks Davidlohr Bueso
2017-04-06 8:46 ` [PATCH 6/6] staging/lustre: Use generic range rwlock Davidlohr Bueso
2017-04-07 10:08 ` Dilger, Andreas
2017-04-07 10:08 ` [lustre-devel] " Dilger, Andreas
2017-04-19 12:37 ` [PATCH v2 -tip 0/6] locking: Introduce range reader/writer lock Peter Zijlstra
2017-04-20 17:13 ` Davidlohr Bueso
2017-04-20 17:53 ` Peter Zijlstra
2017-04-20 18:36 ` Davidlohr Bueso
2017-04-20 19:10 ` Peter Zijlstra
2017-05-15 9:19 ` 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=20170406084620.22700-1-dave@stgolabs.net \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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 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.