From: Ingo Molnar <mingo@elte.hu>
To: Andy Lutomirski <luto@MIT.EDU>
Cc: x86 <x86@kernel.org>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Arjan van de Ven <arjan@infradead.org>,
Avi Kivity <avi@redhat.com>
Subject: Re: [PATCH 3.1?] x86: Remove useless stts/clts pair in __switch_to
Date: Mon, 25 Jul 2011 13:12:24 +0200 [thread overview]
Message-ID: <20110725111224.GP28787@elte.hu> (raw)
In-Reply-To: <38f1d91a44c243a91e441a947fed4b076dcd4ca1.1311587947.git.luto@mit.edu>
* 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
next prev parent reply other threads:[~2011-07-25 11:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-24 21:07 [RFC] syscall calling convention, stts/clts, and xstate latency Andrew Lutomirski
2011-07-24 21:15 ` Ingo Molnar
2011-07-24 22:34 ` Andrew Lutomirski
2011-07-25 3:21 ` Andrew Lutomirski
2011-07-25 6:42 ` Ingo Molnar
2011-07-25 10:05 ` [PATCH 3.1?] x86: Remove useless stts/clts pair in __switch_to Andy Lutomirski
2011-07-25 11:12 ` Ingo Molnar [this message]
2011-07-25 13:04 ` Andrew Lutomirski
2011-07-25 14:13 ` Ingo Molnar
2011-07-25 6:38 ` [RFC] syscall calling convention, stts/clts, and xstate latency Ingo Molnar
2011-07-25 9:44 ` Andrew Lutomirski
2011-07-25 9:51 ` Ingo Molnar
2011-07-25 11:04 ` Hans Rosenfeld
2011-07-25 7:42 ` Avi Kivity
2011-07-25 7:54 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110725111224.GP28787@elte.hu \
--to=mingo@elte.hu \
--cc=arjan@infradead.org \
--cc=avi@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@MIT.EDU \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox