Skip to contentSkip to conversation

drm/ttm: remove padding from ttm_ref_object on 64bit builds

PATCH In review Richard Kennedy 2 participants 2 messages Jan 26, 2010 – Jan 30, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: remove padding from ttm_ref_object on 64bit builds

Re-order structure ttm_ref_object to remove 8 bytes of alignment padding on 64 bit builds, so shrinking its size from 72 to 64 bytes allowing it to fit into a smaller slab.

----
patch against 2.6.33-rc5
compiled & tested on x86_64 AMDX2 and nouveau
regards
Richard

drivers/gpu/drm/ttm/ttm_object.c +1 -1
index 1099aba..75e9d6f 100644
@@ -109,8 +109,8 @@ struct ttm_ref_object {
 	struct drm_hash_item hash;
 	struct list_head head;
 	struct kref kref;
-	struct ttm_base_object *obj;
 	enum ttm_ref_type ref_type;
+	struct ttm_base_object *obj;
 	struct ttm_object_file *tfile;
 };
 
Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines · Richard Kennedy

Re-order structure ttm_ref_object to remove 8 bytes of alignment padding on 64 bit builds, so shrinking its size from 72 to 64 bytes allowing it to fit into a smaller slab.

----
patch against 2.6.33-rc5
compiled & tested on x86_64 AMDX2 and nouveau
regards
Richard

drivers/gpu/drm/ttm/ttm_object.c +0 -0
index 1099aba..75e9d6f 100644

drivers/gpu/drm/ttm/ttm_object.c struct ttm_ref_object { · line 116

Quoted 9 lines
drivers/gpu/drm/ttm/ttm_object.c +1 -1
@@ -109,8 +109,8 @@ struct ttm_ref_object {
 	struct drm_hash_item hash;
 	struct list_head head;
 	struct kref kref;
-	struct ttm_base_object *obj;
 	enum ttm_ref_type ref_type;
+	struct ttm_base_object *obj;
 	struct ttm_object_file *tfile;
 };
 

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--