Skip to contentSkip to conversation

fsnotify: remove alignment padding from fsnotify_mark on 64 bit builds

PATCH New Richard Kennedy 1 participant 1 message Sep 28, 2010 Fsnotify: filesystem notification infrastructure

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsnotify: remove alignment padding from fsnotify_mark on 64 bit builds

Reorder struct fsnotfiy_mark to remove 8 bytes of alignment padding on 64 bit builds.
Shrinks fsnotfiy_mark to 128 bytes allowing more objects per slab in its kmem_cache and reduces the number of cachelines needed for each structure.

----

Hi Eric,
patch against 2.6.36-rc5
compiled & booted on x86_64.

I'm not sure how to test this, but it boots and I think it's safe to make this change.

regards
Richard

include/linux/fsnotify_backend.h +1 -1
index e40190d..369bed5 100644
@@ -275,8 +275,8 @@ struct fsnotify_mark {
 		struct fsnotify_inode_mark i;
 		struct fsnotify_vfsmount_mark m;
 	};
-	__u32 ignored_mask;		/* events types to ignore */
 	struct list_head free_g_list;	/* tmp list used when freeing this mark */
+	__u32 ignored_mask;		/* events types to ignore */
 #define FSNOTIFY_MARK_FLAG_INODE		0x01
 #define FSNOTIFY_MARK_FLAG_VFSMOUNT		0x02
 #define FSNOTIFY_MARK_FLAG_OBJECT_PINNED	0x04