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>
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
@@ -83,17 +83,17 @@ struct mapped_device {
|
||||
/* the number of internal suspends */
|
||||
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
|
||||
*/
|
||||
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user