public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Sapkal, Swapnil" <swapnil.sapkal@amd.com>
To: "Chen, Yu C" <yu.c.chen@intel.com>
Cc: <ravi.bangoria@amd.com>, <mark.rutland@arm.com>,
	<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
	<rostedt@goodmis.org>, <vincent.guittot@linaro.org>,
	<adrian.hunter@intel.com>, <kan.liang@linux.intel.com>,
	<gautham.shenoy@amd.com>, <kprateek.nayak@amd.com>,
	<juri.lelli@redhat.com>, <yangjihong@bytedance.com>,
	<void@manifault.com>, <tj@kernel.org>, <sshegde@linux.ibm.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-perf-users@vger.kernel.org>, <santosh.shukla@amd.com>,
	<ananth.narayan@amd.com>, <sandipan.das@amd.com>,
	<peterz@infradead.org>, <acme@kernel.org>, <james.clark@arm.com>,
	<namhyung@kernel.org>, <irogers@google.com>, <mingo@redhat.com>
Subject: Re: [PATCH v3 0/8] perf sched: Introduce stats tool
Date: Thu, 10 Apr 2025 15:59:04 +0530	[thread overview]
Message-ID: <1840fbe3-d538-4b41-8465-c22d9f1d1e1a@amd.com> (raw)
In-Reply-To: <917bb3c8-e084-4790-b0ac-f0433cfca758@intel.com>

Hi Chenyu,

On 4/10/2025 3:11 PM, Chen, Yu C wrote:
> Hi Swapnil,
> 
> On 3/11/2025 8:02 PM, Swapnil Sapkal wrote:
>> MOTIVATION
>> ----------
>>
>> Existing `perf sched` is quite exhaustive and provides lot of insights
>> into scheduler behavior but it quickly becomes impractical to use for
>> long running or scheduler intensive workload. For ex, `perf sched record`
>> has ~7.77% overhead on hackbench (with 25 groups each running 700K loops
>> on a 2-socket 128 Cores 256 Threads 3rd Generation EPYC Server), and it
>> generates huge 56G perf.data for which perf takes ~137 mins to prepare
>> and write it to disk [1].
>>
>> Unlike `perf sched record`, which hooks onto set of scheduler tracepoints
>> and generates samples on a tracepoint hit, `perf sched stats record` takes
>> snapshot of the /proc/schedstat file before and after the workload, i.e.
>> there is almost zero interference on workload run. Also, it takes very
>> minimal time to parse /proc/schedstat, convert it into perf samples and
>> save those samples into perf.data file. Result perf.data file is much
>> smaller. So, overall `perf sched stats record` is much more light weight
>> compare to `perf sched record`.
>>
>> We, internally at AMD, have been using this (a variant of this, known as
>> "sched-scoreboard"[2]) and found it to be very useful to analyse impact
>> of any scheduler code changes[3][4]. Prateek used v2[5] of this patch
>> series to report the analysis[6][7].
>>
>> Please note that, this is not a replacement of perf sched record/report.
>> The intended users of the new tool are scheduler developers, not regular
>> users.
>>
>> USAGE
>> -----
>>
>>    # perf sched stats record
>>    # perf sched stats report
>>    # perf sched stats diff
>>
> 
> May I know the status of this patch set? I tested it on a 96 cores system and it works as expected in general.

Thank you for testing the patch set. I am working on v4 based on the Namhyung's suggestions.

> 
> One nit question:
> Is perf.data and perf.data.old the default files
> for comparison if no files are provided in
> perf sched stats diff?
> 

Yes, if no files are provided to `perf sched stats diff`, it will take perf.data and perf.data.old as defaults.

> 
> thanks,
> Chenyu
> 
> 
--
Thanks and Regards,
Swapnil

      reply	other threads:[~2025-04-10 10:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 12:02 [PATCH v3 0/8] perf sched: Introduce stats tool Swapnil Sapkal
2025-03-11 12:02 ` [PATCH v3 1/8] perf sched stats: Add record and rawdump support Swapnil Sapkal
2025-03-11 13:10   ` Markus Elfring
2025-03-11 16:19   ` Markus Elfring
2025-03-15  2:24   ` Namhyung Kim
2025-03-17 13:29     ` Sapkal, Swapnil
2025-03-11 12:02 ` [PATCH v3 2/8] perf sched stats: Add schedstat v16 support Swapnil Sapkal
2025-03-11 12:02 ` [PATCH v3 3/8] perf sched stats: Add schedstat v17 support Swapnil Sapkal
2025-03-15  2:27   ` Namhyung Kim
2025-03-17 13:32     ` Sapkal, Swapnil
2025-03-11 12:02 ` [PATCH v3 4/8] perf sched stats: Add support for report subcommand Swapnil Sapkal
2025-03-15  4:39   ` Namhyung Kim
2025-03-18 11:08     ` Sapkal, Swapnil
2025-05-20 10:36   ` Peter Zijlstra
2025-05-21  5:32     ` Sapkal, Swapnil
2025-03-11 12:02 ` [PATCH v3 5/8] perf sched stats: Add support for live mode Swapnil Sapkal
2025-03-15  4:46   ` Namhyung Kim
2025-03-24  9:15     ` Sapkal, Swapnil
2025-03-11 12:02 ` [PATCH v3 6/8] perf sched stats: Add support for diff subcommand Swapnil Sapkal
2025-03-11 12:02 ` [PATCH v3 7/8] perf sched stats: Add basic perf sched stats test Swapnil Sapkal
2025-03-11 12:02 ` [PATCH v3 8/8] perf sched stats: Add details in man page Swapnil Sapkal
2025-04-10  9:41 ` [PATCH v3 0/8] perf sched: Introduce stats tool Chen, Yu C
2025-04-10 10:29   ` Sapkal, Swapnil [this message]

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=1840fbe3-d538-4b41-8465-c22d9f1d1e1a@amd.com \
    --to=swapnil.sapkal@amd.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth.narayan@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=rostedt@goodmis.org \
    --cc=sandipan.das@amd.com \
    --cc=santosh.shukla@amd.com \
    --cc=sshegde@linux.ibm.com \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=void@manifault.com \
    --cc=yangjihong@bytedance.com \
    --cc=yu.c.chen@intel.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