Re: softirq parameters

From: Matthew Wilcox (
Date: Wed Aug 07 2002 - 13:23:14 EST

On Wed, Aug 07, 2002 at 03:24:23PM +1000, Rusty Russell wrote:
> Partially agree. Removing all args might be worthwhile. But all these
> softirqs use the "cpu" arg to access per-cpu data, which should be
> changed to use the per_cpu_data mechanism anyway, which removes the
> point of the arg.

I see. That makes a lot of sense.

> Things haven't been changed over because I haven't pushed the per-cpu
> interface changes (required for some archs 8() to Linus yet. But you'll
> want them so we can save space (you only need allocate per-cpu data for
> cpus where cpu_possible(i) is true).

So what we want is something more like:

struct softnet_data softnet_data __per_cpu_data = { NULL };

static void void net_tx_action(void *arg)
        struct softnet_data *data = arg;
        if (arg->completion_queue) {

        open_softirq(NET_TX_SOFTIRQ, net_tx_action, softnet_data);

and have kernel/softirq.c do:

                do {
                        if (pending & 1)
                        pending >>= 1;
                } while (pending);


Revolutions do not require corporate support.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:36 EST