lkml.org 
[lkml]   [2019]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tools/testing/selftests/powerpc: Add Anton's null_syscall benchmark to the selftests
From
Date


Le 27/09/2016 à 16:10, Rui Teng a écrit :
> From: Anton Blanchard <anton@au.ibm.com>
>
> Pull in a version of Anton's null_syscall benchmark:
> http://ozlabs.org/~anton/junkcode/null_syscall.c
> Into tools/testing/selftests/powerpc/benchmarks.
>
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Anton Blanchard <anton@au.ibm.com>
> Signed-off-by: Rui Teng <rui.teng@linux.vnet.ibm.com>
> ---
> .../testing/selftests/powerpc/benchmarks/Makefile | 2 +-
> .../selftests/powerpc/benchmarks/null_syscall.c | 157 +++++++++++++++++++++
> 2 files changed, 158 insertions(+), 1 deletion(-)
> create mode 100644 tools/testing/selftests/powerpc/benchmarks/null_syscall.c
>

[...]

> +
> +static void do_null_syscall(unsigned long nr)
> +{
> + unsigned long i;
> +
> + for (i = 0; i < nr; i++)
> + getppid();
> +}
> +

Looks like getppid() performs a rcu_read_lock(). Is that what we want ?

Shouldn't we use getpid() instead for a lighter syscall ?

Christophe

\
 
 \ /
  Last update: 2019-01-23 15:56    [W:3.627 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site