Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1341164 > unrolled thread

[PATCH v4 3/5] getcpu_cache: wire up ARM system call

Started byMathieu Desnoyers <mathieu.desnoyers@efficios.com>
First post2016-02-24 00:30 +0100
Last post2016-02-24 08:00 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 3/5] getcpu_cache: wire up ARM system call Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-24 00:30 +0100
    Re: [PATCH v4 3/5] getcpu_cache: wire up ARM system call kbuild test robot <lkp@intel.com> - 2016-02-24 02:00 +0100
    [PATCH v4 (updated)] getcpu_cache: wire up ARM system call Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-24 02:10 +0100
      Re: [PATCH v4 (updated)] getcpu_cache: wire up ARM system call kbuild test robot <lkp@intel.com> - 2016-02-24 06:30 +0100
      Re: [PATCH v4 (updated)] getcpu_cache: wire up ARM system call kbuild test robot <lkp@intel.com> - 2016-02-24 08:00 +0100

#1341164 — [PATCH v4 3/5] getcpu_cache: wire up ARM system call

FromMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date2016-02-24 00:30 +0100
Subject[PATCH v4 3/5] getcpu_cache: wire up ARM system call
Message-ID<r5uyZ-4cb-3@gated-at.bofh.it>
Wire up the getcpu cache system call on 32-bit ARM.

This provides an ABI improving the speed of a getcpu operation
on ARM by skipping the getcpu 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: linux-api@vger.kernel.org
---
 arch/arm/include/uapi/asm/unistd.h | 1 +
 arch/arm/kernel/calls.S            | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 5dd2528..1ad1351 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -418,6 +418,7 @@
 #define __NR_membarrier			(__NR_SYSCALL_BASE+389)
 #define __NR_mlock2			(__NR_SYSCALL_BASE+390)
 #define __NR_copy_file_range		(__NR_SYSCALL_BASE+391)
+#define __NR_getcpu_cache		(__NR_SYSCALL_BASE+392)
 
 /*
  * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index dfc7cd6..7e794e9 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -399,8 +399,9 @@
 		CALL(sys_execveat)
 		CALL(sys_userfaultfd)
 		CALL(sys_membarrier)
-		CALL(sys_mlock2)
+/* 390 */	CALL(sys_mlock2)
 		CALL(sys_copy_file_range)
+		CALL(sys_getcpu_cache)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
-- 
2.1.4

[toc] | [next] | [standalone]


#1341216

Fromkbuild test robot <lkp@intel.com>
Date2016-02-24 02:00 +0100
Message-ID<r5vY6-54n-1@gated-at.bofh.it>
In reply to#1341164

[Multipart message — attachments visible in raw view] — view raw

Hi Mathieu,

[auto build test ERROR on tip/x86/core]
[also build test ERROR on v4.5-rc5]
[cannot apply to next-20160223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Mathieu-Desnoyers/getcpu_cache-system-call-for-4-6/20160224-073424
config: arm-at91_dt_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/kernel/entry-common.S: Assembler messages:
>> arch/arm/kernel/entry-common.S:132: Error: __NR_syscalls is not equal to the size of the syscall table

vim +132 arch/arm/kernel/entry-common.S

9fff2fa0 Al Viro         2012-10-10  116  	movne	r0, r4
14327c66 Russell King    2015-04-21  117  	badrne	lr, 1f
6ebbf2ce Russell King    2014-06-30  118  	retne	r5
68687c84 Russell King    2012-10-15  119  1:	get_thread_info tsk
^1da177e Linus Torvalds  2005-04-16  120  	b	ret_slow_syscall
93ed3970 Catalin Marinas 2008-08-28  121  ENDPROC(ret_from_fork)
^1da177e Linus Torvalds  2005-04-16  122  
fa1b4f91 Al Viro         2006-01-19  123  	.equ NR_syscalls,0
fa1b4f91 Al Viro         2006-01-19  124  #define CALL(x) .equ NR_syscalls,NR_syscalls+1
^1da177e Linus Torvalds  2005-04-16  125  #include "calls.S"
1f66e06f Wade Farnsworth 2012-09-07  126  
1f66e06f Wade Farnsworth 2012-09-07  127  /*
1f66e06f Wade Farnsworth 2012-09-07  128   * Ensure that the system call table is equal to __NR_syscalls,
1f66e06f Wade Farnsworth 2012-09-07  129   * which is the value the rest of the system sees
1f66e06f Wade Farnsworth 2012-09-07  130   */
1f66e06f Wade Farnsworth 2012-09-07  131  .ifne NR_syscalls - __NR_syscalls
1f66e06f Wade Farnsworth 2012-09-07 @132  .error "__NR_syscalls is not equal to the size of the syscall table"
1f66e06f Wade Farnsworth 2012-09-07  133  .endif
1f66e06f Wade Farnsworth 2012-09-07  134  
fa1b4f91 Al Viro         2006-01-19  135  #undef CALL
fa1b4f91 Al Viro         2006-01-19  136  #define CALL(x) .long x
^1da177e Linus Torvalds  2005-04-16  137  
^1da177e Linus Torvalds  2005-04-16  138  /*=============================================================================
^1da177e Linus Torvalds  2005-04-16  139   * SWI handler
^1da177e Linus Torvalds  2005-04-16  140   *-----------------------------------------------------------------------------

:::::: The code at line 132 was first introduced by commit
:::::: 1f66e06fb6414732bef7bf4a071ef76a837badec ARM: 7524/1: support syscall tracing

:::::: TO: Wade Farnsworth <wade_farnsworth@mentor.com>
:::::: CC: Russell King <rmk+kernel@arm.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1341218 — [PATCH v4 (updated)] getcpu_cache: wire up ARM system call

FromMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date2016-02-24 02:10 +0100
Subject[PATCH v4 (updated)] getcpu_cache: wire up ARM system call
Message-ID<r5w7M-5qy-5@gated-at.bofh.it>
In reply to#1341164
Wire up the getcpu cache system call on 32-bit ARM.

This provides an ABI improving the speed of a getcpu operation
on ARM by skipping the getcpu 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: linux-api@vger.kernel.org
---
 arch/arm/include/asm/unistd.h      | 2 +-
 arch/arm/include/uapi/asm/unistd.h | 1 +
 arch/arm/kernel/calls.S            | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 7b84657..194b699 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -19,7 +19,7 @@
  * This may need to be greater than __NR_last_syscall+1 in order to
  * account for the padding in the syscall table
  */
-#define __NR_syscalls  (392)
+#define __NR_syscalls  (396)
 
 #define __ARCH_WANT_STAT64
 #define __ARCH_WANT_SYS_GETHOSTNAME
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 5dd2528..1ad1351 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -418,6 +418,7 @@
 #define __NR_membarrier			(__NR_SYSCALL_BASE+389)
 #define __NR_mlock2			(__NR_SYSCALL_BASE+390)
 #define __NR_copy_file_range		(__NR_SYSCALL_BASE+391)
+#define __NR_getcpu_cache		(__NR_SYSCALL_BASE+392)
 
 /*
  * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index dfc7cd6..7e794e9 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -399,8 +399,9 @@
 		CALL(sys_execveat)
 		CALL(sys_userfaultfd)
 		CALL(sys_membarrier)
-		CALL(sys_mlock2)
+/* 390 */	CALL(sys_mlock2)
 		CALL(sys_copy_file_range)
+		CALL(sys_getcpu_cache)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1341566 — Re: [PATCH v4 (updated)] getcpu_cache: wire up ARM system call

Fromkbuild test robot <lkp@intel.com>
Date2016-02-24 06:30 +0100
SubjectRe: [PATCH v4 (updated)] getcpu_cache: wire up ARM system call
Message-ID<r5Abn-8gj-1@gated-at.bofh.it>
In reply to#1341218

[Multipart message — attachments visible in raw view] — view raw

Hi Mathieu,

[auto build test ERROR on arm/for-next]
[also build test ERROR on v4.5-rc5 next-20160223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Mathieu-Desnoyers/getcpu_cache-wire-up-ARM-system-call/20160224-090642
base:   http://repo.or.cz/linux-2.6/linux-2.6-arm.git for-next
config: arm-badge4_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/kernel/built-in.o: In function `__sys_trace_return_nosave':
>> arch/arm/kernel/entry-common.S:284: undefined reference to `sys_getcpu_cache'

vim +284 arch/arm/kernel/entry-common.S

^1da177e4 Linus Torvalds 2005-04-16  278  	b	ret_slow_syscall
^1da177e4 Linus Torvalds 2005-04-16  279  
3302caddf Russell King   2015-08-20  280  __sys_trace_return_nosave:
e0aa3a665 Russell King   2015-08-20  281  	enable_irq_notrace
3302caddf Russell King   2015-08-20  282  	mov	r0, sp
3302caddf Russell King   2015-08-20  283  	bl	syscall_trace_exit
3302caddf Russell King   2015-08-20 @284  	b	ret_slow_syscall
3302caddf Russell King   2015-08-20  285  
^1da177e4 Linus Torvalds 2005-04-16  286  	.align	5
^1da177e4 Linus Torvalds 2005-04-16  287  #ifdef CONFIG_ALIGNMENT_TRAP

:::::: The code at line 284 was first introduced by commit
:::::: 3302caddf10ad50710dbb7a94ccbdb3ad5bf1412 ARM: entry: efficiency cleanups

:::::: TO: Russell King <rmk+kernel@arm.linux.org.uk>
:::::: CC: Russell King <rmk+kernel@arm.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1341605 — Re: [PATCH v4 (updated)] getcpu_cache: wire up ARM system call

Fromkbuild test robot <lkp@intel.com>
Date2016-02-24 08:00 +0100
SubjectRe: [PATCH v4 (updated)] getcpu_cache: wire up ARM system call
Message-ID<r5BAt-CK-1@gated-at.bofh.it>
In reply to#1341218

[Multipart message — attachments visible in raw view] — view raw

Hi Mathieu,

[auto build test ERROR on arm/for-next]
[also build test ERROR on v4.5-rc5 next-20160223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Mathieu-Desnoyers/getcpu_cache-wire-up-ARM-system-call/20160224-090642
base:   http://repo.or.cz/linux-2.6/linux-2.6-arm.git for-next
config: arm-efm32_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/kernel/built-in.o: In function `__sys_trace_return_nosave':
>> arch/arm/kernel/entry-header.S:312: undefined reference to `sys_getcpu_cache'

vim +312 arch/arm/kernel/entry-header.S

a18f3645 Daniel Thompson  2015-01-09  306  	ldmdb	r2, {r0 - lr}^			@ get calling r0 - lr
b86040a5 Catalin Marinas  2009-07-24  307  	.endif
8e4971f2 Anders Grafström 2010-03-15  308  	mov	r0, r0				@ ARMv5T and earlier require a nop
8e4971f2 Anders Grafström 2010-03-15  309  						@ after ldm {}^
a18f3645 Daniel Thompson  2015-01-09  310  	add	sp, sp, #\offset + S_FRAME_SIZE
b86040a5 Catalin Marinas  2009-07-24  311  	movs	pc, lr				@ return & move spsr_svc into cpsr
aa06e5c1 Russell King     2015-08-26 @312  #elif defined(CONFIG_CPU_V7M)
aa06e5c1 Russell King     2015-08-26  313  	@ V7M restore.
aa06e5c1 Russell King     2015-08-26  314  	@ Note that we don't need to do clrex here as clearing the local
aa06e5c1 Russell King     2015-08-26  315  	@ monitor is part of the exception entry and exit sequence.

:::::: The code at line 312 was first introduced by commit
:::::: aa06e5c1f9c2b466712be904cc5b56a813e24cfd ARM: entry: get rid of multiple macro definitions

:::::: TO: Russell King <rmk+kernel@arm.linux.org.uk>
:::::: CC: Russell King <rmk+kernel@arm.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web