From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Lutomirski <luto@mit.edu>
Cc: Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Borislav Petkov <bp@amd64.org>
Subject: Re: [PATCH v4 0/6] Micro-optimize vclock_gettime
Date: Wed, 18 May 2011 09:30:22 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1105180839370.3078@ionos> (raw)
In-Reply-To: <BANLkTik9+UGLvPCLYO246N4fMxJ5F=vHwA@mail.gmail.com>
On Tue, 17 May 2011, Andrew Lutomirski wrote:
> On Tue, May 17, 2011 at 6:59 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > Furthermore any halfways up to date deployemnt is using VDSO for
> > obvious reasons and the archaic stuff which might be affected is not
> > using a recent kernel at all (except for akpm on his retro laptop, but
> > that "performance penalty" is probably the least of his worries).
>
> Sadly that's not quite true. glibc git right now contains this:
>
> ENTRY (__gettimeofday)
> /* Align stack. */
> sub $0x8, %rsp
> cfi_adjust_cfa_offset(8)
> #ifdef SHARED
> movq __vdso_gettimeofday(%rip), %rax
> PTR_DEMANGLE (%rax)
> #else
> movq $VSYSCALL_ADDR_vgettimeofday, %rax
> #endif
> callq *%rax
I know that, but again: Are statically linked binaries a real issue ?
> And time() and sched_getcpu() call the vsyscall page unconditionally.
Dammit, time() is a real problem. I missed that and thought that it's
gettimeofday() alone for the static case. sched_getcpu() is nothing to
worry about.
> We should either declare CLOCK_REALTIME_COARSE to be acceptable for
> time() or add a new vDSO call.
Separate call.
> IMO we should put a note in feature-removal-schedule.txt, add vsyscall
> emulation as a config option for 2.6.41 but leave it turned off by
> default, and turn it on by default (or just remove the old code) in
> 2.6.43 or so. That'll give glibc a chance to stop generating *new*
> static binaries that call it.
>
> I'm not volunteering to dig around the libdl stuff to fix it myself.
>
> klibc doesn't seem to use vsyscalls or the vDSO. I haven't looked at
> uclibc, and I don't think that Bionic has any released version on
> x86_64.
uclibc is safe as well. The VSYSCALL usage is in the futex code, but
is conditional and not used on current kernels. That code is copied
from glibc.
Thanks,
tglx
next prev parent reply other threads:[~2011-05-18 7:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 16:00 Andy Lutomirski
2011-05-16 16:00 ` [PATCH v4 1/6] x86-64: Clean up vdso/kernel shared variables Andy Lutomirski
2011-05-16 17:23 ` Borislav Petkov
2011-05-16 17:34 ` Andrew Lutomirski
2011-05-16 16:00 ` [PATCH v4 2/6] x86-64: Remove unnecessary barrier in vread_tsc Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 3/6] x86-64: Don't generate cmov " Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 4/6] x86-64: vclock_gettime(CLOCK_MONOTONIC) can't ever see nsec < 0 Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 5/6] x86-64: Move vread_tsc into a new file with sensible options Andy Lutomirski
2011-05-16 16:01 ` [PATCH v4 6/6] x86-64: Turn off -pg and turn on -foptimize-sibling-calls for vDSO Andy Lutomirski
2011-05-16 16:09 ` [PATCH v4 0/6] Micro-optimize vclock_gettime Andi Kleen
2011-05-16 16:25 ` Thomas Gleixner
2011-05-16 16:49 ` Andi Kleen
2011-05-16 17:05 ` Andrew Lutomirski
2011-05-16 20:22 ` Andi Kleen
2011-05-16 21:28 ` Andrew Lutomirski
2011-05-16 21:53 ` Thomas Gleixner
2011-05-16 22:17 ` Andrew Lutomirski
2011-05-16 22:40 ` Thomas Gleixner
2011-05-17 8:00 ` Ingo Molnar
2011-05-17 11:11 ` Andrew Lutomirski
2011-05-17 11:36 ` Ingo Molnar
2011-05-17 18:31 ` Andy Lutomirski
2011-05-17 19:27 ` Ingo Molnar
2011-05-17 21:31 ` Andi Kleen
2011-05-17 22:59 ` Thomas Gleixner
2011-05-18 3:18 ` Andrew Lutomirski
2011-05-18 7:30 ` Thomas Gleixner [this message]
2011-05-18 8:31 ` Ingo Molnar
2011-05-18 11:30 ` Andrew Lutomirski
2011-05-18 12:10 ` Ingo Molnar
2011-05-17 7:56 ` Ingo Molnar
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=alpine.LFD.2.02.1105180839370.3078@ionos \
--to=tglx@linutronix.de \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=bp@amd64.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@mit.edu \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--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
Powered by JetHome