Re: [RFC] timers, pointers to functions and type safety

From: Roman Zippel
Date: Sun Dec 03 2006 - 10:27:11 EST


Hi,

On Sun, 3 Dec 2006, Russell King wrote:

> I agree with Al, Matthew and Pavel. The current timer stuff is a pita
> and needs fixing, and it seems Al has come up with a good way to do it
> without adding additional crap into every single user of timers.

What exactly is the pita here? Al only came up with some rather
theoretical problems with no practical relevance.

> There *are* times when having the additional space for storing a pointer
> is cheaper (in terms of number of bytes) than code to calculate an offset,
> and those who have read the assembly code probably know this all too well.

In simple cases gcc can optimize this away, additionally it's offset by
one less memory reference in the timer code, so the code executed per
timer would be equal or often even less. Additionally less code is needed
to initialize the timer.

> Al - I look forward to your changes.

I don't. The current API is maybe not perfect, but changing the API for no
practical benefit would be an even bigger pita. I'd rather keep it as is.

bye, Roman
-
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/