From patchwork Wed Feb 8 12:46:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 54423 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3438251wrn; Wed, 8 Feb 2023 04:58:00 -0800 (PST) X-Google-Smtp-Source: AK7set8QBh8/LzaK/EpR8gQYsoSmNHORZdVrdYH77pL2sKrVM3FOQZ8kE71UZkjTC0XZWVE9iKDJ X-Received: by 2002:a62:ce4b:0:b0:5a8:47e6:b529 with SMTP id y72-20020a62ce4b000000b005a847e6b529mr1381508pfg.1.1675861080366; Wed, 08 Feb 2023 04:58:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675861080; cv=pass; d=google.com; s=arc-20160816; b=LXdZPV0kXfwpequUuHTXJpPAnwgL+nNMwGjDTm143SCmx5P2GbYIbCXqcvVQtxe+3A Jw+HVlTvJEsne/OWV9v6xxhy9LAdeLzOXG39rnlgMRlzEzEZtHoSc7RSDSVXFazuycs8 LAOoH5lXtPMIw/BIyZejsGiFFCtFxJlF0yFXrQBMUu+/UGF2htYM8nCpieQ1CGP69Dug czKw77hpFtrXkrh9HdxfUYwU4MQC0IDNpAIh2SvTKqylQYM1gGhKe95UXOCcZK873SPW b4Vh4FAUVYFPCfbNS2Oem+rQ4U6tfad296mKkQ70VVltX8gMLFjUOXmL+sZrQvRPVtnb AHlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=/i+ONMsEbmGZiODzvUSBtKOQj/8DHV60kfIrdp+ZzqQ=; b=stiW65CktAlKQGwB8H/yztE08WflwIczra2h+72Z7CdD5i/CYgVwFGM80nQazJya9D qNQ4U6HYZC6S4s5psy4MpgWnHtqd8u8KdJP3HXJmQQ1IrKUKwVpKGL6vbW6ociSGz4ey OeBH+4AzDvlqXph+/tdXafmW2rknzFHRwOggdDHPV/DzWOcRzcAc+ufMZXdn9TlAyzMJ WyLX0tokQZ+Nrt32xxCKqvB2bAVsLVUaJqLVFxIt1T/yS73N0Bw8uUClWsZWkHR/UK1D ysyK0yhwtvBU6ql0XiQ24PojrCZG65QRPHA+6evX0oTngedhd84Obp1jZk8agD8wrbi8 JoKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="f5iED/Tw"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k198-20020a6284cf000000b0056cb4662b9csi18884867pfd.16.2023.02.08.04.57.43; Wed, 08 Feb 2023 04:58:00 -0800 (PST) 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; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="f5iED/Tw"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230414AbjBHMpx (ORCPT + 99 others); Wed, 8 Feb 2023 07:45:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231182AbjBHMps (ORCPT ); Wed, 8 Feb 2023 07:45:48 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2078.outbound.protection.outlook.com [40.107.6.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D98743B67E for ; Wed, 8 Feb 2023 04:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZQ0gvWeXrV5xGXGki6g3dne04x1Enl8+lJdj2oMPlc9jrFh4o/mY2+KpBF61hZ9D9u3Q7V5aoyRiSEj8LxKv/GdreCtpovS6qLYc4AOE8EGr1Q64pDWH3ItJsB8XMqc/e+sz/RnX1qaihWqVTgaV91639BlqhM+EKKne994QBcSwOd0RYR7zbG3ReOQoQZNmvROY4ERAF+bvDiArNlsCyhnvGpw6LH5BF/nT22nIu6T31LF5MU+06apBF1zdXjrHhc5ezw0lwUis8h0g+NCqTHsmiZ9GUzWi8EVBUvHEV15alvjCs3lRk7O3S2Svk7RYdGhcgYoFmSdDojsYe5QENQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/i+ONMsEbmGZiODzvUSBtKOQj/8DHV60kfIrdp+ZzqQ=; b=lYnApHVi5zFLFKcCGrLu09myO2f19VLX1K8Pst5g4GSrnmGwF0W+/8v/3B5j3H0wGVqKL7cUkBirGecyP5pwVZgPqmDqvI0CcnxZqZdrkuwDxN0sv6hzwUKLRtI3eiRfBmoLTbUTg0wbsioAnMmWLspgXNHBHuTYDh5VLMOXGKuwh9C/BM6FY3BSh5ccH3C4vtIg7ojRcfGK/OmF3A/Ccmt1xUuTJFgj0B4YvzsEui7E/4mMKoHc1queX+6TXAR+EJ9xTXYM28Zrcu48Yp4JRTHu3L4+8K+YwCsgeZeqTujL/UnIjKoaWo57M1cHn1pXbCbxKAKYnFd5qMlOlDAppg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/i+ONMsEbmGZiODzvUSBtKOQj/8DHV60kfIrdp+ZzqQ=; b=f5iED/Tw/1YO526vQ3dYXTNmOKLdyTDMQ67Q3za3sp8XwIdqgVHo1nkm3Lv7gzz2/gkJApfpJn1yDSZqKkgte9ePhxVZk9giR+26hrIVCw5BS1TFeDA/MSPMX4fTqbE1VavjsqyfIJn933MPNP9ri+BD+FPvetBbO7MOx2EkcE8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM8PR04MB7891.eurprd04.prod.outlook.com (2603:10a6:20b:237::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 12:45:38 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::e203:47be:36e4:c0c3]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::e203:47be:36e4:c0c3%9]) with mapi id 15.20.6043.025; Wed, 8 Feb 2023 12:45:38 +0000 From: "Peng Fan (OSS)" To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org, Peng Fan Subject: [RFC] sched: show cpu number when sched_show_task Date: Wed, 8 Feb 2023 20:46:55 +0800 Message-Id: <20230208124655.2592560-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SG2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::22) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AM8PR04MB7891:EE_ X-MS-Office365-Filtering-Correlation-Id: 8fbca494-8e99-490b-6ef5-08db09d260ee X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vhN21Hm5Coui/E3kHkaN3QY1Sq7AplzcnjL9iYSgyo9hfSfXHxuDR0esodwcjzu9XgkCcfiI19Y3o5orq5jWbKV1ZXJBMD2+UEVChQzsYSBFTKQN44xrGEvVZm5901Uw2raC7AxfZF7lWP/bH7sAvwvno0uSsSaWEluOJvFoznul7BE3fNUpJ+eB9HEhoJkJ8WiOPZT3l/Q985nBQe8aDVehkQLuvkJjdXwsMPyS868vKn4VgEe3Z1RGUxn03bn0PmYhFiI4dlz+WS2BLYyogCZWHDcYtsloK9BHoGZ9wHNYoBjoXK8c5SfGXmvUp/dC5nrTxYIEu0xX2ha4yn8JI0bRmOkI/psABVyUXKNDeKEQY1mA6DEM0RUeyBkpuUrlIdXDBkzRRB1ALUJlpUzB1VByHdWtRcPhp303rtXbZzH7z4cEQ5pNyClTHuTeyxoD36sz5O+VfVgbwthEnEDVKBINyr+/dApYw1ZH55lHa911Qk13LBObUFURD31vJpbmZDAtNQKRVHYFAdYjX/B9EgHB2XWQaKVhlh2CnDeNlfFj4RtpBlu4WY/5F4DE4dYZzcka/pLuQKZO4bhvq0xfjSsF7KUgtPsNTcZmyEk9UZ5uNn4pjZn5+ivkKVl04jS7nFh3DpZGGkh5rjPxcoNd3Pfvuv/cxdyltFl0YCzTLh2SQtGbeID52kUYjT0MNNaa3JgaBQ7GYZQ09LUsXy4qA/vwCcWvwgBgkGwABPjCD9A= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(346002)(136003)(376002)(39860400002)(366004)(451199018)(38100700002)(6506007)(41300700001)(8936002)(186003)(26005)(4326008)(8676002)(66476007)(66946007)(66556008)(1076003)(921005)(2616005)(4744005)(7416002)(5660300002)(38350700002)(86362001)(316002)(6666004)(6486002)(6512007)(52116002)(478600001)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9HAeFGKeY2HIDWBehQ1RvR8niR5VSVUk+eRD/FQxc32QAO2aWTYy99zburetHhGJM6rmHvw4kPM6Dm0WQT+vSVTdl0WNM080/T5PXspMoxlKH8B56YygqDkz2cjzqTpsVYeP5bMXIiy4nFjRujyFIwsZc8P4Cv/BB507ZAA+U6Vqo/lfHLbVP9dG86V1Xo6/QwhD2hw5pkqNQe2EIuvKK288exzY+ASV+RemlSEtJNt3HVFHNH30AzTN7R56+BeTOtnGf+OWa2W5E4ki2ks9hP5qXhpOcngZcOwH0w1mrrDnsUOf9dK5pvAwnHSrwJ70rL5DGaxQnU/ckQn4qh6tYBlB9kZShBmDCbGHxV3RwsZr9+E/uLRYf7BjG7h7vXFSag2yoRofqv4y0LGLb40ggbeOLVTvC91J+kqdmshYj4bnhtAJnzOaPD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i4Uk3BSTxv5OBo6I/Z1e2GkMkr3RqXMLLmfYqGY5DUQ1m8jHVX/WSC1ObXargDth+hlpe2I5WxyzWkoZbpgb0k8G9QwA X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fbca494-8e99-490b-6ef5-08db09d260ee X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 12:45:38.2077 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FttLjkEWoY+1EShvpc0+gtlSgXKat+jo1a9nPkubrtpxTUkRdslv8rvptYrWBZnN0QCwc/UpkGemp/wjR/RODg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7891 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757267708314577707?= X-GMAIL-MSGID: =?utf-8?q?1757267708314577707?= From: Peng Fan It would be helpful to show cpu number when dump task. Such as when doing system suspend, we could know the failed freezing process run on which cpu. Signed-off-by: Peng Fan Reviewed-by: Phil Auld --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index daff72f00385..0c7a1b2f7baf 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8876,7 +8876,7 @@ void sched_show_task(struct task_struct *p) if (!try_get_task_stack(p)) return; - pr_info("task:%-15.15s state:%c", p->comm, task_state_to_char(p)); + pr_info("task:%-15.15s state:%c cpu:0x%x", p->comm, task_state_to_char(p), task_cpu(p)); if (task_is_running(p)) pr_cont(" running task ");