dm: optimize reorder structure
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Jul 2013 22:41:18 +0000 (23:41 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 10 Jul 2013 22:41:18 +0000 (23:41 +0100)
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>
drivers/md/dm.c

index ecff83f5b53a0c2653fa7b1006de370d483fb5ed..9e39d2b64bf8f3cc4a864e300ff61f5020b67dda 100644 (file)
@@ -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.
         */