Skip to contentSkip to conversation

drm: reorder drm_open_hash to remove padding on 64 bit builds

PATCH New Richard Kennedy 1 participant 1 message Mar 1, 2011

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

PATCH 1/1 drm: reorder drm_open_hash to remove padding on 64 bit builds

Remove 8 bytes of padding on 64 bit builds to reduce the size of drm_open_hash to 24 bytes, which also shrinks drm_object_file by 24 bytes (136 -> 112) allowing it to fit in one fewer cache lines and a smaller slab.

---
patch against v2.6.38-rc6
compiled & tested on x86_64 with nouveau.

regards
Richard

include/drm/drm_hashtab.h +1 -1
index 0af087a..ff2ab48 100644
@@ -48,8 +48,8 @@ struct drm_open_hash {
 	unsigned int size;
 	unsigned int order;
 	unsigned int fill;
-	struct hlist_head *table;
 	int use_vmalloc;
+	struct hlist_head *table;
 };