diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-11-23 15:23:55 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-22 15:25:54 +0200 |
commit | 259d69b7f056bc9a543c7d184e791ef6c2775081 (patch) | |
tree | e7db40679995eec5e61bc105e095db645d4e5f04 /scripts | |
parent | 7c3f654d8e18942295eeda42f7d75494443980e0 (diff) | |
download | op-kernel-dev-259d69b7f056bc9a543c7d184e791ef6c2775081.zip op-kernel-dev-259d69b7f056bc9a543c7d184e791ef6c2775081.tar.gz |
locking/percpu-rwsem: Add down_read_preempt_disable()
Provide a down_read()/up_read() variant that keeps preemption disabled
over the whole thing, when possible.
This avoids a needless preemption point for constructs such as:
percpu_down_read(&global_rwsem);
spin_lock(&lock);
...
spin_unlock(&lock);
percpu_up_read(&global_rwsem);
Which perturbs timings. In particular it was found to cure a
performance regression in a follow up patch in fs/locks.c
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions