Re: [RFC PATCH 1/2] Marker probes in futex.c

From: Ingo Molnar
Date: Wed Apr 16 2008 - 10:30:46 EST



* Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:

> > Not only does the compare and jmp need to be consecutive, but the
> > movb $0x0,%al also does. I *could* try to detect specific code
> > inserted in between, but I really have to make sure I don't get
> > burned by the compiler inserting a jmp there.
>
> I wonder if just sticking in 2 barriers around your code make gcc stop
> moving stuff too much

hm, an extra optimization barrier might have worse effects than even an
extra instruction. I think if the detection and patching can be made
100% safe, we dont care about the remaining 4% of markers that gcc
somehow reorders.

and in parallel gcc folks might want to start helping us achieve
single-instruction branch points? Currently there's no way to get flags
values out of inline assembly, except via a register intermediary which
adds another instruction. For flags that are unaffected by gcc's
input/output constraint generation code it would make sense to allow
them to be exported out of inline assembly.

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