linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <axboe@fb.com>,
	linux-block@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 02/10] blk-mq: add hctx->{state,flags} to debugfs
Date: Wed, 25 Jan 2017 07:59:48 -0800	[thread overview]
Message-ID: <20170125155948.GA19470@vader> (raw)
In-Reply-To: <d08e8c98-4ada-6f1c-2a62-86a9295b6d88@suse.de>

On Tue, Jan 24, 2017 at 02:25:39PM +0100, Hannes Reinecke wrote:
> On 01/23/2017 07:59 PM, Omar Sandoval wrote:
> > From: Omar Sandoval <osandov@fb.com>
> > 
> > hctx->state could come in handy for bugs where the hardware queue gets
> > stuck in the stopped state, and hctx->flags is just useful to know.
> > 
> > Signed-off-by: Omar Sandoval <osandov@fb.com>
> > ---
> >  block/blk-mq-debugfs.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> > 
> Hehe. I've found myself adding exactly the same attributes when
> debugging mq-deadline :-)
> 
> > diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> > index 01711bbf5ade..0c14511fa9e0 100644
> > --- a/block/blk-mq-debugfs.c
> > +++ b/block/blk-mq-debugfs.c
> > @@ -29,7 +29,49 @@ struct blk_mq_debugfs_attr {
> >  
> >  static struct dentry *block_debugfs_root;
> >  
> > +static int hctx_state_show(struct seq_file *m, void *v)
> > +{
> > +	struct blk_mq_hw_ctx *hctx = m->private;
> > +
> > +	seq_printf(m, "0x%lx\n", hctx->state);
> > +	return 0;
> > +}
> > +
> What about decoding it?
> Would make life so much easier, and one doesn't have to have a kernel
> source tree available when looking things up...

I thought of this, too, but doing that would require setting up a
mapping from flag values to strings and keeping those in sync with the
actual flags, which I don't think is worth the trouble, since I imagine
that most of the time you're going to be consulting the source to debug
this kind of issue, anyways.

Thanks for the review!

  reply	other threads:[~2017-01-25 16:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 18:59 [PATCH 00/10] blk-mq: move debugging information from sysfs to debugfs Omar Sandoval
2017-01-23 18:59 ` [PATCH 01/10] blk-mq: create debugfs directory tree Omar Sandoval
2017-01-24 13:24   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 02/10] blk-mq: add hctx->{state,flags} to debugfs Omar Sandoval
2017-01-24 13:25   ` Hannes Reinecke
2017-01-25 15:59     ` Omar Sandoval [this message]
2017-01-23 18:59 ` [PATCH 03/10] blk-mq: move hctx->dispatch and ctx->rq_list from sysfs " Omar Sandoval
2017-01-24 13:26   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 04/10] blk-mq: add extra request information " Omar Sandoval
2017-01-24 13:27   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 05/10] sbitmap: add helpers for dumping to a seq_file Omar Sandoval
2017-01-24 13:27   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 06/10] blk-mq: export software queue pending map to debugfs Omar Sandoval
2017-01-24 13:28   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 07/10] blk-mq: move tags and sched_tags info from sysfs " Omar Sandoval
2017-01-24 13:29   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 08/10] blk-mq: add tags and sched_tags bitmaps " Omar Sandoval
2017-01-24 13:30   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 09/10] blk-mq: move hctx io_poll, stats, and dispatched from sysfs " Omar Sandoval
2017-01-24 13:31   ` Hannes Reinecke
2017-01-23 18:59 ` [PATCH 10/10] blk-mq: move hctx and ctx counters " Omar Sandoval
2017-01-24 13:32   ` Hannes Reinecke

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=20170125155948.GA19470@vader \
    --to=osandov@osandov.com \
    --cc=axboe@fb.com \
    --cc=hare@suse.de \
    --cc=kernel-team@fb.com \
    --cc=linux-block@vger.kernel.org \
    /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).