All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: John Garry <john.garry@huawei.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Dongli Zhang <dongli.zhang@oracle.com>,
	Jens Axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>, Daniel Wagner <dwagner@suse.de>
Subject: Re: [PATCH] blk-mq: don't fail driver tag allocation because of inactive hctx
Date: Fri, 5 Jun 2020 15:31:27 +0800	[thread overview]
Message-ID: <20200605073127.GA2378708@T590> (raw)
In-Reply-To: <e7d97cfa-c0c3-180c-cfbd-976d90592ac1@huawei.com>

On Fri, Jun 05, 2020 at 08:24:50AM +0100, John Garry wrote:
> On 05/06/2020 01:59, Ming Lei wrote:
> > > 	hctx5: default 36 37 38 39
> > > 	hctx6: default 40 41 42 43
> > > 	hctx7: default 44 45 46 47
> > > 	hctx8: default 48 49 50 51
> > > 	hctx9: default 52 53 54 55
> > > 	hctx10: default 56 57 58 59
> > > 	hctx11: default 60 61 62 63
> > > 	hctx12: default 0 1 2 3
> > > 	hctx13: default 4 5 6 7
> > > 	hctx14: default 8 9 10 11
> > > 	hctx15: default 12 13 14 15
> > OK, the queue mapping is correct.
> > 
> > As I mentioned in another thread, the real hw tag may be set as wrong.
> > 
> 
> I doubt this.
> 
> And I think that you should also be able to add the same debug to
> blk_mq_hctx_notify_offline() to see that there may be still driver tags
> allocated to when all the scheduler tags are free'd for any test in your
> env.

No, that isn't possible, scheduler tag lifetime covers the whole request's
lifetime.

> 
> > You have to double check your cooked tag allocation algorithm and see if it
> > can work well when more requests than real hw queue depth are queued to hisi_sas,
> > and the correct way is to return SCSI_MLQUEUE_HOST_BUSY from .queuecommand().
> 
> Yeah, the LLDD would just reject requests in that scenario and we would know
> about it from logs etc.
> 
> Anyway, I'll continue to check.

The merged patch is much simpler than before, new request is prevented from being
allocated on the inactive hctx, then drain all in-flight requests on this hctx.

You need to check if the request is queued to hw correctly.

Thanks,
Ming


  reply	other threads:[~2020-06-05  7:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 10:51 [PATCH] blk-mq: don't fail driver tag allocation because of inactive hctx Ming Lei
2020-06-03 11:53 ` Christoph Hellwig
2020-06-03 13:36   ` Ming Lei
2020-06-03 16:16     ` John Garry
2020-06-04  5:22       ` Dongli Zhang
2020-06-04 10:24         ` John Garry
2020-06-04 11:26           ` Ming Lei
2020-06-04 11:50             ` John Garry
2020-06-04 12:08               ` Ming Lei
2020-06-04 12:45                 ` John Garry
2020-06-04 13:00                   ` Ming Lei
2020-06-04 14:11                     ` John Garry
2020-06-05  0:59                       ` Ming Lei
2020-06-05  7:24                         ` John Garry
2020-06-05  7:31                           ` Ming Lei [this message]
2020-06-04 13:28                   ` Ming Lei
2020-06-05  8:33                   ` Ming Lei
2020-06-05  9:27                     ` John Garry
2020-06-05 11:08                       ` John Garry
2020-06-03 18:12     ` Christoph Hellwig

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=20200605073127.GA2378708@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dongli.zhang@oracle.com \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=john.garry@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.