diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-05-23 01:26:20 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2018-06-08 18:53:14 +0300 |
commit | 72d711c8768805b5f8cf2d23c575dfd188993e12 (patch) | |
tree | 1a442b3c9c5d7eb4fb61c2bdd10c19386ae19d28 /drivers/md/dm-core.h | |
parent | b2b04e7e2d3bffd301d1769700ba013f58ca01b7 (diff) | |
download | linux-72d711c8768805b5f8cf2d23c575dfd188993e12.tar.xz |
dm: adjust structure members to improve alignment
Eliminate most holes in DM data structures that were modified by
commit 6f1c819c21 ("dm: convert to bioset_init()/mempool_init()").
Also prevent structure members from unnecessarily spanning cache
lines.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-core.h')
-rw-r--r-- | drivers/md/dm-core.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h index f21c5d21bf1b..7d480c930eaf 100644 --- a/drivers/md/dm-core.h +++ b/drivers/md/dm-core.h @@ -31,6 +31,9 @@ struct dm_kobject_holder { struct mapped_device { struct mutex suspend_lock; + struct mutex table_devices_lock; + struct list_head table_devices; + /* * The current mapping (struct dm_table *). * Use dm_get_live_table{_fast} or take suspend_lock for @@ -38,17 +41,14 @@ struct mapped_device { */ void __rcu *map; - struct list_head table_devices; - struct mutex table_devices_lock; - unsigned long flags; - struct request_queue *queue; - int numa_node_id; - - enum dm_queue_mode type; /* Protect queue and type against concurrent access. */ struct mutex type_lock; + enum dm_queue_mode type; + + int numa_node_id; + struct request_queue *queue; atomic_t holders; atomic_t open_count; @@ -56,21 +56,21 @@ struct mapped_device { struct dm_target *immutable_target; struct target_type *immutable_target_type; + char name[16]; struct gendisk *disk; struct dax_device *dax_dev; - char name[16]; - - void *interface_ptr; /* * A list of ios that arrived while we were suspended. */ - atomic_t pending[2]; - wait_queue_head_t wait; struct work_struct work; + wait_queue_head_t wait; + atomic_t pending[2]; spinlock_t deferred_lock; struct bio_list deferred; + void *interface_ptr; + /* * Event handling. */ @@ -84,17 +84,17 @@ struct mapped_device { unsigned internal_suspend_count; /* - * Processing queue (flush) - */ - struct workqueue_struct *wq; - - /* * io objects are allocated from here. */ struct bio_set io_bs; struct bio_set bs; /* + * Processing queue (flush) + */ + struct workqueue_struct *wq; + + /* * freeze/thaw support require holding onto a super block */ struct super_block *frozen_sb; @@ -102,11 +102,11 @@ struct mapped_device { /* forced geometry settings */ struct hd_geometry geometry; - struct block_device *bdev; - /* kobject and completion */ struct dm_kobject_holder kobj_holder; + struct block_device *bdev; + /* zero-length flush that will be cloned and submitted to targets */ struct bio flush_bio; |