From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [DST]: shrinks sizeof(struct rtable) by 64 bytes on x86_64
Date: Tue, 22 Jan 2008 06:18:52 -0800 (PST) [thread overview]
Message-ID: <20080122.061852.98841950.davem@davemloft.net> (raw)
In-Reply-To: <20080122115006.82dbbff4.dada1@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Tue, 22 Jan 2008 11:50:06 +0100
> On x86_64, sizeof(struct rtable) is 0x148, which is rounded up to 0x180
> bytes by SLAB allocator.
>
> We can reduce this to exactly 0x140 bytes, without alignment overhead,
> and store 12 struct rtable per PAGE instead of 10.
>
> rate_tokens is currently defined as an "unsigned long", while its content
> should not exceed 6*HZ. It can safely be converted to an unsigned int.
>
> Moving tclassid right after rate_tokens to fill the 4 bytes hole permits
> to save 8 bytes on 'struct dst_entry', which finally permits to save 8
> bytes on 'struct rtable'
>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Thanks for doing this work Eric.
Patch applied.
prev parent reply other threads:[~2008-01-22 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 10:50 [DST]: shrinks sizeof(struct rtable) by 64 bytes on x86_64 Eric Dumazet
2008-01-22 14:18 ` David Miller [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=20080122.061852.98841950.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