lkml.org 
[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.1?] x86: Remove useless stts/clts pair in __switch_to

* Andy Lutomirski <luto@MIT.EDU> wrote:

> An stts/clts pair takes over 70 ns by itself on Sandy Bridge, and
> when other things are going on it's apparently even worse. This
> saves 10% on context switches between threads that both use extended
> state.
>
> Signed-off-by: Andy Lutomirski <luto@mit.edu>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Arjan van de Ven <arjan@infradead.org>,
> Cc: Avi Kivity <avi@redhat.com>
> ---
>
> This is not as well tested as it should be (especially on 32-bit, where
> I haven't actually tried compiling it), but I think this might be 3.1
> material so I want to get it out for review before it's even more
> unjustifiably late :)
>
> Argument for inclusion in 3.1 (after a bit more testing):
> - It's dead simple.
> - It's a 10% speedup on context switching under the right conditions [1]
> - It's unlikely to slow any workload down, since it doesn't add any work
> anywwhere.
>
> Argument against:
> - It's late.

I think it's late.

Would be much better to stick it into the x86/xsave tree i pointed to
and treat and debug it as a coherent unit. FPU bugs need a lot of
time to surface so we definitely do not want to fast-track it. In
fact if we want it in v3.2 we should start assembling the tree right
now.

Also, if you are tempted by the prospect of possibly enabling vector
instructions for the x86 kernel, we could try that too, and get
multiple speedups for the price of having to debug the tree only once
;-)

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-07-25 13:15    [W:0.058 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site