Re: [rfc patch] i386: don't save eflags on task switch

Andi Kleen
2006-11-05T17:01:24Z

> sti is expensive as well; iirc just as expensive on most processors as
> popf,

On K8 STI is 4 cycles.

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

99.9999% of all restore_flags just need STI.

-Andi