softirq.c: tasklet_action() question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

ok, possibly stupid question, but what the heck is THAT?:


static void tasklet_action(struct softirq_action *a)
{
        struct tasklet_struct *list;

        local_irq_disable();
        list = __get_cpu_var(tasklet_vec).list;
        __get_cpu_var(tasklet_vec).list = NULL;
        local_irq_enable();

	while (list) {


(same in tasklet_hi_action())

My gut reaction to this would be something similar to:

static void tasklet_action(struct softirq_action *a)
{
        struct tasklet_struct *list = NULL;

	super_cool_n_fast_atomic_xchg(&__get_cpu_var(tasklet_vec).list, &list);

	while (list) {
	

I'm sure it's obviously not quite as simple as that (maybe requires
atomic xchg extension of the cpu var API?), but would something like that be
possible (at least optionally or for non-SMP?) to avoid the IRQ masking
latency penalty, especially on x86?
(still hacking on a measly P3/700, and am bloody determined to keep it
that way for a looong time ;)

I'm sure that I'm missing something, so what is it? ;)

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux