Skip to content

Commit

Permalink
dm: reorder members in mapped_device struct
Browse files Browse the repository at this point in the history
Improves alignment and groups related members relative to cachelines.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
snitm committed Feb 21, 2022
1 parent 0ab30b4 commit 205649d
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions drivers/md/dm-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,21 @@ struct mapped_device {
struct gendisk *disk;
struct dax_device *dax_dev;

wait_queue_head_t wait;
unsigned long __percpu *pending_io;

/* forced geometry settings */
struct hd_geometry geometry;

/*
* Processing queue (flush)
*/
struct workqueue_struct *wq;

/*
* A list of ios that arrived while we were suspended.
*/
struct work_struct work;
wait_queue_head_t wait;
spinlock_t deferred_lock;
struct bio_list deferred;

Expand All @@ -85,36 +93,28 @@ struct mapped_device {
struct list_head uevent_list;
spinlock_t uevent_lock; /* Protect access to uevent_list */

/* for blk-mq request-based DM support */
bool init_tio_pdu:1;
struct blk_mq_tag_set *tag_set;

struct dm_stats stats;

/* the number of internal suspends */
unsigned internal_suspend_count;

int swap_bios;
struct semaphore swap_bios_semaphore;
struct mutex swap_bios_lock;

/*
* io objects are allocated from here.
*/
struct bio_set io_bs;
struct bio_set bs;

/*
* Processing queue (flush)
*/
struct workqueue_struct *wq;

/* forced geometry settings */
struct hd_geometry geometry;

/* kobject and completion */
struct dm_kobject_holder kobj_holder;

int swap_bios;
struct semaphore swap_bios_semaphore;
struct mutex swap_bios_lock;

struct dm_stats stats;

/* for blk-mq request-based DM support */
struct blk_mq_tag_set *tag_set;
bool init_tio_pdu:1;

struct srcu_struct io_barrier;

#ifdef CONFIG_BLK_DEV_ZONED
Expand Down

0 comments on commit 205649d

Please sign in to comment.