[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f9e890c-fd67-2e39-42ca-64290301b20a@redhat.com>
Date: Thu, 13 Sep 2018 21:07:36 +0200
From: Florian Weimer <fweimer@...hat.com>
To: Andy Lutomirski <luto@...capital.net>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>,
Matt Rickard <matt@...trans.com.au>,
Stephen Boyd <sboyd@...nel.org>,
John Stultz <john.stultz@...aro.org>, X86 ML <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] x86/vdso: Handle clock_gettime(CLOCK_TAI) in vDSO
On 09/13/2018 05:22 PM, Andy Lutomirski wrote:
>
>
>> On Sep 13, 2018, at 1:07 AM, Florian Weimer <fweimer@...hat.com> wrote:
>>
>> On 09/12/2018 07:11 PM, Andy Lutomirski wrote:
>>>> The multiplexer interfaces need much more surgery and talking about futex,
>>>> we'd need to sit down with quite some people and identify the things they
>>>> actually care about before just splitting it up and keeping the existing
>>>> overloaded trainwreck the same.
>>>>
>>> There’s also the issue of how much the speedup matters. For futex, maybe a better interface saves 3ns, but a futex syscall is hundreds of ns. clock_gettime() is called at high frequency and can be ~25ns. Saving a few ns is a bigger deal.
>>
>> My concern is that the userspace system call wrappers currently do not know how many arguments the individual operations take and what types the arguments have (hence the “type-polymorphic” nature I mentioned). This could be a problem for on-stack argument passing (where you might read values beyond the end of the stack, and glibc avoids that most of the time by having enough cruft on the stack), and for architectures which pass pointers and integers in different registers (like some m68k ABIs do for the return value).
> Isn’t clock_gettime already special because of the vDSO entry point, though?
Somewhat special, yes, but not overly so, and not in the
type-polymorphic sense. We can't give direct access of the vDSO
implementation to applications because the kernel does not know about
the userspace errno variable. We do that for time on x86_64, where
applications call into the vDSO directly, bypassing glibc completely
after binding.
I suspect most Linux libcs that know about the vDSO at all have generic
vsyscall support, just like they have generic support for plain system
calls.
Thanks,
Florian
Powered by blists - more mailing lists