linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Elliott, Robert (Servers)" <elliott@hpe.com>
To: "<Vishal Badole>" <badolevishal1116@gmail.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"inux-clk@vger.kernel.org" <inux-clk@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"chinmoyghosh2001@gmail.com" <chinmoyghosh2001@gmail.com>,
	"mintupatel89@gmail.com" <mintupatel89@gmail.com>,
	"vimal.kumar32@gmail.com" <vimal.kumar32@gmail.com>
Subject: RE: [PATCH] Common clock: ​​To list active consumers of clocks
Date: Sun, 21 Aug 2022 05:07:00 +0000	[thread overview]
Message-ID: <MW5PR84MB18429934C99C9AE6289D620BAB6E9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220808170001.GB5239@Mahakal>



> -----Original Message-----
> From: <Vishal Badole> <badolevishal1116@gmail.com>
> Sent: Monday, August 8, 2022 12:00 PM
> To: Elliott, Robert (Servers) <elliott@hpe.com>
> Cc: Stephen Boyd <sboyd@kernel.org>; mturquette@baylibre.com; inux-
> clk@vger.kernel.org; linux-kernel@vger.kernel.org; chinmoyghosh2001@gmail.com;
> mintupatel89@gmail.com; vimal.kumar32@gmail.com
> Subject: Re: [PATCH] Common clock: ​​To list active consumers of clocks
> 
> On Tue, Aug 02, 2022 at 10:49:17PM +0000, Elliott, Robert (Servers) wrote:
> >
> >
> > > -----Original Message-----
> > > From: <Vishal Badole> <badolevishal1116@gmail.com>
> > > Sent: Sunday, June 26, 2022 1:25 PM
> > > To: Stephen Boyd <sboyd@kernel.org>; mturquette@baylibre.com; inux-
> > > clk@vger.kernel.org; linux-kernel@vger.kernel.org
> > > Cc: chinmoyghosh2001@gmail.com; mintupatel89@gmail.com;
> > > vimal.kumar32@gmail.com
> > > Subject: Re: [PATCH] Common clock: ​​To list active consumers of clocks
> > >
> > ...
> > > We will remove above prints in the revised patch. We are facing
> > > indentation issue whle printing consumer in summary
> > > as given below
> > >                                  enable  prepare  protect
> duty  hardware            per-user
> > >   clock                          count    count    count
> rateccuracy phase  cycle    enable  consumer   count
> > >   clk_mcasp0_fixed                   0        0        0
> 24576000     0  50000         Y
> > >   deviceless        0
> >
> > Consider making the kernel output simple, greppable, and parseable (e.g.,
> > comma-separated fields, one entry per line, no multi-line column headers)
> > and let a userspace tool do the fancy formatting.
> >
> Hi Robert,
> We have raised another patch for the same. Please find the below link
> for reference:
> 
> https://www.spinics.net/lists/kernel/msg4459705.html

That output is still not parsable.

I suggest making the kernel output more like:
  clock,enable count,prepare count,protect count,rate,accuracy,phase,duty cycle,hardware enable,consumer,per-user count
  clk_mcasp0_fixed,0,0,0,24576000,0,0,50000,Y,deviceless,0
  clk_mcasp0,0,0,0,24576000,0,0,50000,N,simple-audio-card;cpu,0

and make a userspace program like lsmod, lscpu, lsblk, lspci, 
or lsusb to print the data with fancy columns or apply
other filters.

That allows adding or removing column headers, assuming the
userspace program doesn't hardcode assumptions about them.


  reply	other threads:[~2022-08-21  5:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEXpiVQihEadxsNodarz2-wxSAipfpzEaA8zKpnozszC+weYTQ@mail.gmail.com>
2022-06-10 19:40 ` [PATCH 5.4] Common clock: ​​To list active consumers of clocks Stephen Boyd
     [not found]   ` <CAOUcgRfB-r3aERYeLumExgpTVzsDsBuyOWT+nCJ_OfOv1g0L9g@mail.gmail.com>
2022-06-15 19:23     ` <Vishal Badole>
2022-06-22 16:32   ` [PATCH] " <Vishal Badole>
2022-06-22 19:37     ` Randy Dunlap
2022-06-22 17:02   ` <Vishal Badole>
     [not found]     ` <20220624010550.582BBC341C7@smtp.kernel.org>
2022-06-26 18:25       ` <Vishal Badole>
2022-08-02 22:49         ` Elliott, Robert (Servers)
2022-08-08 17:00           ` <Vishal Badole>
2022-08-21  5:07             ` Elliott, Robert (Servers) [this message]
2022-08-21 17:59               ` <Vishal Badole>
2022-06-28  5:08       ` [PATCH v3] Common clock: To " Vishal Badole
2022-08-02 18:09       ` Vishal Badole
2022-08-08 16:46         ` <Vishal Badole>
2022-08-21 18:06         ` <Vishal Badole>
2022-08-22 23:50         ` Stephen Boyd
2022-08-26 17:34           ` <Vishal Badole>
2022-11-27 18:00           ` <Vishal Badole>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW5PR84MB18429934C99C9AE6289D620BAB6E9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM \
    --to=elliott@hpe.com \
    --cc=badolevishal1116@gmail.com \
    --cc=chinmoyghosh2001@gmail.com \
    --cc=inux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mintupatel89@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=vimal.kumar32@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).