[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa5b5bf5-64cd-4c23-a491-5e04acf53d23@bytedance.com>
Date: Fri, 9 Aug 2024 09:59:09 +0800
From: Yang Jihong <yangjihong@...edance.com>
To: vineethr@...ux.ibm.com
Cc: Peter Zijlstra <peterz@...radead.org>, mingo@...hat.com, acme@...nel.org,
namhyung@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, kan.liang@...ux.intel.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Subject: Re: [External] Re: [PATCH 1/2] perf sched timehist: Add --show-prio
option
Hello,
On 8/9/24 02:42, Madadi Vineeth Reddy wrote:
> Hi Yang Jihong,
>
> On 06/08/24 07:27, Yang Jihong wrote:
>> The --show-prio option is used to display the priority of task.
>> It is disabled by default, which is consistent with original behavior.
>>
>> The display format is xxx (priority does not change during task running)
>> or xxx->yyy (priority changes during task running)
>>
>
> I had done the following steps.
> 1) Ran 'perf sched record stress-ng --cpu 32 -l 50 --timeout 40s'
> 2) Changed the nice value of stress-ng while the record was going on.
> ps -C stress-ng -o pid=
> 64195
>
> renice -n 10 -p 64195
>
> 3) Then ran 'perf sched timehist --show-prio'
>
> 343918.720052 [0015] stress-ng[64195] 120 0.013 0.013 21.719
> .
> .
> 343958.797257 [0009] stress-ng[64195] 130 40076.812 0.007 0.393
>
> The output shows the final priority change of stress-ng from 120 to 130,
> but the transition format xxx->yyy is not displayed.
>
> Am I missing something?
>
1. I think it may be because when change the priority of stress-ng, the
stress-ng task had been sched_out and did not run.
2.
sched_switch: A -> B(prio1)
sched_switch: B(prio_2) -> C
The specific details are that:
first process the first sched_switch event, read the priority of task B,
as prio1.
then process the second sched_switch event, read the priority of task B,
as prio2.
Only when change the priority of task B, it is in the running state,
will show prio1->prio2
Thanks,
Yang.
Powered by blists - more mailing lists