Re: [RFC] exit_thread() speedups in x86 process.c

From: Coywolf Qi Hunt
Date: Mon Jun 13 2005 - 22:09:30 EST


On 6/14/05, cutaway@xxxxxxxxxxxxx <cutaway@xxxxxxxxxxxxx> wrote:
> In the current exit_thread() implementation, it appears including the I/O
> port map tear down code within the exit_thread() generates enough autovar
> data that the compiler needs to spill 4 registers to the stack resulting in
> (4) PUSH on entry and (4) POP on exit.
>
> When I tried extracting the map teardown into a seperate function, the
> situation changed dramatically to where NO REGISTERS were being
> pushed/popped in the normal path entry/exit.
>
> Below is the original generated code, code my proposal generated, and an
> #ifdef'd change that produced this elimination of the PUSH/POP's.
>
> Unless I'm on drugs, this looks like a solid winner in a fairly important
> code path :)


I see the effect, But I think it would be better to leave the job to
gcc to generate better code for unlikely, imho.

--
Coywolf Qi Hunt
http://ahbl.org/~coywolf/
-
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/