Whamcloud - gitweb
LU-3059 lu: shrink lu_object_header by 8 bytes on x86_64 85/9185/2
authorAndreas Dilger <andreas.dilger@intel.com>
Sat, 8 Feb 2014 03:33:02 +0000 (20:33 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Mar 2014 18:48:03 +0000 (18:48 +0000)
Locate the loh_flags and loh_ref fields together in lu_object_header
to avoid holes and shrink the structure by 8 bytes.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I36b6132a819b6557d6d1688adb3e1f7d282d22b5
Reviewed-on: http://review.whamcloud.com/9185
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lu_object.h

index efffc61..989e0f9 100644 (file)
@@ -516,6 +516,10 @@ enum lu_object_header_attr {
  */
 struct lu_object_header {
        /**
+        * Fid, uniquely identifying this object.
+        */
+       struct lu_fid           loh_fid;
+       /**
         * Object flags from enum lu_object_header_flags. Set and checked
         * atomically.
         */
@@ -525,10 +529,6 @@ struct lu_object_header {
         */
        atomic_t                loh_ref;
        /**
-        * Fid, uniquely identifying this object.
-        */
-       struct lu_fid           loh_fid;
-       /**
         * Common object attributes, cached for efficiency. From enum
         * lu_object_header_attr.
         */
@@ -536,16 +536,16 @@ struct lu_object_header {
        /**
         * Linkage into per-site hash table. Protected by lu_site::ls_guard.
         */
-       cfs_hlist_node_t        loh_hash;
+       struct hlist_node       loh_hash;
        /**
         * Linkage into per-site LRU list. Protected by lu_site::ls_guard.
         */
-       cfs_list_t              loh_lru;
+       struct list_head        loh_lru;
        /**
         * Linkage into list of layers. Never modified once set (except lately
         * during object destruction). No locking is necessary.
         */
-       cfs_list_t              loh_layers;
+       struct list_head        loh_layers;
        /**
         * A list of references to this object, for debugging.
         */