public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Add support for RD/WR FS/GSBASE
@ 2014-04-28 22:12 Andi Kleen
  2014-04-28 22:12 ` [PATCH 1/7] percpu: Add a DEFINE_PER_CPU_2PAGE_ALIGNED Andi Kleen
                   ` (6 more replies)
  0 siblings, 7 replies; 26+ messages in thread
From: Andi Kleen @ 2014-04-28 22:12 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel

This adds kernel support for some Intel instructions that
allow fast access to the FS and GS 64bit base. They need
some changes to entry_64.S because they allow user
to fully control the GS base.

Advantages:
- NMIs (and other "paranoid" interrupts) avoid
one RDMSR which makes them faster
- User space can use these instructions, mainly
for efficient context switching with user thread libraries
- Context switches do not need to use MSR writes
anymore to context switch FS/GS base >4GB. This 
will speed up applications that have enough thread
local data that it won't fit below 4GB.
- User space can use GS efficiently as an additional
global pointer register

I also included one minor (unrelated) optimization to 
disable an unneeded old SWAPGS workaround.

-Andi


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-05-02 15:18 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 22:12 Add support for RD/WR FS/GSBASE Andi Kleen
2014-04-28 22:12 ` [PATCH 1/7] percpu: Add a DEFINE_PER_CPU_2PAGE_ALIGNED Andi Kleen
2014-05-02 15:18   ` Tejun Heo
2014-04-28 22:12 ` [PATCH 2/7] x86: Naturally align the debug IST stack Andi Kleen
2014-04-28 22:12 ` [PATCH 3/7] x86: Add C intrinsics for new rd/wr fs/gs base instructions Andi Kleen
2014-04-29 14:10   ` Konrad Rzeszutek Wilk
2014-04-28 22:12 ` [PATCH 4/7] x86: Add support for rd/wr fs/gs base Andi Kleen
2014-04-29 18:19   ` Andy Lutomirski
2014-04-29 23:39     ` Andi Kleen
2014-04-30  4:52       ` H. Peter Anvin
2014-04-30  4:57         ` H. Peter Anvin
2014-04-30 23:44         ` Andy Lutomirski
2014-04-30 23:47           ` Andy Lutomirski
2014-05-01 21:15           ` Andi Kleen
2014-05-01 21:39             ` Andy Lutomirski
2014-05-01 21:51               ` Andi Kleen
2014-05-01 21:53                 ` Andy Lutomirski
2014-05-01 21:58             ` H. Peter Anvin
2014-05-01 22:06               ` Andy Lutomirski
2014-05-01 22:18               ` Andi Kleen
2014-05-01 22:45                 ` H. Peter Anvin
2014-04-28 22:12 ` [PATCH 5/7] x86: Make old K8 swapgs workaround conditional Andi Kleen
2014-04-30  4:57   ` H. Peter Anvin
2014-04-28 22:12 ` [PATCH 6/7] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Andi Kleen
2014-04-28 22:12 ` [PATCH 7/7] x86: Add documentation for rd/wr fs/gs base Andi Kleen
2014-04-29  2:23   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox