From: luoxueqin <luoxueqin@kylinos.cn>
To: "Rafael J. Wysocki" <rafael@kernel.org>, todd.e.brandt@linux.intel.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] PM: tools: add "CPU killed" timeline on arm64 platform
Date: Mon, 27 Feb 2023 10:22:39 +0800 [thread overview]
Message-ID: <5b22ef4c-d0a6-5f28-7f71-e4de67d97b87@kylinos.cn> (raw)
In-Reply-To: <CAJZ5v0jyz_dpKW1GhWN=yYpR9-7WG33GbZ65aoGv+B+R9vEpEw@mail.gmail.com>
在 2023/2/24 02:11, Rafael J. Wysocki 写道:
> On Thu, Feb 23, 2023 at 5:46 AM Xueqin Luo <luoxueqin@kylinos.cn> wrote:
>>
>> On the arm64 platform, the core log of cpu offline is as follows:
>
> Please spell CPU in capitals.
Thanks for pointing out my mistake.
>
>> [ 100.431501] CPU1: shutdown
>> [ 100.454820] psci: CPU1 killed (polled 20 ms)
>> [ 100.459266] CPU2: shutdown
>> [ 100.482575] psci: CPU2 killed (polled 20 ms)
>> [ 100.486057] CPU3: shutdown
>> [ 100.513974] psci: CPU3 killed (polled 28 ms)
>> [ 100.518068] CPU4: shutdown
>> [ 100.541481] psci: CPU4 killed (polled 24 ms)
>>
>> 'smpboot: CPU (?P<cpu>[0-9]*) is now offline' cannot be applied
>> to the arm64 platform, which caused the loss of the suspend
>> machine stage in S3.
>
> I'm not exactly sure what you mean by "loss of the suspend machine stage in S3".
I made a mistake in saying "loss of the suspend machine stage in S3",
please allow me to correct it. Because the original program only
recognized the "CPU up" action on the arm64 platform, in output.html,
"CPU up" was classified as the "suspend machine" stage. Adding this code
can put "CPU killed" and "CPU up" in the correct position.
>
>> Here I added core code to fix this issue.
>>
>> Signed-off-by: Xueqin Luo <luoxueqin@kylinos.cn>
>> ---
>> tools/power/pm-graph/sleepgraph.py | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py
>> index 82c09cd25cc2..d816970b0a3d 100755
>> --- a/tools/power/pm-graph/sleepgraph.py
>> +++ b/tools/power/pm-graph/sleepgraph.py
>> @@ -4132,9 +4132,12 @@ def parseKernelLog(data):
>> elif(re.match('Enabling non-boot CPUs .*', msg)):
>> # start of first cpu resume
>> cpu_start = ktime
>> - elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)):
>> + elif(re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)) \
>> + or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)):
>> # end of a cpu suspend, start of the next
>> m = re.match('smpboot: CPU (?P<cpu>[0-9]*) is now offline', msg)
>> + if(not m):
>> + m = re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)
>> cpu = 'CPU'+m.group('cpu')
>> if(cpu not in actions):
>> actions[cpu] = []
>> --
>
> The changes look reasonable to me, though.
>
> Todd, any comments?
next prev parent reply other threads:[~2023-02-27 2:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 4:45 Xueqin Luo
2023-02-23 18:11 ` Rafael J. Wysocki
2023-02-27 2:22 ` luoxueqin [this message]
2023-03-07 12:54 ` Rafael J. Wysocki
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=5b22ef4c-d0a6-5f28-7f71-e4de67d97b87@kylinos.cn \
--to=luoxueqin@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=todd.e.brandt@linux.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
all inboxes | Powered by JetHome®