Re: [PATCH 2/2] blk-wbt: export internal state via debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 16, 2018 at 09:07:38AM -0700, Jens Axboe wrote:
> On 12/14/18 12:15 PM, Bart Van Assche wrote:
> > On Fri, 2018-12-14 at 19:39 +0800, Ming Lei wrote:
> >> This information is helpful to either investigate issues, or understand
> >> wbt's internal behaviour.
> >>
> >> Cc: Bart Van Assche <bart.vanassche@xxxxxxx>
> >> Cc: Omar Sandoval <osandov@xxxxxx>
> >> Cc: Christoph Hellwig <hch@xxxxxx>
> >> Cc: Josef Bacik <josef@xxxxxxxxxxxxxx>
> >> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> >> ---
> >>  block/blk-wbt.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 91 insertions(+)
> >>
> >> diff --git a/block/blk-wbt.c b/block/blk-wbt.c
> >> index 463e4eb80287..2684bf2d112f 100644
> >> --- a/block/blk-wbt.c
> >> +++ b/block/blk-wbt.c
> >> @@ -715,6 +715,94 @@ void wbt_disable_default(struct request_queue *q)
> >>  }
> >>  EXPORT_SYMBOL_GPL(wbt_disable_default);
> >>  
> >> +#ifdef CONFIG_BLK_DEBUG_FS
> >> +static int wbt_curr_window_show(void *data, struct seq_file *m)
> >> +{
> >> +	struct rq_qos *rqos = data;
> >> +	struct rq_wb *rwb = RQWB(rqos);
> >> +
> >> +	seq_printf(m, "%llu ns\n", rwb->cur_win_nsec);
> >> +	return 0;
> >> +}
> > 
> > Please consider to embed the unit ("ns") in the attribute name instead of
> > in the attribute value. That will make it easier to process this attribute
> > in developer debug scripts.
> > 
> >> +static int wbt_min_latency_show(void *data, struct seq_file *m)
> >> +{
> >> +	struct rq_qos *rqos = data;
> >> +	struct rq_wb *rwb = RQWB(rqos);
> >> +
> >> +	seq_printf(m, "%luns\n", rwb->min_lat_nsec);
> >> +	return 0;
> >> +}
> > 
> > Same comment here about the unit.
> > 
> >> +static const struct blk_mq_debugfs_attr wbt_debugfs_attrs[] = {
> >> +	{"curr_window", 0400, wbt_curr_window_show},
> >> +	{"enable_state", 0400, wbt_enable_state_show},
> > 
> > How about using "enabled" instead of "enable_state"?
> 
> Agree on all of these. Ming, I had to amend so I dropped the previous
> commits, so I could also drop the compilation fixup for
> !CONFIG_BLK_DEBUG_FS. Can you resend with those fixed, and also apply
> this incremental?

OK.

Thanks,
Ming



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux