Skip to content

percpu_rw_semaphore: lockdep + config

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3percpu_rw_semaphore: kill ->writer_mutex, add ->write_ctrinclude/linux/percpu-rwsem.h lib/percpu-rwsem.c+18 -200 replies
2/3percpu_rw_semaphore: add the lockdep annotationsinclude/linux/percpu-rwsem.h lib/percpu-rwsem.c+26 -52 replies
3/3percpu_rw_semaphore: introduce CONFIG_PERCPU_RWSEMarch/Kconfig block/Kconfig lib/Kconfig +1 more+7 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH -mm 0/3] percpu_rw_semaphore: lockdep + config
Quoted 7 lines · Oleg Nesterov

To remind, once/if I am sure you agree with this patch I'll send 2 additional and simple patches:

1. lockdep annotations

2. CONFIG_PERCPU_RWSEM

It turns out, lockdep annotations are not that simple due to internal locks used by percpu_rw_semaphore. To clarify, it is actually simple but lockdep_set_novalidate_class() doesn't seem to actually work, and more importantly, it must not be used according to checkpatch.pl. And I guess ->lockdep_recursion should not be used too.

However, without some tricks, the output from lockdep (when it finds the problem) does not look very clear because it blames those internal locks instead of "the whole" percpu_rw_semaphore.

So this series starts with the small optimization which I was going to do later. It removes ->writer_mutex and greatly simplifies 2/3.

Oleg.