Re: [PATCH][SOCK]: shrink struct sock

2007-05-04 Thread Eric Dumazet
Arnaldo Carvalho de Melo a écrit : [EMAIL PROTECTED] linux-2.6]$ pahole -C sk_buff_head net/core/sock.o struct sk_buff_head { struct sk_buff * next; /* 0 8 */ struct sk_buff * prev; /* 8 8 */ __u32

Re: [PATCH][SOCK]: shrink struct sock

2007-05-04 Thread Ian McDonald
On 5/4/07, David Miller [EMAIL PROTECTED] wrote: sk_buff_head is due for being killed from the whole tree. Nobody really needs the qlen, few things really need the lock, and those that do can define their own as needed :-) I've got out of tree research code that uses the qlen quite

Re: [PATCH][SOCK]: shrink struct sock

2007-05-04 Thread Arnaldo Carvalho de Melo
On 5/4/07, Eric Dumazet [EMAIL PROTECTED] wrote: Arnaldo Carvalho de Melo a écrit : [EMAIL PROTECTED] linux-2.6]$ pahole -C sk_buff_head net/core/sock.o struct sk_buff_head { struct sk_buff * next; /* 0 8 */ struct sk_buff * prev;

Re: [PATCH][SOCK]: shrink struct sock

2007-05-04 Thread Eric Dumazet
On Fri, 4 May 2007 08:24:34 -0300 Arnaldo Carvalho de Melo [EMAIL PROTECTED] wrote: On 5/4/07, Eric Dumazet [EMAIL PROTECTED] wrote: Hum, maybe not enough tea this morning, but I always thought spinlock_t size was 4 bytes Well, unfolding sk_buff_head to see the details: [EMAIL

[PATCH][SOCK]: shrink struct sock

2007-05-03 Thread Arnaldo Carvalho de Melo
Hi David, This saves 8 bytes out of struct sock in 64bit arches, tested on x86_64. [EMAIL PROTECTED] linux-2.6]$ codiff sock.o.before net/core/sock.o /home/acme/git/linux-2.6/net/core/sock.c: struct sock | -8 1 struct changed [EMAIL PROTECTED] linux-2.6]$ Now struct sock has this

Re: [PATCH][SOCK]: shrink struct sock

2007-05-03 Thread David Miller
From: Arnaldo Carvalho de Melo [EMAIL PROTECTED] Date: Fri, 4 May 2007 01:11:01 -0300 This saves 8 bytes out of struct sock in 64bit arches, tested on x86_64. Thanks I'll apply this. Now struct sock has this layout, where we waste more 20 bytes, in four 4 byte paddings in struct