From: Thomas Graf Date: Fri, 10 Apr 2015 09:41:34 +0100 Subject: [Intel-wired-lan] [PATCH 0/3 net-next] Bring sizeof(net_device) down to < 2K bytes In-Reply-To: <20150410000151.GA1728@Alexeis-MBP.westell.com> References: <20150410000151.GA1728@Alexeis-MBP.westell.com> Message-ID: <20150410084134.GA23070@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On 04/09/15 at 05:01pm, Alexei Starovoitov wrote: > On Fri, Apr 10, 2015 at 01:43:25AM +0200, Thomas Graf wrote: > > The size of struct net_device crossed the 2K boundary a while ago which > > is a waste in combination with many net namespaces. This series brings > > the size of struct net_device down to well below 2K in total size with > > a typical configuration. Some reserves a several holes leave room for > > further expansion. > > Great stuff! > Can you share what was the sizeof(struct net_device) with typical > x86 config before and after? Before: /* BRAIN FART ALERT! 2176 != 2091 + 41(holes), diff = 44 */ After: /* size: 1984, cachelines: 31, members: 121 */ /* sum members: 1947, holes: 6, sum holes: 33 */ /* padding: 8 */ /* paddings: 2, sum paddings: 11 */ /* BRAIN FART ALERT! 1984 != 1947 + 33(holes), diff = 4 */