Re: [PATCH] softirq_pending()

From: Linus Torvalds
Date: Wed Sep 24 2003 - 03:00:57 EST


Christoph Hellwig wrote:

> x86-64 currently ignores the cpu argument to softirq_pending() and
> always uses smp_processor_id(). And indeed that's the only possible
> argument. So consolidate the old softirq_pending() and
> local_softirq_pending() into a single one.

The issue is that on some architectures it is quite possibly useful to get
the cpu number, if we end up having to compute it anyway. An example of
this is x86.

On the other hand, some architectures have direct pointers to the "local cpu
state", so for them it is better to always know "this is local" (which it
indeed always is).

So think of the "cpu" argument as a pre-computed "what cpu am I on now"
thing. Especially since we often have it available anyway.

Linus
-
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/