lkml.org 
[lkml]   [2015]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary
On Thu, Apr 23, 2015 at 3:31 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 04/23/2015 03:29 PM, Andy Lutomirski wrote:
>>>
>>> Yes, the NULL SS is a special thing in 64-bit mode. I agree that
>>> context-switching it is probably the way to go; it should be cheap
>>> enough. We might even be able to conditionalize it on an X86_BUG_ flag.
>>
>> I still don't see why context switches are a better place than just
>> before sysret, but I could be convinced.
>>
>
> Because there are way more sysrets than context switches, and Linux is
> particularly sensitive to system call latency, by design.

I mean sysret but only when SS might be zero. Denys' approach
apparently needs ~4 cycles to check that (not bad), we could (yuck)
set a ti flag on context switch.

But yes, maybe you're right.

--Andy


\
 
 \ /
  Last update: 2015-04-24 01:01    [W:0.038 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site