Linux Perf Users
 help / color / mirror / Atom feed
From: Changbin Du <changbin.du@huawei.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Changbin Du <changbin.du@huawei.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf: add new option '--workload-attr' to set workload sched_policy/priority/mask
Date: Fri, 14 Jul 2023 15:19:14 +0800	[thread overview]
Message-ID: <20230714071914.3jro4kfcvhun2ptd@M910t> (raw)
In-Reply-To: <b1127b63-6c6a-e42e-ce6c-cf4f24bbc5a1@intel.com>

On Fri, Jul 14, 2023 at 10:06:31AM +0300, Adrian Hunter wrote:
> On 13/07/23 11:58, Changbin Du wrote:
> > To get consistent benchmarking results, sometimes we need to set the
> > sched_policy/priority/mask of the workload to reduce system noise.
> > 
> > For example, CPU binding is required on big.little system.
> > 
> >   $ perf stat -r 10 -- taskset -c 0 ls
> > 
> > Nevertheless, the 'taskset' is also counted here.
> > 
> > To get away of the middleman, this adds a new option '--workload-attr' to
> > do the same jobs for stat and record commands.
> > 
> >   $ sudo perf stat --workload-attr fifo,40,0x1 -- ls
> > 
> > Above will make 'ls' run on CPU #0 with fifo scheduler and realtime
> > priority is 40.
> 
> Aren't there ways to set up a process then start perf using -p <pid>
> then let the process continue.
>
By that you need a mechanism to pause the new spawnned process and wait perf to
attach. Or setup the sched properties by the app itself. But sometimes we just
simply want to run the app through and measure some events. With
--workload-attr, we do not need extra setup works.

-- 
Cheers,
Changbin Du

  reply	other threads:[~2023-07-14  7:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  8:58 [PATCH] perf: add new option '--workload-attr' to set workload sched_policy/priority/mask Changbin Du
2023-07-14  7:06 ` Adrian Hunter
2023-07-14  7:19   ` Changbin Du [this message]
2023-07-19 16:55     ` Ian Rogers
2023-07-24  3:50       ` Changbin Du

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=20230714071914.3jro4kfcvhun2ptd@M910t \
    --to=changbin.du@huawei.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --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 \
    /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