Re: [PATCH RT 00/02] SLOB optimizations

From: Eric Dumazet
Date: Thu Dec 22 2005 - 16:59:23 EST


George Anzinger a écrit :


that's just the profiling interrupt hitting them. You should not analyze irq-safe code with a non-NMI profiling interrupt.

CLI/STI is extremely fast. (In fact in the -rt tree i'm using them within mutexes instead of preempt_enable()/preempt_disable(), because they are faster and generate less register side-effect.)

Hm... I rather thought that the cli would cause a rather large hit on the pipeline and certainly on OOE. Is your observation based on any particular instruction stream? Sti, on the otherhand should be fast...

Just to be exact, the 'cli' is coded as 3 instruction :

pushfq
popq (%rsp)
cli

and the 'sti' is coded as 2 instructions :
pushq (%rsp)
popfq

And 'popfq' seems to be expensive, at least on Opteron machines and if oprofile is not completely wrong...

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