dm: use percpu counters
Subsystems (2)
Mikulas Patocka
maintainerPATCH 2/3 dm: use percpu counters
Use percpu inflight counters to avoid cache line bouncing and improve performance.
Signed-off-by Mikulas Patocka <[email protected]>
--- drivers/md/dm-core.h | 5 +++++ drivers/md/dm.c | 50 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 16 deletions(-)
drivers/md/dm-core.h +5 -0
@@ -24,6 +24,10 @@ struct dm_kobject_holder {struct completion completion; }; +struct dm_percpu { +unsigned inflight[2 ]; +}; +/* * DM core internal structure that used directly by dm.c and dm-rq.c * DM targets must _not_ deference a mapped_device to directly access its members!
@@ -63,6 +67,7 @@ struct mapped_device {/* * A list of ios that arrived while we were suspended. */ +struct dm_percpu __percpu *counters;struct work_struct work;wait_queue_head_t wait;spinlock_t deferred_lock;
drivers/md/dm.c +34 -16
90 lines not on this page · raw message