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 PROTECTED] linux-2.6]$ pahole --expand_types -C sk_buff_head 
> net/core/sock.o
> /* <9a61> /home/acme/git/linux-2.6/include/linux/skbuff.h:111 */
> struct sk_buff_head {
>         struct sk_buff *           next;              /*     0     8 */
>         struct sk_buff *           prev;              /*     8     8 */
>         /* typedef __u32 */ unsigned int qlen;        /*    16     4 */
>         /* typedef spinlock_t */ struct {
>                 /* typedef raw_spinlock_t */ struct {
>                         unsigned int slock;           /*    20     4 */
>                 } raw_lock; /*    20     4 */
>                 unsigned int       break_lock;        /*    24     4 */
>         } lock; /*    20     8 */
> }; /* size: 32, cachelines: 1 */
>    /* padding: 4 */
>    /* last cacheline: 32 bytes */
> 
> #if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
>         unsigned int break_lock;
> #endif
> 
> Disabling CONFIG_PREEMPT makes you regain your confidence in the
> quality of your tea:

PREEMPT ? what is this ? Is it suitable for my machines with hundred of 
thousands of sockets ? :)

I hope you dont want to shrink struct sock for desktop users :)

BTW, your pahole tool is cool :)

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to