summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-core.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2022-03-26 19:38:07 +0100
committerMike Snitzer <snitzer@kernel.org>2022-05-05 23:31:34 +0200
commit982b48ae25d9aabd69c1f012a94f63766181f0b2 (patch)
treef86a32b990532360172b26d5c08ddb2c96384e75 /drivers/md/dm-core.h
parentdm: add local variables to clone_endio and __map_bio (diff)
downloadlinux-982b48ae25d9aabd69c1f012a94f63766181f0b2.tar.xz
linux-982b48ae25d9aabd69c1f012a94f63766181f0b2.zip
dm: move hot dm_io members to same cacheline as dm_target_io
Just saves some cacheline bouncing for members accessed during cloned bio submission and completion. Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-core.h')
-rw-r--r--drivers/md/dm-core.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index db069fa9cee5..41d6511dc7cf 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -250,17 +250,19 @@ static inline bool dm_tio_is_normal(struct dm_target_io *tio)
#define DM_IO_MAGIC 19577
struct dm_io {
unsigned short magic;
- blk_short_t flags;
- atomic_t io_count;
- struct mapped_device *md;
- struct bio *orig_bio;
- blk_status_t status;
+
spinlock_t lock;
unsigned long start_time;
void *data;
struct hlist_node node;
struct task_struct *map_task;
struct dm_stats_aux stats_aux;
+
+ blk_short_t flags;
+ blk_status_t status;
+ atomic_t io_count;
+ struct mapped_device *md;
+ struct bio *orig_bio;
/* last member of dm_target_io is 'struct bio' */
struct dm_target_io tio;
};