From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: "David S. Miller" <davem@redhat.com>,
SteveW@ACM.org, jschlst@samba.org, ncorbic@sangoma.com,
eis@baty.hanse.de, dag@brattli.net, torvalds@transmeta.com,
marcelo@conectiva.com.br, netdev@oss.sgi.com,
linux-kernel@vger.kernel.org
Subject: [PATCH][RFC 4] cleaning up struct sock
Date: Sat, 22 Dec 2001 01:28:24 -0200 [thread overview]
Message-ID: <20011222012824.A8996@conectiva.com.br> (raw)
In-Reply-To: <20011218.130809.22018359.davem@redhat.com> <20011218232222.A1963@conectiva.com.br> <20011220012339.A919@conectiva.com.br> <20011220.002126.119272610.davem@redhat.com> <20011221115438.A5990@conectiva.com.br>
In-Reply-To: <20011221115438.A5990@conectiva.com.br>
Em Fri, Dec 21, 2001 at 11:54:38AM -0200, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Dec 20, 2001 at 12:21:26AM -0800, David S. Miller escreveu:
> > 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.
Done, patch available at:
http://www.kernel.org/pub/linux/kernel/people/acme/v2.5/2.5.2-pre1/
sock.cleanup-2.5.2-pre1.bz2
Current state of /proc/slabinfo:
[acme@rama2 acme]$ grep sock /proc/slabinfo
unix_sock 7 20 400 1 2 1 : 17 572 2 0 0
raw4_sock 0 10 376 0 1 1 : 1 3 1 0 0
udp_sock 6 10 372 1 1 1 : 7 31 1 0 0
tcp_sock 13 15 800 3 3 1 : 14 47 3 0 0
sock 0 0 336 0 0 1 : 0 0 0 0 0
TODO: do the same for IPv6, that now has only one slabcache for all its
protocols.
- Arnaldo
prev parent reply other threads:[~2001-12-22 3:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20011210230810.C896@conectiva.com.br>
[not found] ` <20011210.231826.55509210.davem@redhat.com>
2001-12-18 5:35 ` [PATCH][RFC 2] cleaning up struct sock Arnaldo Carvalho de Melo
[not found] ` <20011217.225134.91313099.davem@redhat.com>
2001-12-18 12:01 ` Arnaldo Carvalho de Melo
2001-12-18 20:52 ` Arnaldo Carvalho de Melo
2001-12-18 21:08 ` David S. Miller
[not found] ` <20011218232222.A1963@conectiva.com.br>
2001-12-20 3:23 ` [PATCH][RFC 3] " Arnaldo Carvalho de Melo
2001-12-20 8:21 ` David S. Miller
2001-12-20 12:37 ` Arnaldo Carvalho de Melo
2001-12-21 13:54 ` Arnaldo Carvalho de Melo
2001-12-22 3:28 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011222012824.A8996@conectiva.com.br \
--to=acme@conectiva.com.br \
--cc=SteveW@ACM.org \
--cc=dag@brattli.net \
--cc=davem@redhat.com \
--cc=eis@baty.hanse.de \
--cc=jschlst@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=ncorbic@sangoma.com \
--cc=netdev@oss.sgi.com \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox