From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>, Ming Lei <ming.lei@redhat.com>
Cc: linux-block@vger.kernel.org,
Bart Van Assche <bart.vanassche@wdc.com>,
Omar Sandoval <osandov@fb.com>, Christoph Hellwig <hch@lst.de>,
Josef Bacik <josef@toxicpanda.com>
Subject: Re: [PATCH 2/2] blk-wbt: export internal state via debugfs
Date: Sun, 16 Dec 2018 09:07:38 -0700 [thread overview]
Message-ID: <35fd2388-21d2-3a15-cfe4-9564523aa0f1@kernel.dk> (raw)
In-Reply-To: <1544814903.185366.427.camel@acm.org>
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@wdc.com>
>> Cc: Omar Sandoval <osandov@fb.com>
>> Cc: Christoph Hellwig <hch@lst.de>
>> Cc: Josef Bacik <josef@toxicpanda.com>
>> Signed-off-by: Ming Lei <ming.lei@redhat.com>
>> ---
>> 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?
diff --git a/block/blk-rq-qos.h b/block/blk-rq-qos.h
index fd8a0c5debd3..210567ddfa40 100644
--- a/block/blk-rq-qos.h
+++ b/block/blk-rq-qos.h
@@ -40,9 +40,7 @@ struct rq_qos_ops {
void (*done_bio)(struct rq_qos *, struct bio *);
void (*cleanup)(struct rq_qos *, struct bio *);
void (*exit)(struct rq_qos *);
-#ifdef CONFIG_BLK_DEBUG_FS
const struct blk_mq_debugfs_attr *debugfs_attrs;
-#endif
};
struct rq_depth {
--
Jens Axboe
next prev parent reply other threads:[~2018-12-16 16:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 11:39 [PATCH 0/2] block: support debugfs on rq_qos & wbt Ming Lei
2018-12-14 11:39 ` [PATCH 1/2] blk-mq-debugfs: support rq_qos Ming Lei
2018-12-14 19:11 ` Bart Van Assche
2018-12-16 16:04 ` Jens Axboe
2018-12-16 16:09 ` Christoph Hellwig
2018-12-16 16:13 ` Jens Axboe
2018-12-14 11:39 ` [PATCH 2/2] blk-wbt: export internal state via debugfs Ming Lei
2018-12-14 19:15 ` Bart Van Assche
2018-12-16 16:07 ` Jens Axboe [this message]
2018-12-17 1:10 ` Ming Lei
2018-12-14 12:56 ` [PATCH 0/2] block: support debugfs on rq_qos & wbt Jens Axboe
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=35fd2388-21d2-3a15-cfe4-9564523aa0f1@kernel.dk \
--to=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.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).