lkml.org 
[lkml]   [2006]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsoftirq.c: tasklet_action() question
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-06 22:57    [W:0.148 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site