diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-11-13 18:34:55 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-11-13 18:34:55 -0800 |
commit | ee480683d975973e3ff679850871e00e011c4a96 (patch) | |
tree | a7c5d09f34b8f606fb3f709eb15615513d5981db /include | |
parent | 29f4c090079f442ea2723d292e4e64f0b6ac1f27 (diff) | |
download | blackbird-op-linux-ee480683d975973e3ff679850871e00e011c4a96.tar.gz blackbird-op-linux-ee480683d975973e3ff679850871e00e011c4a96.zip |
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')
-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 { /* Pointer to transport specific device structure */ u32 dev_index; u64 creation_time; - u32 num_resets; - u64 num_cmds; - u64 read_bytes; - u64 write_bytes; - spinlock_t stats_lock; + atomic_long_t num_resets; + atomic_long_t num_cmds; + atomic_long_t read_bytes; + atomic_long_t write_bytes; /* Active commands on this virtual SE device */ atomic_t simple_cmds; atomic_t dev_ordered_id; |