lkml.org 
[lkml]   [2015]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary
On 04/23/2015 03:55 PM, Andy Lutomirski wrote:
> On Thu, Apr 23, 2015 at 3:52 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>> On 04/23/2015 03:38 PM, Andy Lutomirski wrote:
>>>>
>>>> Because there are way more sysrets than context switches, and Linux is
>>>> particularly sensitive to system call latency, by design.
>>>
>>
>> Just to clarify: why would Linux be more sensitive to system call by
>> design? It enables much simpler APIs and avoids hacks like sending down
>> a syscall task list (which was genuinely proposed at one point.) If
>> kernel entry/exit is too expensive, then the APIs get more complex
>> because they *have* to do everything in the smallest number of system calls.
>>
>
> It's a matter of the ratio, right? One cycle of syscall overhead
> saved is worth some number of context switch cycles added, and the
> ratio probably varies by workload.
>

Correct. For workloads which do *no* system calls it is kind of "special".

> If we do syscall, two context switches, and sysret, then we wouldn't
> have been better off fixing it on sysret. But maybe most workloads
> still prefer the fixup on context switch.
>

There is also a matter of latency, which tends to be more critical for
syscall.

-hpa




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