[PATCH] x86, hpet.c: Changed delayed_work to work when delay is 0

From: Leonardo de SÃ Alt
Date: Sat May 15 2010 - 11:28:18 EST


Here a delayed_work was used with delay 0, so it was changed to work.
It avoids a timer set up and the work is directly queued, providing
less use of memory and more performance.

I've tried to send this patch to Venkatesh Pallipadi, the creator of the code I changed (venkatesh.pallipadi@xxxxxxxxx), but "the message was rejected by the recipient domain".

Signed-off-by: Leonardo de Sá Alt <leonardoaltt@xxxxxxxxx>

---
arch/x86/kernel/hpet.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index a198b7c..4516ba1 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -724,12 +724,10 @@ static int hpet_cpuhp_notify(struct notifier_block *n,

switch (action & 0xf) {
case CPU_ONLINE:
- INIT_DELAYED_WORK_ON_STACK(&work.work, hpet_work);
+ INIT_WORK_ON_STACK(&work.work.work, hpet_work);
init_completion(&work.complete);
- /* FIXME: add schedule_work_on() */
- schedule_delayed_work_on(cpu, &work.work, 0);
+ schedule_work_on(cpu, &work.work.work);
wait_for_completion(&work.complete);
- destroy_timer_on_stack(&work.work.timer);
break;
case CPU_DEAD:
if (hdev) {
--
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/