From: "Kiwoong Kim" <kwmad.kim@samsung.com>
To: linux-scsi@vger.kernel.org, alim.akhtar@samsung.com,
avri.altman@wdc.com, bvanassche@acm.org, jejb@linux.ibm.com,
martin.petersen@oracle.com, beanhuo@micron.com,
adrian.hunter@intel.com, h10.kim@samsung.com,
hy50.seo@samsung.com, sh425.lee@samsung.com,
민광원 <kwangwon.min@samsung.com>
Subject: Query about UCD allocation
Date: Fri, 26 Jan 2024 14:31:28 +0900 [thread overview]
Message-ID: <000001da5018$e9506c10$bbf14430$@samsung.com> (raw)
In-Reply-To: CGME20240126053128epcas2p41cf6ee4ff361ff89f7f1dd2f190aba6e@epcas2p4.samsung.com
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
next parent reply other threads:[~2024-01-26 5:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240126053128epcas2p41cf6ee4ff361ff89f7f1dd2f190aba6e@epcas2p4.samsung.com>
2024-01-26 5:31 ` Kiwoong Kim [this message]
2024-01-26 9:46 ` [EXT] Query about UCD allocation Bean Huo
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='000001da5018$e9506c10$bbf14430$@samsung.com' \
--to=kwmad.kim@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=h10.kim@samsung.com \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=kwangwon.min@samsung.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sh425.lee@samsung.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