Re: Re-tune x86 uaccess code for PREEMPT_VOLUNTARY

From: H. Peter Anvin
Date: Sat Aug 10 2013 - 19:02:13 EST


On 08/10/2013 11:51 AM, Linus Torvalds wrote:
> Note that you still want the *test* to be done in C code, because together
> with "unlikely()" you'd likely do pretty close to optimal code
> generation, and hiding the decrement and test and conditional jump in
> asm you wouldn't get the proper instruction scheduling and branch
> following that gcc does.

How much instruction scheduling can gcc actually do given that there is
a barrier involved? I guess some on the RISC architectures which need
load/subtract/store...

-hpa


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