aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorRichard Kennedy <richard@rsk.demon.co.uk>2008-07-08 06:03:01 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-08 06:03:01 -0400
commit2c693610fe923764fe41b846fb86938a2010da6e (patch)
treef104646dc005a69f235053a9aee844376a2e41cc /include/linux/net.h
parent4ad3f26162ece5aca3045fd45e15dd99acea4a0e (diff)
net: remove padding from struct socket on 64bit & increase objects/cache
remove padding from struct socket reducing its size by 8 bytes. This allows more objects/cache in sock_inode_cache 12 objects/cache when cacheline size is 128 (generic x86_64) Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index 71f7dd559285..150a48c68d52 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -106,23 +106,23 @@ enum sock_shutdown_cmd {
106/** 106/**
107 * struct socket - general BSD socket 107 * struct socket - general BSD socket
108 * @state: socket state (%SS_CONNECTED, etc) 108 * @state: socket state (%SS_CONNECTED, etc)
109 * @type: socket type (%SOCK_STREAM, etc)
109 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) 110 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
110 * @ops: protocol specific socket operations 111 * @ops: protocol specific socket operations
111 * @fasync_list: Asynchronous wake up list 112 * @fasync_list: Asynchronous wake up list
112 * @file: File back pointer for gc 113 * @file: File back pointer for gc
113 * @sk: internal networking protocol agnostic socket representation 114 * @sk: internal networking protocol agnostic socket representation
114 * @wait: wait queue for several uses 115 * @wait: wait queue for several uses
115 * @type: socket type (%SOCK_STREAM, etc)
116 */ 116 */
117struct socket { 117struct socket {
118 socket_state state; 118 socket_state state;
119 short type;
119 unsigned long flags; 120 unsigned long flags;
120 const struct proto_ops *ops; 121 const struct proto_ops *ops;
121 struct fasync_struct *fasync_list; 122 struct fasync_struct *fasync_list;
122 struct file *file; 123 struct file *file;
123 struct sock *sk; 124 struct sock *sk;
124 wait_queue_head_t wait; 125 wait_queue_head_t wait;
125 short type;
126}; 126};
127 127
128struct vm_area_struct; 128struct vm_area_struct;