Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362176
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 |
| Date | 2016-03-21 23:20 +0100 |
| Message-ID | <rfgl4-3uK-11@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <rfaIG-8aj-23@gated-at.bofh.it> <rfdQe-1Ku-15@gated-at.bofh.it> <rfdQe-1Ku-17@gated-at.bofh.it> <rfdQe-1Ku-13@gated-at.bofh.it> <rfdZV-1O7-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mar 21, 2016 12:43 PM, "Andi Kleen" <andi@firstfloor.org> wrote: > > > It would be less complicated actually, as normal userspace would just > > continue to call arch_prctl() as it does today. Glibc would implement > > We already have that through the system call, no advantage of > putting it into a vsyscall. > > Also the experience with getcpu and similar so far is that > vsyscalls are too slow for the users who want really fast paths. > So they're prefer to use the direct instructions anyways. Getcpu is mainly slow because the overcomplicated API requires branches. I've been tempted to add __vdso_get_cpu as an alternative that simply returns the CPU number. > > > arch_prctl() just like it does with gettimeofday() -- with an ifunc > > selector [1] that calls the VDSO function if it is available, or the > > syscall if not. No custom assembly needed. > > vdso always needs custom assembler, please see how glibc implements it. This is simply not true. I haven't checked the glibc implementation, and I wouldn't be remotely surprised if it is maliciously incomprehensible, but there is no reason whatsoever that using any vdso mechanism other than AT_SYSINFO itself requires assembler. AT_SYSINFO, of course, requires assembler because the calling convention is weird. --Andy
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Andi Kleen <andi@firstfloor.org> - 2016-03-21 17:20 +0100
Re: [PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Brian Gerst <brgerst@gmail.com> - 2016-03-21 20:40 +0100
Re: [PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Andi Kleen <andi@firstfloor.org> - 2016-03-21 20:50 +0100
Re: [PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Andy Lutomirski <luto@amacapital.net> - 2016-03-21 23:20 +0100
Re: [PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Andi Kleen <andi@firstfloor.org> - 2016-03-21 20:40 +0100
Re: [PATCH 4/9] x86: Enumerate kernel FSGS capability in AT_HWCAP2 Brian Gerst <brgerst@gmail.com> - 2016-03-21 20:50 +0100
csiph-web