linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Hou Tao <houtao1@huawei.com>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: check the existence of tags[hctx_idx] in blk_mq_clear_rq_mapping()
Date: Thu, 9 Sep 2021 17:19:47 +0800	[thread overview]
Message-ID: <YTnRsxec3JfPINmu@T590> (raw)
In-Reply-To: <20210909090054.492923-1-houtao1@huawei.com>

Hello Hou,

On Thu, Sep 09, 2021 at 05:00:54PM +0800, Hou Tao wrote:
> According to commit 4412efecf7fd ("Revert "blk-mq: remove code for
> dealing with remapping queue""), for some devices queue hctx may not
> being mapped, and tagset->tags[hctx_idx] will be released and be NULL.
> 
> If an IO scheduler is used on these devices, blk_mq_clear_rq_mapping()
> will be called for all hctxs in blk_mq_sched_free_requests() during
> scheduler switch, and these will be oops. So checking the existence of
> tags[hctx_idx] before going on in blk_mq_clear_rq_mapping().

unmapped hctx should be caused by blk_mq_update_nr_hw_queues() only,
but scheduler tags is updated there too, so not sure it is one real
issue, did you observe such kernel panic? any kernel log?


Thanks,
Ming


  reply	other threads:[~2021-09-09  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  9:00 [PATCH] block: check the existence of tags[hctx_idx] in blk_mq_clear_rq_mapping() Hou Tao
2021-09-09  9:19 ` Ming Lei [this message]
2021-09-09 11:14   ` Hou Tao
2021-09-13  1:43     ` Ming Lei

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=YTnRsxec3JfPINmu@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=houtao1@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 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).