From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Turner <pjt@google.com>, Andrew Hunter <ahh@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@amacapital.net>,
Andi Kleen <andi@firstfloor.org>,
Dave Watson <davejwatson@fb.com>, Chris Lameter <cl@linux.com>,
Ingo Molnar <mingo@redhat.com>, Ben Maurer <bmaurer@fb.com>,
rostedt <rostedt@goodmis.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-api <linux-api@vger.kernel.org>
Subject: Re: [RFC PATCH v2 2/3] thread_local_abi: wire up x86 32/64 system call
Date: Thu, 24 Dec 2015 15:17:17 +0000 (UTC) [thread overview]
Message-ID: <713900690.290718.1450970237981.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1ECDFB6F-7C34-4BBB-A45F-E0D9A4B70737@joshtriplett.org>
----- On Dec 23, 2015, at 10:42 PM, Josh Triplett josh@joshtriplett.org wrote:
> On December 22, 2015 10:02:12 AM PST, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
>>Wire up the thread local ABI on x86 32/64. Call the
>>thread_local_abi_handle_notify_resume() function on return to
>>userspace if TIF_NOTIFY_RESUME thread flag is set.
>>
>>This provides an ABI improving the speed of a getcpu operation
>>on x86 by removing the need to perform a function call, "lsl"
>>instruction, or system call on the fast path.
>>
>>Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>>CC: Russell King <linux@arm.linux.org.uk>
>>CC: Catalin Marinas <catalin.marinas@arm.com>
>>CC: Will Deacon <will.deacon@arm.com>
>>CC: Thomas Gleixner <tglx@linutronix.de>
>>CC: Paul Turner <pjt@google.com>
>>CC: Andrew Hunter <ahh@google.com>
>>CC: Peter Zijlstra <peterz@infradead.org>
>>CC: Andy Lutomirski <luto@amacapital.net>
>>CC: Andi Kleen <andi@firstfloor.org>
>>CC: Dave Watson <davejwatson@fb.com>
>>CC: Chris Lameter <cl@linux.com>
>>CC: Ingo Molnar <mingo@redhat.com>
>>CC: Ben Maurer <bmaurer@fb.com>
>>CC: Steven Rostedt <rostedt@goodmis.org>
>>CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
>>CC: Josh Triplett <josh@joshtriplett.org>
>>CC: Linus Torvalds <torvalds@linux-foundation.org>
>>CC: Andrew Morton <akpm@linux-foundation.org>
>>CC: Thomas Gleixner <tglx@linutronix.de>
>>CC: linux-api@vger.kernel.org
>>---
>> arch/x86/entry/common.c | 2 ++
>> arch/x86/entry/syscalls/syscall_32.tbl | 1 +
>> arch/x86/entry/syscalls/syscall_64.tbl | 1 +
>> 3 files changed, 4 insertions(+)
>>
>>diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
>>index a89fdbc..222cacf 100644
>>--- a/arch/x86/entry/common.c
>>+++ b/arch/x86/entry/common.c
>>@@ -249,6 +249,8 @@ static void exit_to_usermode_loop(struct pt_regs
>>*regs, u32 cached_flags)
>> if (cached_flags & _TIF_NOTIFY_RESUME) {
>> clear_thread_flag(TIF_NOTIFY_RESUME);
>> tracehook_notify_resume(regs);
>>+ if (thread_local_abi_active(current))
>>+ thread_local_abi_handle_notify_resume(current);
>
> Every caller seems likely to duplicate this pattern; why not make the call
> itself a static inline containing this check and call (or no-op if compiled
> out)?
Very good point, I'll do that.
Thanks!
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2015-12-24 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 18:02 [RFC PATCH v2 1/3] thread_local_abi system call: caching current CPU number Mathieu Desnoyers
2015-12-22 18:02 ` [RFC PATCH v2 2/3] thread_local_abi: wire up x86 32/64 system call Mathieu Desnoyers
2015-12-24 3:42 ` Josh Triplett
2015-12-24 15:17 ` Mathieu Desnoyers [this message]
2015-12-22 18:02 ` [RFC PATCH v2 3/3] thread_local_abi: wire up ARM " Mathieu Desnoyers
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=713900690.290718.1450970237981.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=ahh@google.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=bmaurer@fb.com \
--cc=catalin.marinas@arm.com \
--cc=cl@linux.com \
--cc=davejwatson@fb.com \
--cc=josh@joshtriplett.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=mtk.manpages@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
/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