From: Peter Zijlstra <peterz@infradead.org>
To: Zhang Yuchen <zhangyuchen.lcr@bytedance.com>
Cc: akpm@linux-foundation.org, david@redhat.com, mingo@redhat.com,
ast@kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org,
linux-api@vger.kernel.org, fam.zheng@bytedance.com
Subject: Re: [PATCH] procfs: add syscall statistics
Date: Fri, 27 May 2022 14:18:20 +0200 [thread overview]
Message-ID: <YpDBjDTpS4evca3F@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20220527110959.54559-1-zhangyuchen.lcr@bytedance.com>
On Fri, May 27, 2022 at 07:09:59PM +0800, Zhang Yuchen wrote:
> Add /proc/syscalls to display percpu syscall count.
>
> We need a less resource-intensive way to count syscall per cpu
> for system problem location.
>
> There is a similar utility syscount in the BCC project, but syscount
> has a high performance cost.
>
> The following is a comparison on the same machine, using UnixBench
> System Call Overhead:
>
> ┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
> ┃ Change ┃ Unixbench Score ┃ Loss ┃
> ┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
> │ no change │ 1072.6 │ --- │
> │ syscall count │ 982.5 │ 8.40% │
> │ bpf syscount │ 614.2 │ 42.74% │
> └───────────────┴─────────────────┴────────┘
>
> UnixBench System Call Use sys_gettid to test, this system call only reads
> one variable, so the performance penalty seems large. When tested with
> fork, the test scores were almost the same.
>
> So the conclusion is that it does not have a significant impact on system
> call performance.
>
> This function depends on CONFIG_FTRACE_SYSCALLS because the system call
> number is stored in syscall_metadata.
Death by a thousand cuts. 99% of people won't ever use this.
NAK
next prev parent reply other threads:[~2022-05-27 12:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 11:09 [PATCH] procfs: add syscall statistics Zhang Yuchen
2022-05-27 11:49 ` Greg KH
2022-05-27 12:18 ` Peter Zijlstra [this message]
2022-05-27 14:13 ` Alexei Starovoitov
2022-05-27 14:23 ` kernel test robot
2022-05-27 17:00 ` kernel test robot
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=YpDBjDTpS4evca3F@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=david@redhat.com \
--cc=fam.zheng@bytedance.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=zhangyuchen.lcr@bytedance.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