Re: [PATCH v6 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux