All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] getcpu_cache system call for 4.6
@ 2016-02-23 23:28 Mathieu Desnoyers
  2016-02-23 23:28   ` Mathieu Desnoyers
                   ` (5 more replies)
  0 siblings, 6 replies; 96+ messages in thread
From: Mathieu Desnoyers @ 2016-02-23 23:28 UTC (permalink / raw)
  To: Andrew Morton, Russell King, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin
  Cc: linux-kernel, linux-api, Paul Turner, Andrew Hunter,
	Peter Zijlstra, Andy Lutomirski, Andi Kleen, Dave Watson,
	Chris Lameter, Ben Maurer, Steven Rostedt, Paul E. McKenney,
	Josh Triplett, Linus Torvalds, Catalin Marinas, Will Deacon,
	Michael Kerrisk, Mathieu Desnoyers

Hi,

Here is a patchset implementing a cache for the CPU number of the
currently running thread in user-space.

Benchmarks comparing this approach to a getcpu based on system call on
ARM show a 44x speedup. They show a 14x speedup on x86-64 compared to
executing lsl from a vDSO through glibc.

I'm added a man page in the changelog of patch 1/3, which shows an
example usage of this new system call.

This series is based on v4.5-rc5, submitted for Linux 4.6.

Feedback is welcome,

Thanks!

Mathieu


Mathieu Desnoyers (5):
  getcpu_cache system call: cache CPU number of running thread
  getcpu_cache: ARM resume notifier
  getcpu_cache: wire up ARM system call
  getcpu_cache: x86 32/64 resume notifier
  getcpu_cache: wire up x86 32/64 system call

 MAINTAINERS                            |   7 ++
 arch/arm/include/uapi/asm/unistd.h     |   1 +
 arch/arm/kernel/calls.S                |   3 +-
 arch/arm/kernel/signal.c               |   1 +
 arch/x86/entry/common.c                |   1 +
 arch/x86/entry/syscalls/syscall_32.tbl |   1 +
 arch/x86/entry/syscalls/syscall_64.tbl |   1 +
 fs/exec.c                              |   1 +
 include/linux/sched.h                  |  36 ++++++++
 include/uapi/linux/Kbuild              |   1 +
 include/uapi/linux/getcpu_cache.h      |  42 +++++++++
 init/Kconfig                           |  10 ++
 kernel/Makefile                        |   1 +
 kernel/fork.c                          |   4 +
 kernel/getcpu_cache.c                  | 163 +++++++++++++++++++++++++++++++++
 kernel/sched/sched.h                   |   1 +
 kernel/sys_ni.c                        |   3 +
 17 files changed, 276 insertions(+), 1 deletion(-)
 create mode 100644 include/uapi/linux/getcpu_cache.h
 create mode 100644 kernel/getcpu_cache.c

-- 
2.1.4

^ permalink raw reply	[flat|nested] 96+ messages in thread

end of thread, other threads:[~2016-03-02 10:44 UTC | newest]

Thread overview: 96+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 23:28 [PATCH v4 0/5] getcpu_cache system call for 4.6 Mathieu Desnoyers
2016-02-23 23:28 ` [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread Mathieu Desnoyers
2016-02-23 23:28   ` Mathieu Desnoyers
2016-02-24 11:11   ` Thomas Gleixner
2016-02-24 17:17     ` Mathieu Desnoyers
2016-02-25 23:32     ` Rasmus Villemoes
2016-02-25 23:32       ` Rasmus Villemoes
2016-02-26 17:47       ` Mathieu Desnoyers
2016-02-25  9:56   ` Peter Zijlstra
2016-02-25  9:56     ` Peter Zijlstra
2016-02-25 16:55     ` Mathieu Desnoyers
2016-02-25 16:55       ` Mathieu Desnoyers
2016-02-25 17:04       ` Peter Zijlstra
2016-02-25 17:04         ` Peter Zijlstra
2016-02-25 17:17         ` Mathieu Desnoyers
2016-02-25 17:17           ` Mathieu Desnoyers
2016-02-26 11:33           ` Peter Zijlstra
2016-02-26 11:33             ` Peter Zijlstra
2016-02-26 16:29             ` Thomas Gleixner
2016-02-26 16:29               ` Thomas Gleixner
2016-02-26 17:20               ` Mathieu Desnoyers
2016-02-26 18:01                 ` Thomas Gleixner
2016-02-26 18:01                   ` Thomas Gleixner
2016-02-26 20:24                   ` Mathieu Desnoyers
2016-02-26 20:24                     ` Mathieu Desnoyers
2016-02-26 23:04                     ` H. Peter Anvin
2016-02-27  0:40                       ` Mathieu Desnoyers
2016-02-27  0:40                         ` Mathieu Desnoyers
2016-02-27  6:24                         ` H. Peter Anvin
2016-02-27  6:24                           ` H. Peter Anvin
2016-02-27 14:15                           ` Mathieu Desnoyers
2016-02-27 14:15                             ` Mathieu Desnoyers
2016-02-27 14:58                             ` Peter Zijlstra
2016-02-27 14:58                               ` Peter Zijlstra
2016-02-27 18:35                               ` Linus Torvalds
2016-02-27 18:35                                 ` Linus Torvalds
2016-02-27 19:01                                 ` H. Peter Anvin
2016-02-27 19:01                                   ` H. Peter Anvin
2016-02-27 23:53                                 ` Mathieu Desnoyers
     [not found]                                   ` <CA+55aFwcgwRxvVBz5kk_3O8dESXAGJ4KHBkf=pSXjiS7Xh4NwA@mail.gmail.com>
     [not found]                                     ` <1082926946.10326.1456619994590.JavaMail.zimbra@efficios.com>
2016-02-28  0:57                                       ` Linus Torvalds
2016-02-28  0:57                                         ` Linus Torvalds
2016-02-28 14:32                                         ` Mathieu Desnoyers
2016-02-28 14:32                                           ` Mathieu Desnoyers
2016-02-29 10:35                                           ` Peter Zijlstra
2016-02-29 10:35                                             ` Peter Zijlstra
2016-03-01 20:23                                             ` Mathieu Desnoyers
2016-03-01 20:23                                               ` Mathieu Desnoyers
2016-03-01 21:32                                               ` Peter Zijlstra
2016-03-01 21:32                                                 ` Peter Zijlstra
2016-03-01 21:36                                                 ` Peter Zijlstra
2016-03-01 21:36                                                   ` Peter Zijlstra
2016-03-01 21:47                                                 ` H. Peter Anvin
2016-03-02 10:34                                                   ` Peter Zijlstra
2016-02-29 10:32                                       ` Peter Zijlstra
2016-02-29 10:32                                         ` Peter Zijlstra
2016-02-29 10:39                                         ` Arnd Bergmann
2016-02-29 10:39                                           ` Arnd Bergmann
2016-02-29 12:41                                           ` Mathieu Desnoyers
2016-02-29 12:41                                             ` Mathieu Desnoyers
2016-02-29 13:08                                             ` Arnd Bergmann
2016-02-29 13:08                                               ` Arnd Bergmann
2016-02-29 18:19                                             ` H. Peter Anvin
2016-02-29 18:19                                               ` H. Peter Anvin
2016-03-02 10:44                                             ` Geert Uytterhoeven
2016-03-02 10:44                                               ` Geert Uytterhoeven
2016-03-01 18:25                                       ` H. Peter Anvin
2016-03-01 18:25                                         ` H. Peter Anvin
2016-03-01 18:40                                         ` Mathieu Desnoyers
2016-03-01 18:40                                           ` Mathieu Desnoyers
2016-02-28 13:07                                 ` Geert Uytterhoeven
2016-02-28 13:07                                   ` Geert Uytterhoeven
2016-02-28 16:21                                   ` Linus Torvalds
2016-02-28 16:21                                     ` Linus Torvalds
2016-02-29 10:01                                 ` Peter Zijlstra
2016-02-29 10:01                                   ` Peter Zijlstra
2016-02-27 15:04                             ` H. Peter Anvin
2016-02-27 15:04                               ` H. Peter Anvin
2016-02-23 23:28 ` [PATCH v4 2/5] getcpu_cache: ARM resume notifier Mathieu Desnoyers
2016-02-23 23:28 ` [PATCH v4 3/5] getcpu_cache: wire up ARM system call Mathieu Desnoyers
2016-02-24  0:54   ` kbuild test robot
2016-02-24  0:54     ` kbuild test robot
2016-02-24  1:05   ` [PATCH v4 (updated)] " Mathieu Desnoyers
2016-02-24  1:05     ` Mathieu Desnoyers
2016-02-24  5:28     ` kbuild test robot
2016-02-24  5:28       ` kbuild test robot
2016-02-24  6:54     ` kbuild test robot
2016-02-24  6:54       ` kbuild test robot
2016-02-23 23:28 ` [PATCH v4 4/5] getcpu_cache: x86 32/64 resume notifier Mathieu Desnoyers
2016-02-23 23:28 ` [PATCH v4 5/5] getcpu_cache: wire up x86 32/64 system call Mathieu Desnoyers
2016-02-24  1:36 ` [PATCH v4 0/5] getcpu_cache system call for 4.6 H. Peter Anvin
2016-02-24  1:36   ` H. Peter Anvin
2016-02-24  4:09   ` Mathieu Desnoyers
2016-02-24 20:07     ` H. Peter Anvin
2016-02-24 20:07       ` H. Peter Anvin
2016-02-24 22:38       ` Mathieu Desnoyers
2016-02-24 22:38         ` Mathieu Desnoyers

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.