* [PATCH v2 0/2] scsi: ufs: batch device-init reads with UFS 5.0 aggregated read
[not found] <CGME20260930050201epcms2p13ab67182445b0555acc8d27b927cda86@epcms2p1>
@ 2026-09-30 5:02 ` Hyeoncheol Jeong
0 siblings, 0 replies; only message in thread
From: Hyeoncheol Jeong @ 2026-09-30 5:02 UTC (permalink / raw)
To: James.Bottomley, mkp, avri.altman, bvanassche, peter.wang, linux-scsi
Cc: Jinyoung Choi, Alim Akhtar, beanhuo, can.guo, Hyeoncheol Jeong,
linux-kernel
UFS 5.0 adds the AGGREGATED READ query (opcode 0x9): one QUERY RESPONSE
UPIU returns many descriptors, attributes and flags as a chain of typed
groups.
Patch 1 adds the opcode, the request mask, the group header and the reply
plumbing. Patch 2 uses it during device init: a single aggregated read
replaces the per-item queries for the attributes, flags and ID strings,
falling back to individual queries on older devices or a rejected opcode.
No functional change for pre-5.0 devices.
Motivation: on a Qualcomm SM8850 platform with a Samsung UFS 5.0 device,
timing raw UPIU queries over BSG (100 iterations) shows that replacing the
device-init read burst with a single aggregated read reduces the query
time by 75-78% (min 75.3%, avg 76.4%, max 78.5%).
(That setup batched 8 init reads; on current mainline this series batches
the 6 device-init reads that remain individual queries.)
Changes since v1:
- Rename UFS_AGG_TYPE_UNIT_DESC to UFS_AGG_TYPE_UNIT_RPMB_DESC (Peter Wang)
- Add UFS_AGG_GROUP_RESERVED = 0x00 (Peter Wang)
- Rename hdr_off/next_off to group_off/next_group_off (Peter Wang)
- Rebased onto v7.3-rc5
Hyeoncheol Jeong (2):
scsi: ufs: Add the aggregated read query opcode and its reply format
scsi: ufs: Serve the device init reads from one aggregated read
drivers/ufs/core/ufshcd.c | 364 +++++++++++++++++++++++++++++++++++---
include/ufs/ufs.h | 47 +++++
include/ufs/ufshcd.h | 11 ++
3 files changed, 402 insertions(+), 20 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread