Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp45990pxb; Thu, 12 Aug 2021 10:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSLpjlIfShkToEZllRHCXAZvnQzMjS1ekbFjUHZE7Q9ne/FkdIQ6DF9TT8LPvxVBbQ98O8 X-Received: by 2002:a05:6402:cae:: with SMTP id cn14mr6808687edb.31.1628789113988; Thu, 12 Aug 2021 10:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628789113; cv=none; d=google.com; s=arc-20160816; b=ZoyuRKAQ0s58JEAfJJ+b8kL2ppco2hlUf203+DCE/kTzyFhzqKukKqmlIPPdYjxfob F/7utI6HQNFLk7ACGnKeWf/whvo8YBjgcWA0yS0VpOWexzyevU3MZIIoRsD7YEMZ09bG Uu+JY0nKhROdTwRiwq1kHOFjBhx3QwiZdYm/FS30IOIKrrEoG89r2gubm+Eq3t2P8ZpJ TT2u0VjFySuymPa4rkmDp8/4Rsv0cmVLxdOj3g7irV+t2/29B/D273Ae+1AVh4RQu4C8 XDJqzXXa6+C/gv1za0Ciz1j1Hh1j4e3L+3F9W3sZ3o1OfB+De/syKLNGEiNJU2gRGBph SxPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VsqHyLtJ40mA5JAh5uHwhCEPq1XA+3HiOBW2pGWQq1w=; b=FD7n+m7yFdtz+4wTear05pm/gg0S3YqOe1A1nGN/5rbHcMLBlrT6QDUJO5d1gYZqPP rUk4kpQ1sagUxkxZAbwiDfzY8umlqROHuOMxDILzvbLgpWk2d8gMH9DXFefI2BxjrYsh oM6K9wtGjkipnx7OMXQR73slHRnlXkZLL45P0hMWyAcVFtLw9mGhO3Ch2uwjE3A4avR/ ncrT0QgtBJ80f2LYkGexCFxhE8yR3xt8wLP9qTuj1aHRUD0dLD+9mRftn/AM62d173Z8 Ndji9ZrzyCDFeF1Z2ZG+bB4wW/PDxdUjDMHfsStdE7R/H/jnK+byQDNmRrfBGkYcjbh9 I3Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jSPZPMtS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si3190353ejq.621.2021.08.12.10.24.50; Thu, 12 Aug 2021 10:25:13 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jSPZPMtS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237791AbhHLOEk (ORCPT + 99 others); Thu, 12 Aug 2021 10:04:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33468 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236421AbhHLOEj (ORCPT ); Thu, 12 Aug 2021 10:04:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628777054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VsqHyLtJ40mA5JAh5uHwhCEPq1XA+3HiOBW2pGWQq1w=; b=jSPZPMtSenDlnF0BPx67U5fe0C9IbdMpK3EVlsxkRq5/GDtKRde1Vz9wtn4sQJRFTrShc1 bQAd1+3rX6a+HpiCZHbPnFu+H+H8+hHiNCxGHVbgXpQl5NjMTOkDLuQ+oWxHDx3luCaz45 20xCRohhB4oLn0F7Es8IOHpNUuOprnI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-nBfeZ4U0OGOGZr8APwGrtw-1; Thu, 12 Aug 2021 10:04:12 -0400 X-MC-Unique: nBfeZ4U0OGOGZr8APwGrtw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC084344B1; Thu, 12 Aug 2021 14:04:10 +0000 (UTC) Received: from lorien.usersys.redhat.com (unknown [10.22.17.88]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40F615D9D5; Thu, 12 Aug 2021 14:04:02 +0000 (UTC) Date: Thu, 12 Aug 2021 10:04:00 -0400 From: Phil Auld To: Shirish S Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/debug: print column titles of show_state_filter() Message-ID: References: <20210812110534.82349-1-shirish.s@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210812110534.82349-1-shirish.s@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Aug 12, 2021 at 04:35:34PM +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 ~ # > > 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"); "parent" or "ppid" please. Cheers, Phil > + > rcu_read_lock(); > for_each_process_thread(g, p) { > /* > -- > 2.17.1 > --