Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm: optimize reorder structure

This reorder actually improves performance by 20% (from 39.1s to 32.8s)
on x86-64 quad core Opteron.

I have no explanation for this, possibly it makes some other entries are
better cache-aligned.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

authored by

Mikulas Patocka and committed by
Alasdair G Kergon
2a7faeb1 83d5e5b0

+7 -7
+7 -7
drivers/md/dm.c
··· 133 133 atomic_t holders; 134 134 atomic_t open_count; 135 135 136 + /* 137 + * The current mapping. 138 + * Use dm_get_live_table{_fast} or take suspend_lock for 139 + * dereference. 140 + */ 141 + struct dm_table *map; 142 + 136 143 unsigned long flags; 137 144 138 145 struct request_queue *queue; ··· 167 160 * Processing queue (flush) 168 161 */ 169 162 struct workqueue_struct *wq; 170 - 171 - /* 172 - * The current mapping. 173 - * Use dm_get_live_table{_fast} or take suspend_lock for 174 - * dereference. 175 - */ 176 - struct dm_table *map; 177 163 178 164 /* 179 165 * io objects are allocated from here.