[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4251566e-0a1a-48f1-b170-d5987bbabd90@acm.org>
Date: Wed, 29 May 2024 13:02:09 -0700
From: Bart Van Assche <bvanassche@....org>
To: Avri Altman <avri.altman@....com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Bean Huo <beanhuo@...ron.com>, Peter Wang <peter.wang@...iatek.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/3] scsi: ufs: sysfs: Make max_number_of_rtt
read-write
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.
Powered by blists - more mailing lists