lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 4 Nov 2006 01:56:51 -0500
From:	Chuck Ebbert <76306.1226@...puserve.com>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	Zachary Amsden <zach@...are.com>, Andi Kleen <ak@...e.de>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Benjamin LaHaise <bcrl@...ck.org>
Subject: Re: [rfc patch] i386: don't save eflags on task switch

In-Reply-To: <Pine.LNX.4.64.0611031645141.25218@...osdl.org>

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,
> > we can keep a constant value in the thread_struct and always
> > restore that.
> 
> I don't really see the point. The "pushfl" isn't the expensive part, and 
> it gives sane and expected semantics.
> 
> 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@...ck.org>
  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.


And benchmarks seem to support that, even on K8:

 lmbench context switch, 50 runs

        before  after
    avg  1.09   1.05
 stddev   .25    .18

But P4 is the real problem case and I can't test that.

-- 
Chuck
"Even supernovas have their duller moments."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ