Re: [PATCH][1/4] Completely out of line spinlocks / i386

From: Linus Torvalds
Date: Sun Aug 22 2004 - 15:22:58 EST




On Sat, 21 Aug 2004, Zwane Mwaikambo wrote:
>
> Pulled from the -tiny tree, the focus of this patch is for reduced kernel
> image size but in the process we benefit from improved cache performance
> since it's possible for the common text to be present in cache. This is
> probably more of a win on shared cache multiprocessor systems like
> P4/Xeon HT. It's been benchmarked with bonnie++ on 2x and 4x PIII (my
> ideal target would be a 4x+ logical cpu Xeon).

I _really_ think that if we're going to make spinlocks be out-of-line,
then we need to out-of-line the preemption code too.

And at that point I'm more than happy to just make it unconditional,
assuming the profiling thing (which was my only worry) has been verified.

And I suspect that the all-C version is pretty much equivalent to the
assembler one, if you use FASTCALL() to make gcc at least use register
argument passing conventions. The advantage is much clearer code, I'd say.

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/