]> asedeno.scripts.mit.edu Git - linux.git/commit
locking/static_key: Factor out the fast path of static_key_slow_dec()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 30 Mar 2019 00:08:53 +0000 (17:08 -0700)
committerIngo Molnar <mingo@kernel.org>
Mon, 29 Apr 2019 06:29:21 +0000 (08:29 +0200)
commitb92e793bbe4a1c49dbf78d8d526561e7a7dd568a
tree981f93f26cadc142d2b2280f1d9d8f60a9890e1c
parentad282a8117d5048398f506f20b092c14b3b3c43f
locking/static_key: Factor out the fast path of static_key_slow_dec()

static_key_slow_dec() checks if the atomic enable count is larger
than 1, and if so there decrements it before taking the jump_label_lock.
Move this logic into a helper for reuse in rate limitted keys.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: alexei.starovoitov@gmail.com
Cc: ard.biesheuvel@linaro.org
Cc: oss-drivers@netronome.com
Cc: yamada.masahiro@socionext.com
Link: https://lkml.kernel.org/r/20190330000854.30142-3-jakub.kicinski@netronome.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/jump_label.c