summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2025-11-02 22:07:27 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2025-11-02 22:07:27 -0500
commitbb8222b6f3586168f66ae5678fdca3179af60821 (patch)
tree72ff6b7b0f572bda92a6644ffc96c5225cd591ca /include
parent867e4b1bae4bc990dcdbc756f2caa680818036bd (diff)
parentbbb490053173b737604a87af03f2113fb1c279a0 (diff)
Merge patch series "target: RW/num_cmds stats improvements"
Mike Christie <michael.christie@oracle.com> says: The following patches were made over Linus tree. They fix/improve the stats used in the main IO path. The first patch fixes an issue where I made some stats u32 when they should have stayed u64. The rest of the patches improve the handling of RW/num_cmds stats to reduce code duplication and improve performance. Link: https://patch.msgid.link/20250917221338.14813-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/target/target_core_base.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 56333b5726c8..7016d93fa383 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -672,9 +672,9 @@ struct se_lun_acl {
};
struct se_dev_entry_io_stats {
- u32 total_cmds;
- u32 read_bytes;
- u32 write_bytes;
+ u64 total_cmds;
+ u64 read_bytes;
+ u64 write_bytes;
};
struct se_dev_entry {
@@ -750,9 +750,9 @@ struct se_port_stat_grps {
};
struct scsi_port_stats {
- atomic_long_t cmd_pdus;
- atomic_long_t tx_data_octets;
- atomic_long_t rx_data_octets;
+ u64 cmd_pdus;
+ u64 tx_data_octets;
+ u64 rx_data_octets;
};
struct se_lun {
@@ -779,7 +779,7 @@ struct se_lun {
spinlock_t lun_tg_pt_gp_lock;
struct se_portal_group *lun_tpg;
- struct scsi_port_stats lun_stats;
+ struct scsi_port_stats __percpu *lun_stats;
struct config_group lun_group;
struct se_port_stat_grps port_stat_grps;
struct completion lun_shutdown_comp;
@@ -812,9 +812,9 @@ struct se_device_queue {
};
struct se_dev_io_stats {
- u32 total_cmds;
- u32 read_bytes;
- u32 write_bytes;
+ u64 total_cmds;
+ u64 read_bytes;
+ u64 write_bytes;
};
struct se_device {