diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-11-13 21:34:55 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-11-13 21:34:55 -0500 |
commit | ee480683d975973e3ff679850871e00e011c4a96 (patch) | |
tree | a7c5d09f34b8f606fb3f709eb15615513d5981db /include/target | |
parent | 29f4c090079f442ea2723d292e4e64f0b6ac1f27 (diff) |
target: Convert se_device statistics to atomic_long_t
This patch converts the handful of se_device statistics to type
atomic_long_t, instead of using se_device->stats_lock when
incrementing these values.
More importantly, go ahead and drop the spinlock usage within
transport_lookup_cmd_lun() fast-path code.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_base.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 96bf1b0239cc..fab91baf8ef4 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -683,11 +683,10 @@ struct se_device { | |||
683 | /* Pointer to transport specific device structure */ | 683 | /* Pointer to transport specific device structure */ |
684 | u32 dev_index; | 684 | u32 dev_index; |
685 | u64 creation_time; | 685 | u64 creation_time; |
686 | u32 num_resets; | 686 | atomic_long_t num_resets; |
687 | u64 num_cmds; | 687 | atomic_long_t num_cmds; |
688 | u64 read_bytes; | 688 | atomic_long_t read_bytes; |
689 | u64 write_bytes; | 689 | atomic_long_t write_bytes; |
690 | spinlock_t stats_lock; | ||
691 | /* Active commands on this virtual SE device */ | 690 | /* Active commands on this virtual SE device */ |
692 | atomic_t simple_cmds; | 691 | atomic_t simple_cmds; |
693 | atomic_t dev_ordered_id; | 692 | atomic_t dev_ordered_id; |