Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp727965pxt; Thu, 12 Aug 2021 08:19:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2porH9HtWcFiTLFIO2MKutiodv8oHyUY04op4nlmTjHarKXRg8NCIP0nAo2JAz32oYQMt X-Received: by 2002:aa7:c40a:: with SMTP id j10mr4559361edq.133.1628781559982; Thu, 12 Aug 2021 08:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628781559; cv=none; d=google.com; s=arc-20160816; b=m2OzYaGSMi43bc6EQL3STO0nMUeFQ9P7UxDHfOPT1HXGNJumA7itA0CylyLbuicjiY Jclz+FtDSOu7UURUha3sY1iM+48dIbUGmObMEZnp5ZtW9Z3WEzwutE4PDJC/NKQXgp26 75LUZSkc8Dx8uNy9tWlcmtbyhGJ/VSM/WrZ2RLDB9HrN9gZR09beEyQkLLtSc8z9Pw02 r8wL1Xr+GodIc8gJxb5+PVED9K08AP3cneZa0tl2e3fL00zbOx6mAw9bve37ji5KwIRT P73kpli6mP1CXmG6QmyzBojgiR1VkxUrwHsGK5T9g0C1QBXD/WwcIjYTDhkg4ef+Cgs7 ZCBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=HaXQtS1acImYoQ6e9Mc56ji8w9eOv9m/9rDOqL2N80Y=; b=Dj5aYFgoX1UDohsoJHnGoBnPLbQGsrHAAN8klYPFfOr5cKKzhPWQIHRqLqaDrhRXt8 0s+89F2b5Ux8SIfjVIR1DDjheCljXNCA9bXZdvv8erjeE+iFbDK3zqTxYte3QExPdHIe BgBgkqa4PzYWJbhocCOzTOykazS4s/U9//PqjN/yVEa9RZ1Kn/FhO+aCCyPr92AyPlaU 3OCohsuvwH8aPikmYHpjJLY1ZAyY6GVIFznxCIX1I1rBTcqgMFuA4Qhy3So2LvGS58QK MCXhZyQBC6KqV5Gu1X1SAcsowtONVTPPMMT2zR5u/nqBrOMrfv6sTtePSmZ1yaNV0aTs WkVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm23si2920572edb.514.2021.08.12.08.18.56; Thu, 12 Aug 2021 08:19:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238075AbhHLOi7 (ORCPT + 99 others); Thu, 12 Aug 2021 10:38:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:55670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236908AbhHLOi7 (ORCPT ); Thu, 12 Aug 2021 10:38:59 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC3506108C; Thu, 12 Aug 2021 14:38:32 +0000 (UTC) Date: Thu, 12 Aug 2021 10:38:26 -0400 From: Steven Rostedt To: Shirish S Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , "Mel Gorman" , Daniel Bristot de Oliveira , Subject: Re: [PATCH] sched/debug: print column titles of show_state_filter() Message-ID: <20210812103826.27dfad5f@oasis.local.home> In-Reply-To: <20210812110534.82349-1-shirish.s@amd.com> References: <20210812110534.82349-1-shirish.s@amd.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Aug 2021 16:35:34 +0530 Shirish S wrote: > This addition in the debug output shall improve readablitly.. > Its not intuitive for users that the pid printed in last column > is of parent process. > > Without this patch: > localhost ~ # dmesg -w & > localhost ~ # echo w > /proc/sysrq-trigger > [22148.730225] sysrq: Show Blocked State > localhost ~ # > > With this patch: > localhost ~ # dmesg -w & > localhost ~ # echo w > /proc/sysrq-trigger > [ 99.979365] sysrq: Show Blocked State > --> [ 99.983471] task PC stack pid father > localhost ~ # > It would had been more informative, if there were content to those lists. Just a few lines would be good enough. But the above, just looks like you are adding a useless header. :-/ In fact, I would argue that the title should not be displayed if the content is empty. Also, s/father/parent/ or s/father/ppid/ -- Steve > v2: Dropped #ifdef logic > v3: Sample output in commit message > > Signed-off-by: Shirish S > Suggested-by: Steven Rostedt > --- > kernel/sched/core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 20ffcc044134..1c7ea3ef5a9f 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter) > { > struct task_struct *g, *p; > > + pr_info(" task%*s", BITS_PER_LONG == 32 ? 38 : 46, > + "PC stack pid father\n"); > + > rcu_read_lock(); > for_each_process_thread(g, p) { > /*