]> www.infradead.org Git - users/hch/misc.git/commitdiff
scsi: ufs: core: Reduce the size of struct ufshcd_lrb
authorBart Van Assche <bvanassche@acm.org>
Tue, 19 Aug 2025 15:43:49 +0000 (08:43 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 20 Aug 2025 02:22:16 +0000 (22:22 -0400)
The size of the data structures that are used in the hot path matters
for performance (IOPS). Hence this patch that reduces the size of struct
ufshcd_lrb on 64-bit systems by 16 bytes. The size of this data
structure is reduced from 152 to 136 bytes.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20250819154356.2256952-1-bvanassche@acm.org
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
include/ufs/ufshcd.h

index 1d3943777584240377c5f4da8964bba41461ac79..30ff169878dc87f38ca436c1a2371a53a4a78b91 100644 (file)
@@ -167,13 +167,13 @@ struct ufs_pm_lvl_states {
  * @task_tag: Task tag of the command
  * @lun: LUN of the command
  * @intr_cmd: Interrupt command (doesn't participate in interrupt aggregation)
+ * @req_abort_skip: skip request abort task flag
  * @issue_time_stamp: time stamp for debug purposes (CLOCK_MONOTONIC)
  * @issue_time_stamp_local_clock: time stamp for debug purposes (local_clock)
  * @compl_time_stamp: time stamp for statistics (CLOCK_MONOTONIC)
  * @compl_time_stamp_local_clock: time stamp for debug purposes (local_clock)
  * @crypto_key_slot: the key slot to use for inline crypto (-1 if none)
  * @data_unit_num: the data unit number for the first block for inline crypto
- * @req_abort_skip: skip request abort task flag
  */
 struct ufshcd_lrb {
        struct utp_transfer_req_desc *utr_descriptor_ptr;
@@ -193,6 +193,7 @@ struct ufshcd_lrb {
        int task_tag;
        u8 lun; /* UPIU LUN id field is only 8-bit wide */
        bool intr_cmd;
+       bool req_abort_skip;
        ktime_t issue_time_stamp;
        u64 issue_time_stamp_local_clock;
        ktime_t compl_time_stamp;
@@ -201,8 +202,6 @@ struct ufshcd_lrb {
        int crypto_key_slot;
        u64 data_unit_num;
 #endif
-
-       bool req_abort_skip;
 };
 
 /**