netdev
[Top] [All Lists]

Re: [PATCH][RFC 3] cleaning up struct sock

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: [PATCH][RFC 3] cleaning up struct sock
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxx>
Date: Thu, 20 Dec 2001 10:37:59 -0200
Cc: SteveW@xxxxxxx, jschlst@xxxxxxxxx, ncorbic@xxxxxxxxxxx, eis@xxxxxxxxxxxxx, dag@xxxxxxxxxxx, torvalds@xxxxxxxxxxxxx, marcelo@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <20011220.002126.119272610.davem@xxxxxxxxxx>
Mail-followup-to: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>, SteveW@xxxxxxx, jschlst@xxxxxxxxx, ncorbic@xxxxxxxxxxx, eis@xxxxxxxxxxxxx, dag@xxxxxxxxxxx, torvalds@xxxxxxxxxxxxx, marcelo@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20011218.130809.22018359.davem@xxxxxxxxxx> <20011218232222.A1963@xxxxxxxxxxxxxxxx> <20011220012339.A919@xxxxxxxxxxxxxxxx> <20011220.002126.119272610.davem@xxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.3.23i
Em Thu, Dec 20, 2001 at 12:21:26AM -0800, David S. Miller escreveu:
>    From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxx>
>    Date: Thu, 20 Dec 2001 01:23:39 -0200
> 
>    Available at:
>    
>    http://www.kernel.org/pub/linux/kernel/people/acme/v2.5/2.5.1/
>    sock.cleanup-2.5.1.patch.bz2
> 
> Looking pretty good.  I have one improvement.
> 
> I'd rather you pass the "kmem_cache_t" directly into sk_alloc, use
> NULL for "I don't have any extra private area".

humm I did that with sock_register to avoid changing all the sk_alloc
users, but in the end all protocols were changed so... ok, I'll do that, at
least it'll simplify the "rtnetlink socket allocated early in the boot
process before sock_register(rtnetlink) was called".
 
> And then, for the IP case lay it out like this:
> 
>       struct sock
>       struct ip_opt
>       struct {tcp,raw4,...}_opt
> 
> And use different kmem_cache_t's for each protocol instead of
> the same one for tcp, raw4, etc.
> 
> RAW/UDP sockets waste a lot of space with your current layout.

*grin* 

Ok, ok, lets save more bytes 8) I'll look into this.

- Arnaldo

<Prev in Thread] Current Thread [Next in Thread>