[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080219153720.GA2967@ubuntu>
Date: Tue, 19 Feb 2008 17:37:20 +0200
From: "Ahmed S. Darwish" <darwish.07@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] Tasklets: Avoid duplicating __tasklet_{,hi_}schedule() code
Hi all,
Avoid duplicating __tasklet_schedule() and __tasklet_hi_schedule()
code in tasklet_action() and tasklet_hi_action() respectively.
Signed-off-by: Ahmed S. Darwish <darwish.07@...il.com>
---
This also saves a few bytes of image space:
text data bss dec hex filename
3632 12 324 3968 f80 softirq.o.before
3552 12 324 3888 f30 softirq.o.after
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 5b3aea5..3068dc3 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -414,11 +414,8 @@ static void tasklet_action(struct softirq_action *a)
tasklet_unlock(t);
}
- local_irq_disable();
- t->next = __get_cpu_var(tasklet_vec).list;
- __get_cpu_var(tasklet_vec).list = t;
- __raise_softirq_irqoff(TASKLET_SOFTIRQ);
- local_irq_enable();
+ /* We were not lucky enough to run, reschedule. */
+ __tasklet_schedule(t);
}
}
@@ -447,11 +444,8 @@ static void tasklet_hi_action(struct softirq_action *a)
tasklet_unlock(t);
}
- local_irq_disable();
- t->next = __get_cpu_var(tasklet_hi_vec).list;
- __get_cpu_var(tasklet_hi_vec).list = t;
- __raise_softirq_irqoff(HI_SOFTIRQ);
- local_irq_enable();
+ /* We were not lucky enough to run, reschedule. */
+ __tasklet_hi_schedule(t);
}
}
Regards,
--
Ahmed S. Darwish
Homepage: http://darwish.07.googlepages.com
Blog: http://darwish-07.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists