* [PATCH] powerpc/selftests: Use gettid() instead of getppid() for null_syscall
@ 2021-06-04 12:31 Christophe Leroy
2021-06-18 3:51 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2021-06-04 12:31 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Shuah Khan
Cc: linux-kernel, linuxppc-dev, linux-kselftest
gettid() is 10% lighter than getppid(), use it for null_syscall selftest.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
tools/testing/selftests/powerpc/benchmarks/null_syscall.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/powerpc/benchmarks/null_syscall.c b/tools/testing/selftests/powerpc/benchmarks/null_syscall.c
index 579f0215c6e7..9836838a529f 100644
--- a/tools/testing/selftests/powerpc/benchmarks/null_syscall.c
+++ b/tools/testing/selftests/powerpc/benchmarks/null_syscall.c
@@ -14,6 +14,7 @@
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
+#include <sys/syscall.h>
#include <signal.h>
static volatile int soak_done;
@@ -121,7 +122,7 @@ static void do_null_syscall(unsigned long nr)
unsigned long i;
for (i = 0; i < nr; i++)
- getppid();
+ syscall(__NR_gettid);
}
#define TIME(A, STR) \
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/selftests: Use gettid() instead of getppid() for null_syscall
2021-06-04 12:31 [PATCH] powerpc/selftests: Use gettid() instead of getppid() for null_syscall Christophe Leroy
@ 2021-06-18 3:51 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2021-06-18 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt, Christophe Leroy,
Shuah Khan, Michael Ellerman
Cc: linuxppc-dev, linux-kselftest, linux-kernel
On Fri, 4 Jun 2021 12:31:09 +0000 (UTC), Christophe Leroy wrote:
> gettid() is 10% lighter than getppid(), use it for null_syscall selftest.
Applied to powerpc/next.
[1/1] powerpc/selftests: Use gettid() instead of getppid() for null_syscall
https://git.kernel.org/powerpc/c/a1ea0ca8a6f17d7b79bbc4d05dd4e6ca162d8f15
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-18 4:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 12:31 [PATCH] powerpc/selftests: Use gettid() instead of getppid() for null_syscall Christophe Leroy
2021-06-18 3:51 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).