From: Mikulas Patocka Date: Wed, 10 Jul 2013 22:41:18 +0000 (+0100) Subject: dm: optimize reorder structure X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2a7faeb176fb0478bc6a0cb380c658b32179ead0;p=linux-beck.git 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 Signed-off-by: Alasdair G Kergon --- diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ecff83f5b53a..9e39d2b64bf8 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -133,6 +133,13 @@ struct mapped_device { atomic_t holders; atomic_t open_count; + /* + * The current mapping. + * Use dm_get_live_table{_fast} or take suspend_lock for + * dereference. + */ + struct dm_table *map; + unsigned long flags; struct request_queue *queue; @@ -161,13 +168,6 @@ struct mapped_device { */ struct workqueue_struct *wq; - /* - * The current mapping. - * Use dm_get_live_table{_fast} or take suspend_lock for - * dereference. - */ - struct dm_table *map; - /* * io objects are allocated from here. */