Skip to content

perpcu rwsem, fs/locks and killing lglocks

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7percpu-rwsem: DEFINE_STATIC_PERCPU_RWSEMinclude/linux/percpu-rwsem.h+12 -00 replies
2/7fs/locks: Replace lg_global with a percpu-rwsemfs/locks.c+21 -00 replies
3/7fs/locks: Replace lg_local with a per-cpu spinlockfs/Kconfig fs/locks.c+30 -180 replies
4/7percpu-rwsem: Add down_read_preempt_disable()include/linux/percpu-rwsem.h+18 -60 replies
5/7fs/locks: Use percpu_down_read_preempt_disablefs/locks.c+12 -120 replies
6/7stop_machine: Remove stop_cpus_lock and lg_double_lock/unlock()include/linux/lglock.h kernel/locking/lglock.c kernel/stop_machine.c+26 -430 replies
7/7locking: Remove lglockDocumentation/locking/lglock.txt include/linux/lglock.h kernel/locking/Makefile +1 more+0 -3320 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] perpcu rwsem, fs/locks and killing lglocks

Hi all,

Here are some patches that I've been sitting on for far too long now.

They're a respin of earlier work [1], and have been verified by Daniel Wagner to not suffer the regression he measured with the previous set (part of which was operator error).

Patches 4 and 5 were needed to solve a (smallish) performance regression on CONFIG_PREEMPT=y. They avoid a number of preemption points (and code).

I was going to gather pretty numbers from Daniels data, but I keep putting that off and figured I ought to send the patches already.

[1] https://lkml.kernel.org/r/[email protected]

---
 Documentation/locking/lglock.txt | 166 ---------------------------------------
 fs/Kconfig                       |   1 +
 fs/locks.c                       |  68 +++++++++++-----
 include/linux/lglock.h           |  81 -------------------
 include/linux/percpu-rwsem.h     |  36 +++++++--
 kernel/locking/Makefile          |   1 -
 kernel/locking/lglock.c          | 111 --------------------------
 kernel/stop_machine.c            |  42 ++++++----
 8 files changed, 107 insertions(+), 399 deletions(-)