From: Richard Kennedy Date: Thu, 4 Dec 2008 11:17:47 +0000 (+0000) Subject: fs: reorder struct inotify_device on 64bits to remove padding X-Git-Tag: v2.6.29-rc1~549^2~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e2b689d82c0394e5239a3557a217f19e2f47f1be;p=linux-2.6-omap-h63xx.git fs: reorder struct inotify_device on 64bits to remove padding Reorder struct inotify_device to remove 8 bytes of padding on 64bit builds, reducing size to 128 bytes . Therefore allocating from a smaller slab & using one fewer cachelines. Signed-off-by: Richard Kennedy ---- Hi, patch against 2.6.28-rc7. built & tested on AMDX2 desktop. I've not been able to send this to the listed inotify maintainers, I just get mail failures. So I guessed filesystem was the best home for it, hope that's ok. regards Richard Signed-off-by: Al Viro --- diff --git a/fs/inotify_user.c b/fs/inotify_user.c index e2425bbd871..400f8064a54 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -76,10 +76,10 @@ struct inotify_device { struct mutex ev_mutex; /* protects event queue */ struct mutex up_mutex; /* synchronizes watch updates */ struct list_head events; /* list of queued events */ - atomic_t count; /* reference count */ struct user_struct *user; /* user who opened this dev */ struct inotify_handle *ih; /* inotify handle */ struct fasync_struct *fa; /* async notification */ + atomic_t count; /* reference count */ unsigned int queue_size; /* size of the queue (bytes) */ unsigned int event_count; /* number of pending events */ unsigned int max_events; /* maximum number of events */