Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3BC0C61DA4 for ; Thu, 23 Feb 2023 18:12:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjBWSMe (ORCPT ); Thu, 23 Feb 2023 13:12:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbjBWSMG (ORCPT ); Thu, 23 Feb 2023 13:12:06 -0500 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96CC822A24; Thu, 23 Feb 2023 10:12:05 -0800 (PST) Received: by mail-ed1-f48.google.com with SMTP id x10so44542378edd.13; Thu, 23 Feb 2023 10:12:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rEaarM4/v7i0Lz3hIFlrkMuKcSO1J4oYqrHpx/IZ4/Q=; b=zYr/etDOmn4y9bRvzJaOj2VY7/S3RtK0w4EIZX4QBXDLivotKS7fmJc9mrumaWOArZ LpP7bgmzrt4KOaYyzecLr8Sxhw40M1pmVM93CCOrEpyr52PLofSteesSlE8nYjd4DbLy oJLdfCY0GEEYiyCFOzfOu2zscRZkCJcZ/ZWuZwUBsgVOlrsMof1GYld1a8DNmml0nLwp 7Xx2e3NVqwjmWWMCV3hGcdTyKIxFdT4h2b+v5jzqDjb2jqXfO0LNUgPTpMOQJCI1hmLm OjC9kphoNoVNxxeJ9oaUdJ/LeqydiWNVYNx6XAv0rswSbcpjqsx0WivSL38kxazmXnPP sB5w== X-Gm-Message-State: AO0yUKUT5CCMBfTC94xTtU5IMC/Wa/EJKQ7NJ4gATCRwLWtqpDjXZyMt EJhu9PqDqQvtBJ7cnI0cBtiNdTqeDrOHRqVHGuCSGpynQLo= X-Google-Smtp-Source: AK7set+bwHnQcCisA+iUZl7QFkGD3nyxV+T3/46gXI0+hISWrIpYlVWBV6JDac7BpdVg0qbq1B5yIFZFnGzzoNW3seE= X-Received: by 2002:a50:9f6a:0:b0:4ae:e548:1c6 with SMTP id b97-20020a509f6a000000b004aee54801c6mr6007111edf.6.1677175923968; Thu, 23 Feb 2023 10:12:03 -0800 (PST) MIME-Version: 1.0 References: <20230223044550.339811-1-luoxueqin@kylinos.cn> In-Reply-To: <20230223044550.339811-1-luoxueqin@kylinos.cn> From: "Rafael J. Wysocki" Date: Thu, 23 Feb 2023 19:11:52 +0100 Message-ID: Subject: Re: [PATCH -next] PM: tools: add "CPU killed" timeline on arm64 platform To: Xueqin Luo , todd.e.brandt@linux.intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 23, 2023 at 5:46 AM Xueqin Luo wrote: > > On the arm64 platform, the core log of cpu offline is as follows: Please spell CPU in capitals. > [ 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[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". > Here I added core code to fix this issue. > > Signed-off-by: Xueqin Luo > --- > 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[0-9]*) is now offline', msg)): > + elif(re.match('smpboot: CPU (?P[0-9]*) is now offline', msg)) \ > + or re.match('psci: CPU(?P[0-9]*) killed.*', msg)): > # end of a cpu suspend, start of the next > m = re.match('smpboot: CPU (?P[0-9]*) is now offline', msg) > + if(not m): > + m = re.match('psci: CPU(?P[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?