diff options
author | Peter Zijlstra <peterz@infradead.org> | 2013-11-19 19:13:38 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-13 20:32:27 +0400 |
commit | 0bd3a173d711857fc9f583eb5825386cc08f3948 (patch) | |
tree | 3807a2744f0e22afa0a009c6c2cb2bf8d7fb746e /include/linux/preempt_mask.h | |
parent | 10b033d434c25a6c9e0f4f4dc2418af1b8236c63 (diff) | |
download | linux-0bd3a173d711857fc9f583eb5825386cc08f3948.tar.xz |
sched/preempt, locking: Rework local_bh_{dis,en}able()
Currently local_bh_disable() is out-of-line for no apparent reason.
So inline it to save a few cycles on call/return nonsense, the
function body is a single add on x86 (a few loads and store extra on
load/store archs).
Also expose two new local_bh functions:
__local_bh_{dis,en}able_ip(unsigned long ip, unsigned int cnt);
Which implement the actual local_bh_{dis,en}able() behaviour.
The next patch uses the exposed @cnt argument to optimize bh lock
functions.
With build fixes from Jacob Pan.
Cc: rjw@rjwysocki.net
Cc: rui.zhang@intel.com
Cc: jacob.jun.pan@linux.intel.com
Cc: Mike Galbraith <bitbucket@online.de>
Cc: hpa@zytor.com
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: lenb@kernel.org
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131119151338.GF3694@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/preempt_mask.h')
-rw-r--r-- | include/linux/preempt_mask.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/preempt_mask.h b/include/linux/preempt_mask.h index b8d96bca4357..dbeec4d4a3be 100644 --- a/include/linux/preempt_mask.h +++ b/include/linux/preempt_mask.h @@ -2,7 +2,6 @@ #define LINUX_PREEMPT_MASK_H #include <linux/preempt.h> -#include <asm/hardirq.h> /* * We put the hardirq and softirq counter into the preemption |