Re: [PATCH] Tasklets: Avoid duplicating __tasklet_{,hi_}schedule()code
From: Ingo Molnar
Date: Tue Feb 19 2008 - 10:53:24 EST
* Ahmed S. Darwish <darwish.07@xxxxxxxxx> wrote:
> - 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);
i think there's a subtle difference that you missed: this one does
__raise_softirq_irqoff(), while __tasklet_schedule() does a
raise_softirq_irqoff(). (note the lack of undescores)
the reason is to avoid infinitely self-activating tasklets.
Ingo
--
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/