From adeff95dcdcf88789e983f20b0657f29286de8d7 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Mon, 5 Mar 2012 14:59:07 -0500 Subject: Remove option for threading of all softirqs. --- kernel/softirq.c | 142 ++++++++++++++++++++----------------------------------- 1 file changed, 52 insertions(+), 90 deletions(-) (limited to 'kernel') diff --git a/kernel/softirq.c b/kernel/softirq.c index 48d6bde692a1..7c562558a863 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -214,105 +214,67 @@ EXPORT_SYMBOL(local_bh_enable_ip); */ #define MAX_SOFTIRQ_RESTART 10 -static void ____do_softirq(void) +asmlinkage void __do_softirq(void) { - __u32 pending; - - struct softirq_action *h; - int cpu; - - pending = local_softirq_pending(); - - account_system_vtime(current); + struct softirq_action *h; + __u32 pending; + int max_restart = MAX_SOFTIRQ_RESTART; + int cpu; - __local_bh_disable((unsigned long)__builtin_return_address(0), - SOFTIRQ_OFFSET); - lockdep_softirq_enter(); + pending = local_softirq_pending(); + account_system_vtime(current); - cpu = smp_processor_id(); + __local_bh_disable((unsigned long)__builtin_return_address(0), + SOFTIRQ_OFFSET); + lockdep_softirq_enter(); - set_softirq_pending(0); - - local_irq_enable(); - - h = softirq_vec; - - do { - if (pending & 1) { - unsigned int vec_nr = h - softirq_vec; - int prev_count = preempt_count(); - - kstat_incr_softirqs_this_cpu(vec_nr); - - trace_softirq_entry(vec_nr); - h->action(h); - trace_softirq_exit(vec_nr); - if (unlikely(prev_count != preempt_count())) { - printk(KERN_ERR "huh, entered softirq %u %s %p" - "with preempt_count %08x," - " exited with %08x?\n", vec_nr, - softirq_to_name[vec_nr], h->action, - prev_count, preempt_count()); - preempt_count() = prev_count; - } - - rcu_bh_qs(cpu); - } - h++; - pending >>= 1; - } while (pending); - - local_irq_disable(); -} + cpu = smp_processor_id(); +restart: + /* Reset the pending bitmask before enabling irqs */ + set_softirq_pending(0); -static void ___do_softirq(void) -{ - int max_restart = MAX_SOFTIRQ_RESTART; - __u32 pending; + local_irq_enable(); -restart: - ____do_softirq(); + h = softirq_vec; - pending = local_softirq_pending(); - if (pending && --max_restart) - goto restart; + do { + if (pending & 1) { + unsigned int vec_nr = h - softirq_vec; + int prev_count = preempt_count(); - if (pending) - wakeup_softirqd(); -} + kstat_incr_softirqs_this_cpu(vec_nr); -asmlinkage void __do_softirq(void) -{ -#ifdef LITMUS_THREAD_ALL_SOFTIRQ - /* Skip straight to wakeup_softirqd() if we're using - LITMUS_THREAD_ALL_SOFTIRQ (unless there's really high prio-stuff waiting.). */ - struct task_struct *tsk = __get_cpu_var(ksoftirqd); - - if(tsk) - { - __u32 pending = local_softirq_pending(); - const __u32 high_prio_softirq = (1<action(h); + trace_softirq_exit(vec_nr); + if (unlikely(prev_count != preempt_count())) { + printk(KERN_ERR "huh, entered softirq %u %s %p" + "with preempt_count %08x," + " exited with %08x?\n", vec_nr, + softirq_to_name[vec_nr], h->action, + prev_count, preempt_count()); + preempt_count() = prev_count; + } + + rcu_bh_qs(cpu); + } + h++; + pending >>= 1; + } while (pending); + + local_irq_disable(); + + pending = local_softirq_pending(); + if (pending && --max_restart) + goto restart; + + if (pending) + wakeup_softirqd(); + + lockdep_softirq_exit(); + + account_system_vtime(current); + __local_bh_enable(SOFTIRQ_OFFSET); } #ifndef __ARCH_HAS_DO_SOFTIRQ -- cgit v1.2.2