Re: [PATCH] genirq: ARM dyntick cleanup

From: Linus Torvalds
Date: Mon Jul 03 2006 - 12:55:25 EST




On Mon, 3 Jul 2006, Andrew Morton wrote:
>
> void handle_dynamic_tick(struct irqaction *action)
> {
> }
>
> consumes one byte, doesn't it? That's not very far overboard ;)

Nope, it consumes - very fundamentally - about 64 bytes.

Even in the absense of alignment (which means that it generally takes up a
minimum of 16 bytes of real memory), it takes up what would tend to be a
much more critical resource: a cache line.

So an empty macro is a _lot_ more efficient than an empty function call.

For interrupt handlers, the L1 I$ miss rate is basically 100%. Even the L2
I$ miss rate is quite noticeable, _especially_ for things that are not
easy to prefetch (ie stuff that is out-of-line). Which means that it also
likely takes an inordinate amount of cycles, for doing zero work.

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/