ipipe-2.6.38-noarch
The following changes since commit a91de1c71c21a4f8d7fffb5d675af6664261f7e5:
ipipe: Re-read domain data pointer after interrupt handler execution (2011-06-04 16:16:28 +0200)
are available in the git repository at:
git://git.kiszka.org/ipipe queues/2.6.38-noarch
[edited summary]
Jan Kiszka (2):
ipipe: Optimize ipipe_percpu_domain_data::status accesses Merge remote branch 'stable-2.6.38/master' into queues/2.6.38-noarch
---
ipipe: Optimize ipipe_percpu_domain_data::status accesses
The per-CPU domain status must only be accessed over the current CPU (except for setup purposes). So there is no point in using costly atomic operations to manipulate them. Drop the remaining ones from generic code.
Signed-off-by Jan Kiszka <[email protected]>
--- include/linux/ipipe.h | 4 ++-- kernel/ipipe/core.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-)
include/linux/ipipe.h +2 -2
@@ -321,11 +321,11 @@ static inline void __local_irq_restore_nosync(unsigned long x)struct ipipe_percpu_domain_data *p =ipipe_root_cpudom_ptr ();if (raw_irqs_disabled_flags (x)) { -set_bit (IPIPE_STALL_FLAG , &p->status); +__set_bit (IPIPE_STALL_FLAG , &p->status);trace_hardirqs_off (); }else {trace_hardirqs_on (); -clear_bit (IPIPE_STALL_FLAG , &p->status); +__clear_bit (IPIPE_STALL_FLAG , &p->status); } }
kernel/ipipe/core.c +4 -3
@@ -442,7 +442,8 @@ void __ipipe_restore_pipeline_head(unsigned long x) /* hw interrupt off */if (x) {#ifdef CONFIG_DEBUG_KERNEL static int warned; -if (!warned &&test_and_set_bit (IPIPE_STALL_FLAG , &p->status)) { +if (!warned && +__test_and_set_bit (IPIPE_STALL_FLAG , &p->status)) {/* * Already stalled albeit ipipe_restore_pipeline_head() * should have detected it? Send a warning once.
@@ -455,7 +456,7 @@ void __ipipe_restore_pipeline_head(unsigned long x) /* hw interrupt off */ local_irq_disable_hw(); }#else /* !CONFIG_DEBUG_KERNEL */ -set_bit (IPIPE_STALL_FLAG , &p->status); +__set_bit (IPIPE_STALL_FLAG , &p->status);#endif /* CONFIG_DEBUG_KERNEL */ }else {
@@ -1211,7 +1212,7 @@ void __ipipe_preempt_schedule_irq(void)if (unlikely (__ipipe_ipending_p (p))) {add_preempt_count (PREEMPT_ACTIVE );trace_hardirqs_on (); -clear_bit (IPIPE_STALL_FLAG , &p->status); +__clear_bit (IPIPE_STALL_FLAG , &p->status);__ipipe_sync_pipeline ();sub_preempt_count (PREEMPT_ACTIVE ); }
Signature · 1 line
1.7.1