[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080122.061852.98841950.davem@davemloft.net>
Date: Tue, 22 Jan 2008 06:18:52 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: netdev@...r.kernel.org
Subject: Re: [DST]: shrinks sizeof(struct rtable) by 64 bytes on x86_64
From: Eric Dumazet <dada1@...mosbay.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@...mosbay.com>
Thanks for doing this work Eric.
Patch applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists