From: Borislav Petkov <bp@amd64.org>
To: Andy Lutomirski <luto@MIT.EDU>
Cc: "x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.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>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@amd64.org>
Subject: Re: [PATCH v4 1/6] x86-64: Clean up vdso/kernel shared variables
Date: Mon, 16 May 2011 19:23:38 +0200 [thread overview]
Message-ID: <20110516172338.GC22383@aftab> (raw)
In-Reply-To: <5062fb3d104744b00b45afec76bf78e504785370.1305560561.git.luto@mit.edu>
On Mon, May 16, 2011 at 12:00:58PM -0400, Andy Lutomirski wrote:
> Variables that are shared between the vdso and the kernel are
> currently a bit of a mess. They are each defined with their own
> magic, they are accessed differently in the kernel, the vsyscall page,
> and the vdso, and one of them (vsyscall_clock) doesn't even really
> exist.
>
> This changes them all to use a common mechanism. All of them are
> delcared in vvar.h with a fixed address (validated by the linker
> script). In the kernel (as before), they look like ordinary
> read-write variables. In the vsyscall page and the vdso, they are
> accessed through a new macro VVAR, which gives read-only access.
>
> The vdso is now loaded verbatim into memory without any fixups. As a
> side bonus, access from the vdso is faster because a level of
> indirection is removed.
>
> While we're at it, pack jiffies and vgetcpu_mode into the same
> cacheline.
How about
Signed-off-by:...
or you don't wanna? :)
> ---
> arch/x86/include/asm/vdso.h | 14 ----------
> arch/x86/include/asm/vgtod.h | 2 -
> arch/x86/include/asm/vsyscall.h | 12 +-------
> arch/x86/include/asm/vvar.h | 52 +++++++++++++++++++++++++++++++++++++++
> arch/x86/kernel/time.c | 2 +-
> arch/x86/kernel/tsc.c | 4 +-
> arch/x86/kernel/vmlinux.lds.S | 34 ++++++++-----------------
> arch/x86/kernel/vsyscall_64.c | 46 +++++++++++++++-------------------
> arch/x86/vdso/Makefile | 2 +-
> arch/x86/vdso/vclock_gettime.c | 3 +-
> arch/x86/vdso/vdso.lds.S | 7 -----
> arch/x86/vdso/vextern.h | 16 ------------
> arch/x86/vdso/vgetcpu.c | 3 +-
> arch/x86/vdso/vma.c | 27 --------------------
> arch/x86/vdso/vvar.c | 12 ---------
> 15 files changed, 91 insertions(+), 145 deletions(-)
> create mode 100644 arch/x86/include/asm/vvar.h
> delete mode 100644 arch/x86/vdso/vextern.h
> delete mode 100644 arch/x86/vdso/vvar.c
>
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2011-05-16 17:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 16:00 [PATCH v4 0/6] Micro-optimize vclock_gettime 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 [this message]
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
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=20110516172338.GC22383@aftab \
--to=bp@amd64.org \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.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=tglx@linutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.