In-Reply-To: <Pine.LNX.4.64.0611031645141.25218@xxxxxxxxxxx>
On Fri, 3 Nov 2006 16:46:25 -0800, Linus Torvalds wrote:
On Fri, 3 Nov 2006, Chuck Ebbert wrote:
There is no real need to save eflags in switch_to(). Instead,I don't really see the point. The "pushfl" isn't the expensive part, and it gives sane and expected semantics.
we can keep a constant value in the thread_struct and always
restore that.
The "popfl" is the expensive part, and that's the thing that can't really even be removed.
Well that wasn't the impression I got:
Date: Mon, 18 Sep 2006 12:12:51 -0400
From: Benjamin LaHaise <bcrl@xxxxxxxxx>
Subject: Re: Sysenter crash with Nested Task Bit set
...
It's the pushfl that will be slow on any OoO CPU, as it has dependancies on any previous instructions that modified the flags, which ends up bringing all of the memory ordering dependancies into play. Doing a popfl to set the flags to some known value is much less expensive.