Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3204652rwl; Mon, 27 Mar 2023 10:37:14 -0700 (PDT) X-Google-Smtp-Source: AKy350adYChq0na44AeISX4O+k6fAXp05gyHvW0bzky525YweY2kuC+DT9rUDBF+KxaajMfO3I17 X-Received: by 2002:a17:90b:1c08:b0:23f:2d2c:abcf with SMTP id oc8-20020a17090b1c0800b0023f2d2cabcfmr13564986pjb.7.1679938634379; Mon, 27 Mar 2023 10:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679938634; cv=none; d=google.com; s=arc-20160816; b=yehiC4Jn+c5tzmnUPcdV4WxOknVthLNSA8DWHdfA3phhTPhsJyc7pZscS9DTd2wzn0 3pZfIxjf/5pjEx2eoEqVzmmIaITcq8kSMbgsJ2GQHSrmCWNEJeD6GoYVbJ2YGzrMysQl vRzSF1plI9NREbhrQfhWYwAeMWBKwBBznHQIl+A0MHEmnJxs+QBxx2PwswGgH7y6Eu7q XguE8vVU/Gne+hdIW+UZNqDy73O8EGlyyumTgGk55zcFOyYiP17+fD2FvaQBKtgNvEIE RVqA7dhTPEKZL0hJxJo19L4JC2BL4Q2HviEJzGRuskaXmSYEjv6gEPPSo0xHbyMKoSmP oIOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=ADYqV4bB8WnB28cQU0ssIE9215AHXdga3RFIOb9aKac=; b=utCcX9iFPUvyT1z6g510X7yHL9rE+OfQlDxPMKhFI77GMglOH/XAP6iplrS4jH/No6 CAzGP3q/4hoAOsI9lrUhHhVkBIavkwV3C354VFex3x7UQO8QVIE5RMdfYLPXD81jBMTC nuGm1dxm0/7oZ/GsYOiG+kxPF7pRWsXJR+aWMSo7AjhkQ7Rdo+iNHdOIasDl3i8Oiu4Z gEPInnFQ1ZtHyiu/xsAz7HzDvzXu+UzUJLd7lL+CquoAWQOOjNxiWVtPbiZIYtUvOnWD B59XRLRyrHx9KGj13Ti9B/Oq8SZ+L3zO2Wwlhgwxfz1ZPBPjZhgEHXcAhX0Bwl7nYvds sTVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a170902d48c00b001a1e308a820si16856574plg.624.2023.03.27.10.37.02; Mon, 27 Mar 2023 10:37:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbjC0RZp convert rfc822-to-8bit (ORCPT + 99 others); Mon, 27 Mar 2023 13:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjC0RZo (ORCPT ); Mon, 27 Mar 2023 13:25:44 -0400 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8453335BC; Mon, 27 Mar 2023 10:25:43 -0700 (PDT) Received: by mail-ed1-f45.google.com with SMTP id r11so39287560edd.5; Mon, 27 Mar 2023 10:25:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679937942; h=content-transfer-encoding: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=1OVLlopepnUHjlsBsGHfIJFC5O1WltNhIUmleYbqMCA=; b=iBJKQdiC6gABfGdAvqk6R/Cot2YBNx8vNr/cKK8HFbzSrw8ViBRB+jDOOa5CUUAjXP VhhOzPKoN70qbClsJfdQe8IaCqcedRnrwqlgzfHuPy8gnHsYVNEW5+pRKCh2pVIMUDAd PdkTlcrbl5H1ZnC7vEwS65VgWtvy53wb0a/MEFbAa+2pVewmkEtYG1DreV45Hkd7JYv2 XJac+L5ls4vm4GYsWnslXy5I9/3DY1sgZunj9BfMR48wy3IcRVspXrJL9pvViKe1ncVN bX8RK7+/kDKU9ghauEXfKBCRh/BoFGxEVjtb9/DIi0kCKNGtc3pnaBis4iqDLgYOFvCw Rk5A== X-Gm-Message-State: AAQBX9dRpzR1w/ptsEmq3tFmxlq8Jaboykw7bZ8hRMcTxJlticGuGo2o pv2mu5M42VntSIga2omYLqUmPdpQUPWmVdb71z0= X-Received: by 2002:a50:d6d6:0:b0:4fb:c8e3:1adb with SMTP id l22-20020a50d6d6000000b004fbc8e31adbmr6050643edj.3.1679937941987; Mon, 27 Mar 2023 10:25:41 -0700 (PDT) MIME-Version: 1.0 References: <20230316013307.322402-1-luoxueqin@kylinos.cn> In-Reply-To: <20230316013307.322402-1-luoxueqin@kylinos.cn> From: "Rafael J. Wysocki" Date: Mon, 27 Mar 2023 19:25:30 +0200 Message-ID: Subject: Re: [PATCH v2] PM: tools: add "CPU killed" messages to fix an error in suspend flow To: Xueqin Luo Cc: rafael@kernel.org, todd.e.brandt@linux.intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, xiongxin@kylinos.cn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 16, 2023 at 2:33 AM Xueqin Luo wrote: > > On the arm64 platform, the core log of cpu offline is as follows: > > [ 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) > > And this goal of this patch is to prevent sleepgraph from mistakenly > treating the "CPU up" message as part of the suspend flow (because it > should be regarded as part of the resume flow). > > Signed-off-by: Xueqin Luo > --- > > v2: update changelog > > 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] = [] > -- Applied as 6.4 material with some edits in the subject and changelog. Thanks!