From: Leon Romanovsky <leon@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Peter Wang <peter.wang@mediatek.com>,
Bean Huo <beanhuo@micron.com>,
Avri Altman <avri.altman@sandisk.com>,
Can Guo <can.guo@oss.qualcomm.com>,
Hyeoncheol Jeong <hyenc.jeong@samsung.com>
Subject: Re: [PATCH] ufs: core: Disable queue depth tracking support
Date: Sun, 16 Aug 2026 15:10:50 +0300 [thread overview]
Message-ID: <20260816121050.GB66924@unreal> (raw)
In-Reply-To: <20260814214951.80673-1-bvanassche@acm.org>
On Fri, Aug 14, 2026 at 02:49:47PM -0700, Bart Van Assche wrote:
> Disable queue depth tracking support because:
> - UFS devices shouldn't need queue tracking support. If the host sends
> less than or equal to bQueueDepth commands to the UFS device, no TASK
> SET FULL condition should be reported. If a TASK SET FULL condition
> is reported anyway, the host->host_blocked variable will be set and
> the SCSI command will be requeued. Submission of the SCSI command
> will be retried after another SCSI command has completed.
> - The queue depth tracking code is not thread-safe. With MCQ enabled,
> scsi_track_queue_full() may be called from multiple CPU cores
> concurrently. This is not safe because individual
> scsi_track_queue_full() calls are not serialized.
> - scsi_track_queue_full() is called from interrupt context but not all
> code called by scsi_track_queue_full() is IRQ-safe. Here is an
> example of a call chain that may cause interrupts to be enabled,
> something that is not allowed from interrupt context:
>
> ufshcd_mcq_poll_cqe_lock()
> ufshcd_compl_one_cqe()
> scsi_done()
> blk_mq_complete_request()
> scsi_complete()
> scsi_decide_disposition()
> scsi_handle_queue_full()
> scsi_track_queue_full()
> scsi_change_queue_depth()
> blk_set_queue_depth()
> rq_qos_queue_depth_changed()
> ioc_rqos_queue_depth_changed()
> spin_lock_irq()
> spin_unlock_irq() <- enables interrupts
>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/infiniband/ulp/srp/ib_srp.c | 4 ++++
> drivers/ufs/core/ufshcd.c | 16 ----------------
> 2 files changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
> index acbd787de265..19a6400d1ec4 100644
> --- a/drivers/infiniband/ulp/srp/ib_srp.c
> +++ b/drivers/infiniband/ulp/srp/ib_srp.c
> @@ -1044,6 +1044,10 @@ static void srp_remove_target(struct srp_target_port *target)
> WARN_ON_ONCE(target->state != SRP_TARGET_REMOVED);
>
> srp_del_scsi_host_attr(target->scsi_host);
> + /*
> + * The srp_remove_host() call decrements the rport reference count.
> + * Keep the rport as long as its needed.
> + */
I believe we can drop this comment and keep the patch limited
to drivers/ufs/core/ufshcd.c only.
Thanks
next prev parent reply other threads:[~2026-08-16 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 21:49 [PATCH] ufs: core: Disable queue depth tracking support Bart Van Assche
2026-08-14 22:00 ` sashiko-bot
2026-08-16 12:10 ` Leon Romanovsky [this message]
2026-08-16 13:04 ` Bart Van Assche
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=20260816121050.GB66924@unreal \
--to=leon@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=hyenc.jeong@samsung.com \
--cc=jgg@ziepe.ca \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.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 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.