Andi Kleen wrote:
For me, when compiled with -O2, it results in
84
88
132
which basically says: a "rdtsc->rdtsc" is 84 cycles, putting a "pushfl" in
between is another _4_ cycles, and putting a "popfl" in between is about
another 48 cycles.
This means we should definitely change restore_flags() to only STI,
never popf
sti is expensive as well; iirc just as expensive on most processors as
popf, although I don't have hard numbers to back this up on hand. An
_unlikely_ jcc + popf? is better than a sti, for sure, but a likely
jcc+popf could cost more than a jcc+sti, depending on model.
Zach
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]