Re: [EXT] [PATCH RFC v2 4/5] ufs: Use blk_{get,put}_request() to allocate and free TMFs

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

 



On 11/5/19 5:50 AM, Bean Huo (beanhuo) wrote:
-	wait_event(hba->tm_tag_wq, ufshcd_get_tm_free_slot(hba,
&free_slot));
+	req = blk_get_request(q, REQ_OP_DRV_OUT, BLK_MQ_REQ_RESERVED);
+	req->end_io_data = &wait;
+	free_slot = req->tag;
+	WARN_ON_ONCE(free_slot < 0 || free_slot >= hba->nutmrs);
  	ufshcd_hold(hba, false);

Understand now , you delete ufshcd_get_tm_free_slot(). Run a big circle to get a free_slot from reserved tags by calling blk_get_request().
But UFS data transfer queue depth is 32, not 32 + hba->nutmrs.  How to make sure we see the tag is consistent across block/scsi/ufs?

Hi Bean,

Please have a look at the blk_mq_get_tag() function in the block layer. The implementation of that function makes it clear that the tags with numbers [0 .. nr_reserved) are considered reserved tags and also that the tags with numbers [nr_reserved .. queue_depth) are considered regular tags. In other words, adding hba->nutmrs to can_queue does not increase the queue depth because the same number of tags are considered reserved tags.

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