RE: [EXT] Query about UCD allocation

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


> Form a certain time, UFS drivers set the value of 'max_sectors' like below,
> meaning 1MB.
> And the size of PRDT part of UCD per one slot is decided with SG_ALL(128)
> multiplied by PRDT entry size, 16 bytes if 4DW of PRDT is used.
> If there is another knob to make it smaller to split a request, it seems UFS
> driver can receive 1MB of chunk.
> And when 4KB page is used, 256 PRDT entries are necessary to describe data
> area.
> Thus, it seems that the driver has been allocating less than it needs.
> If my understanding is wrong, please correct me.
> --
> static const struct scsi_host_template ufshcd_driver_template = { ..
> .max_sectors            = SZ_1M / SECTOR_SIZE,
> static int ufshcd_memory_alloc(struct ufs_hba *hba) ..
>         ucdl_size = ufshcd_get_ucd_size(hba) * hba->nutrs;
> static inline size_t ufshcd_get_ucd_size(const struct ufs_hba *hba) {
>         return sizeof(struct utp_transfer_cmd_desc) + SG_ALL *
> ufshcd_sg_entry_size(hba);
> Thanks.
> Kiwoong Kim

The current UFS Spec each PRDR entry can support the maximum data size 256KB, but if the host side system somehow cannon make
256KB per PRDR entry, and split 4KB per scatter gather list, 128 is not enough. This is my understanding.

[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