lkml.org 
[lkml]   [2015]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/7] x86 vdso32 cleanups
On Mon, Aug 31, 2015 at 6:37 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> I got random errors from perf kvm, but I think I found at least part
> of the issue. The two irqs_disabled() calls in common.c are kind of
> expensive. I should disable them on non-lockdep kernels.
>
> The context tracking hooks are also too expensive, even when disabled.
> I should do something to optimize those. Hello, static keys? This
> doesn't affect syscalls, though.
>
> With context tracking off and the irqs_disabled checks commented out,
> we're probably doing well enough. We can always tweak the C code and
> aggressively force inlining if we want a few cycles back.

Currently, a compat AT_SYSINFO syscall (getpid) is 171 cycles for me.
With my patches, it's 196 cycles, so it's really not that bad. The
impact will probably be slightly worse on native 32-bit because of
increased register pressure and because one of the micro-optimizations
I threw in are 64-bit specific. We could probably tune the C code a
bit more to get a few of the cycles back.

On the flip side, the rewrite is *far* faster in some of the slow path
cases because the slow path no longer forces IRET.

On 32-bit, there's the added benefit that we could drop asmlinkage
from the syscall bodies on top of the rewrite.

--Andy

>
> --Andy



--
Andy Lutomirski
AMA Capital Management, LLC


\
 
 \ /
  Last update: 2015-09-02 00:01    [W:0.040 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site