lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 4 May 2007 14:24:09 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	"Arnaldo Carvalho de Melo" <acme@...stprotocols.net>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH][SOCK]: shrink struct sock

On Fri, 4 May 2007 08:24:34 -0300
"Arnaldo Carvalho de Melo" <acme@...stprotocols.net> wrote:

> On 5/4/07, Eric Dumazet <dada1@...mosbay.com> 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:
> 
> [acme@...a 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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ