netdev
[Top] [All Lists]

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

To: acme@xxxxxxxxxxxxxxxx
Subject: Re: [PATCH][RFC 3] cleaning up struct sock
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Thu, 20 Dec 2001 00:21:26 -0800 (PST)
Cc: SteveW@xxxxxxx, jschlst@xxxxxxxxx, ncorbic@xxxxxxxxxxx, eis@xxxxxxxxxxxxx, dag@xxxxxxxxxxx, torvalds@xxxxxxxxxxxxx, marcelo@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <20011220012339.A919@conectiva.com.br>
References: <20011218.130809.22018359.davem@redhat.com> <20011218232222.A1963@conectiva.com.br> <20011220012339.A919@conectiva.com.br>
Sender: owner-netdev@xxxxxxxxxxx
   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".

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.

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