softirq-use-ffs-in-__do_softirq.patch removed from -mm tree
Subject: [merged] softirq-use-ffs-in-__do_softirq.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 28 Jan 2014 11:09:49 -0800
The patch titled
Subject: softirq: use ffs() in __do_softirq()
has been removed from the -mm tree. Its filename was
softirq-use-ffs-in-__do_softirq.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Joe Perches <[email protected]>
Subject: softirq: use ffs() in __do_softirq()
Possible speed improvement of __do_softirq() by using ffs() instead of using a while loop with an & 1 test then single bit shift.
---
kernel/softirq.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-)
kernel/softirq.c renamed from kernel/softirq.c~softirq-use-ffs-in-__do_softirq +23 -22
@@ -229,6 +229,7 @@ asmlinkage void __do_softirq(void)struct softirq_action *h;bool in_hardirq;__u32 pending; +int softirq_bit;int cpu;/*
@@ -253,30 +254,30 @@ restart: 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_set (prev_count); - } - -rcu_bh_qs (cpu); +while ((softirq_bit =ffs (pending))) { +unsigned int vec_nr; +int prev_count; + + h += softirq_bit -1 ; + + vec_nr = h - softirq_vec; + 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_set (prev_count); } +rcu_bh_qs (cpu); h++; - pending >>=1 ; - }while (pending); + pending >>= softirq_bit; + }local_irq_disable ();
_
Patches currently in -mm which might be from [email protected] are
origin.patch lib-genallocc-add-check-gen_pool_dma_alloc-if-dma-pointer-is-not-null.patch linux-next.patch