From: David Miller <davem@davemloft.net>
To: bigeasy@linutronix.de
Cc: netdev@vger.kernel.org, rostedt@goodmis.org, tglx@linutronix.de
Subject: Re: [PATCH] net: make neigh_priv_len in struct net_device 16bit instead of 8bit
Date: Thu, 12 Dec 2013 15:35:26 -0500 (EST) [thread overview]
Message-ID: <20131212.153526.1142755230387840010.davem@davemloft.net> (raw)
In-Reply-To: <1386839759-24042-1-git-send-email-bigeasy@linutronix.de>
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 12 Dec 2013 10:15:59 +0100
> neigh_priv_len is defined as u8. With all debug enabled struct
> ipoib_neigh has 200 bytes. The largest part is sk_buff_head with 96
> bytes and here the spinlock with 72 bytes.
> The size value still fits in this u8 leaving some room for more.
>
> On -RT struct ipoib_neigh put on weight and has 392 bytes. The main
> reason is sk_buff_head with 288 and the fatty here is spinlock with 192
> bytes. This does no longer fit into into neigh_priv_len and gcc
> complains.
>
> This patch changes neigh_priv_len from being 8bit to 16bit. Since the
> following element (dev_id) is 16bit followed by a spinlock which is
> aligned, the struct remains with a total size of 3200 (allmodconfig) /
> 2048 (with as much debug off as possible) bytes on x86-64.
> On x86-32 the struct is 1856 (allmodconfig) / 1216 (with as much debug
> off as possible) bytes long. The numbers were gained with and without
> the patch to prove that this change does not increase the size of the
> struct.
>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This is fine, applied, thanks.
prev parent reply other threads:[~2013-12-12 20:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 9:15 [PATCH] net: make neigh_priv_len in struct net_device 16bit instead of 8bit Sebastian Andrzej Siewior
2013-12-12 15:57 ` Steven Rostedt
2013-12-12 17:56 ` Arnaldo Carvalho de Melo
2013-12-12 20:35 ` 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=20131212.153526.1142755230387840010.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bigeasy@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).