From: Florian Weimer <fweimer@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Andy Lutomirski <luto@kernel.org>,
Matt Rickard <matt@softrans.com.au>,
Stephen Boyd <sboyd@kernel.org>,
John Stultz <john.stultz@linaro.org>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] x86/vdso: Handle clock_gettime(CLOCK_TAI) in vDSO
Date: Thu, 13 Sep 2018 21:07:36 +0200 [thread overview]
Message-ID: <5f9e890c-fd67-2e39-42ca-64290301b20a@redhat.com> (raw)
In-Reply-To: <F5CE2714-B491-490D-9B03-E111A61E333F@amacapital.net>
On 09/13/2018 05:22 PM, Andy Lutomirski wrote:
>
>
>> On Sep 13, 2018, at 1:07 AM, Florian Weimer <fweimer@redhat.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
next prev parent reply other threads:[~2018-09-13 19:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-01 1:59 Matt Rickard
2018-09-01 3:39 ` Andy Lutomirski
2018-09-01 9:33 ` Florian Weimer
2018-09-01 17:37 ` Andy Lutomirski
2018-09-09 20:05 ` Thomas Gleixner
2018-09-10 10:38 ` Thomas Gleixner
2018-09-12 13:01 ` Florian Weimer
2018-09-12 14:17 ` Thomas Gleixner
2018-09-12 14:20 ` Florian Weimer
2018-09-12 14:29 ` Thomas Gleixner
2018-09-12 17:11 ` Andy Lutomirski
2018-09-13 8:07 ` Florian Weimer
2018-09-13 15:22 ` Andy Lutomirski
2018-09-13 19:07 ` Florian Weimer [this message]
2018-09-13 19:35 ` Andy Lutomirski
2018-09-13 19:53 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f9e890c-fd67-2e39-42ca-64290301b20a@redhat.com \
--to=fweimer@redhat.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=matt@softrans.com.au \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®