From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] [NET] reduce sizeof(struct inet_peer), cleanup, change in peer_check_expire()
Date: Thu, 12 Oct 2006 15:15:29 -0700 (PDT) [thread overview]
Message-ID: <20061012.151529.95506153.davem@davemloft.net> (raw)
In-Reply-To: <452EA214.7080905@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Thu, 12 Oct 2006 22:14:12 +0200
> 1) shrink struct inet_peer on 64 bits platforms.
> ------------------------------------------------
> I noticed sizeof(struct inet_peer) was 64+8 on x86_64
>
> As we dont really need 64 bits timestamps (we only care for garbage
> collection), we can use 32bits ones and reduce sizeof(struct inet_peer) to 64
> bytes : Because of SLAB_HWCACHE_ALIGN constraint, final allocation is 64 bytes
> instead of 128 bytes per inet_peer structure.
I'm not convinced this is %100 correct. There are wrapping
cases that I think aren't covered.
Consider an entry that lives long enough for the lower 32-bits
of jiffies to wrap, then we kill it, but we won't purge it
properly if the wrapped jiffie is close to dtime.
I'm sure there are other similar cases as well.
> 2) Cleanup
> ----------
> inet_putpeer() is not anymore inlined in inetpeer.h, as this is not called
> in fast paths, to reduce text size. Some exports are not anymore needed
> (inet_peer_unused_lock, inet_peer_unused_tailp) and can be declared static.
>
> 3) No more hard limit (PEER_MAX_CLEANUP_WORK = 30)
> --------------------------------------------------
> peer_check_expire() try to delete entries for at most one timer tick. CPUS
> are going faster, hard limits are becoming useless... Similar thing is done in
> net/ipv4/route.c garbage collector.
These parts are fine.
next prev parent reply other threads:[~2006-10-12 22:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20051217071029.GY23384@wotan.suse.de>
[not found] ` <20051216.231517.68922847.davem@davemloft.net>
[not found] ` <43A3EE8A.5020907@cosmosbay.com>
[not found] ` <43CCBF3D.2070900@cosmosbay.com>
[not found] ` <4415A4C1.1030906@cosmosbay.com>
2006-10-12 20:14 ` [PATCH] [NET] reduce sizeof(struct inet_peer), cleanup, change in peer_check_expire() Eric Dumazet
2006-10-12 22:15 ` David Miller [this message]
2006-10-13 3:56 ` Eric Dumazet
2006-10-13 4:18 ` David Miller
2006-10-13 4:24 ` Eric Dumazet
2006-10-18 5:08 ` [PATCH] [NET] reduce sizeof(struct flow) Eric Dumazet
2006-10-18 5:17 ` YOSHIFUJI Hideaki / 吉藤英明
2006-10-18 5:30 ` Eric Dumazet
2006-10-18 5:27 ` David Miller
2006-10-18 5:42 ` Eric Dumazet
2006-10-18 6:53 ` David Miller
2006-10-18 8:20 ` Steven Whitehouse
2006-10-18 8:55 ` Eric Dumazet
2006-10-18 12:42 ` Steven Whitehouse
2006-10-18 13:32 ` Eric Dumazet
2006-10-19 3:50 ` David Miller
2006-10-19 5:13 ` Eric Dumazet
2006-10-20 13:55 ` [PATCH] [NET] reduce sizeof(struct flowi) by 20 bytes Eric Dumazet
2006-10-22 3:25 ` David Miller
2006-10-18 11:33 ` [PATCH] [NET] reduce sizeof(struct flow) Ingo Oeser
2006-10-20 7:18 ` [PATCH] [NET] can use __get_cpu_var() instead of per_cpu() in loopback driver Eric Dumazet
2006-10-20 7:32 ` David Miller
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=20061012.151529.95506153.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).