Messages in this thread | | | Date | Wed, 7 Aug 2002 19:23:14 +0100 | From | Matthew Wilcox <> | Subject | Re: softirq parameters |
| |
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) h->action(this_cpu(h->data)); h++; pending >>= 1; } while (pending);
right?
-- Revolutions do not require corporate support. - 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/
| |