mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Avri Altman <avri.altman@wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Bean Huo <beanhuo@micron.com>,
	Peter Wang <peter.wang@mediatek.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write
Date: Wed, 29 May 2024 13:02:09 -0700	[thread overview]
Message-ID: <4251566e-0a1a-48f1-b170-d5987bbabd90@acm.org> (raw)
In-Reply-To: <20240526081636.2064-4-avri.altman@wdc.com>

On 5/26/24 01:16, Avri Altman wrote:
> +static inline void ufshcd_freez_hw_queues(struct ufs_hba *hba)
> +{
> +	struct scsi_device *sdev;
> +
> +	shost_for_each_device(sdev, hba->host) {
> +		if (sdev == hba->ufs_device_wlun)
> +			continue;
> +		blk_mq_freeze_queue(sdev->request_queue);
> +		blk_mq_quiesce_queue(sdev->request_queue);
> +	}
> +}
> +
> +static inline void ufshcd_unfreez_hw_queues(struct ufs_hba *hba)
> +{
> +	struct scsi_device *sdev;
> +
> +	shost_for_each_device(sdev, hba->host) {
> +		if (sdev == hba->ufs_device_wlun)
> +			continue;
> +		blk_mq_unquiesce_queue(sdev->request_queue);
> +		blk_mq_unfreeze_queue(sdev->request_queue);
> +	}
> +}

Why have these functions been declared inline? blk_mq_freeze_queue()
may sleep and hence performance is not an argument to inline these
functions. Additionally, the WLUN should not be skipped when freezing
or unfreezing request queues. The blk_mq_quiesce_queue() and
blk_mq_unquiesce_queue() calls are not necessary in the above code.
Please remove these.

Thanks,

Bart.

  reply	other threads:[~2024-05-29 20:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26  8:16 [PATCH v6 0/3] scsi: ufs: Allow RTT negotiation Avri Altman
2024-05-26  8:16 ` [PATCH v6 1/3] " Avri Altman
2024-05-29 20:03   ` Bart Van Assche
2024-05-29 21:15     ` Avri Altman
2024-05-26  8:16 ` [PATCH v6 2/3] scsi: ufs: Maximum RTT supported by the host driver Avri Altman
2024-05-28 10:02   ` Peter Wang (王信友)
2024-05-29 20:12   ` Bart Van Assche
2024-05-29 21:07     ` Avri Altman
2024-05-26  8:16 ` [PATCH v6 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write Avri Altman
2024-05-29 20:02   ` Bart Van Assche [this message]
2024-05-29 21:12     ` Avri Altman

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=4251566e-0a1a-48f1-b170-d5987bbabd90@acm.org \
    --to=bvanassche@acm.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®