From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH net-next v2 0/5] net: skbuff: hide some bitfield members
Date: Mon, 17 Apr 2023 12:26:16 -0700 [thread overview]
Message-ID: <20230417122616.230880c1@kernel.org> (raw)
In-Reply-To: <20230417155350.337873-1-kuba@kernel.org>
On Mon, 17 Apr 2023 08:53:45 -0700 Jakub Kicinski wrote:
> There is a number of protocol or subsystem specific fields
> in struct sk_buff which are only accessed by one subsystem.
> We can wrap them in ifdefs with minimal code impact.
>
> This gives us a better chance to save a 2B and a 4B holes
> resulting with the following savings (assuming a lucky
> kernel config):
>
> - /* size: 232, cachelines: 4, members: 28 */
> - /* sum members: 227, holes: 1, sum holes: 4 */
> - /* sum bitfield members: 8 bits (1 bytes) */
> + /* size: 224, cachelines: 4, members: 28 */
> /* forced alignments: 2 */
> - /* last cacheline: 40 bytes */
> + /* last cacheline: 32 bytes */
>
> I think that the changes shouldn't be too controversial.
> The only one I'm not 100% sure of is the SCTP one,
> 12 extra LoC for one bit.. But it did fit squarely
> in the "this bit has only one user" category.
Missed Simon's tag, sorry about that:
https://lore.kernel.org/all/ZD03APYJqdhflYNJ@kernel.org/
Acked-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2023-04-17 19:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 15:53 [PATCH net-next v2 0/5] net: skbuff: hide some bitfield members Jakub Kicinski
2023-04-17 15:53 ` [PATCH net-next v2 1/5] net: skbuff: hide wifi_acked when CONFIG_WIRELESS not set Jakub Kicinski
2023-04-18 7:45 ` Johannes Berg
2023-04-17 15:53 ` [PATCH net-next v2 2/5] net: skbuff: hide csum_not_inet when CONFIG_IP_SCTP " Jakub Kicinski
2023-04-17 15:53 ` [PATCH net-next v2 3/5] net: skbuff: move alloc_cpu into a potential hole Jakub Kicinski
2023-04-17 15:53 ` [PATCH net-next v2 4/5] net: skbuff: push nf_trace down the bitfield Jakub Kicinski
2023-04-17 15:53 ` [PATCH net-next v2 5/5] net: skbuff: hide nf_trace and ipvs_property Jakub Kicinski
2023-04-17 19:26 ` Jakub Kicinski [this message]
2023-04-19 12:10 ` [PATCH net-next v2 0/5] net: skbuff: hide some bitfield members patchwork-bot+netdevbpf
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=20230417122616.230880c1@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).