fs/eventpoll : reduce sizeof(struct epitem)
From: dada1
Date: Wed Feb 04 2004 - 09:23:49 EST
Hi Davide
On a x86_64 platform, I noticed that the size of (struct epitem) is 136
bytes, rounded to 192 (because of L1_CACHE alignment of 64 bytes)
If you reorder some fields of this structure, we can reduce the size to
128 bytes.
The rationale is to group nwait & fd integer (32bits) fields, instead of
mixing them with pointers (64 bits)
See you
Eric Dumazet
diff -u linux-2.6.2/fs/eventpoll.c.save linux-2.6.2/fs/eventpoll.c
--- eventpoll.c.save 2004-02-04 14:59:49.000000000 +0100
+++ eventpoll.c 2004-02-04 15:02:20.000000000 +0100
@@ -241,14 +241,15 @@
/* Number of active wait queue attached to poll operations */
int nwait;
+ /* The file descriptor this item refers to */
+ int fd;
+
/* List containing poll wait queues */
struct list_head pwqlist;
/* The "container" of this item */
struct eventpoll *ep;
- /* The file descriptor this item refers to */
- int fd;
/* The file this item refers to */
struct file *file;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/