netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 00/14] shrink skb cb to 44 bytes
@ 2015-03-02 17:40 Florian Westphal
  2015-03-02 17:40 ` [PATCH RFC 01/14] net: gro: shrink napi_gro_cb to fit into hypothetical 44-byte sized skb cb Florian Westphal
                   ` (14 more replies)
  0 siblings, 15 replies; 30+ messages in thread
From: Florian Westphal @ 2015-03-02 17:40 UTC (permalink / raw)
  To: netdev

Following patches shrink all in-tree users of skb->cb[] so that kernel
still builds with skb->cb[] set to 44 bytes.

This would create a 4-byte hole, it would be easy to reorder skb
members so this hole is filled.

pahole dump for vmlinux with allyesconfig (+this patch series):

http://www.strlen.de/fw/pahole.txt.gz

remarks/known issues:
- adds __packet attribute to a few structures.
  Its needed to not have padding at end of the structure, else
  we get build assertion errors even if all members fit into cb[].
- checkpatch isn't happy yet.
- dccp changes are untested (its on my todo list)
- rxrpc change is untested (on todo list).
- wireless changes are untested, I don't own any of the affected hw.

The idea is to figure out what needs to be done to make build_skb() and
friends only touch the first 3 cachelines of the skb on all architectures.

We'd need to reduce skbuff by 40 bytes to achieve this for allyesconfig.

Other sk_buff reduction ideas being worked:

- move truesize to shinfo (which has 4 byte hole)
- turn ->data into offset on 64bit platforms (intrusive, > 1000 files
  affected)
- move pointers that are ususally not needed (nf_bridge, secpath) to the end,
  with flag field that tells us when pointer is valid (so we don't have
  to memset() them unconditionally at allocation time).
- seems we could already to this for the inner header fields since the're only
  valid once ->encapsulation / inner_protocol_type is set.

Comments and more ideas welcome.

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2015-03-03 17:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 17:40 [PATCH RFC 00/14] shrink skb cb to 44 bytes Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 01/14] net: gro: shrink napi_gro_cb to fit into hypothetical 44-byte sized skb cb Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 02/14] net: sched: reduce qdisc size to 24 byte Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 03/14] ipv6: use flag instead of u16 for hop in inet6_skb_parm Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 04/14] drivers: wireless: rt2x00: move skb_dma to queue entry Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 05/14] drivers: wireless: ar5523: use container_of Florian Westphal
2015-03-03  9:16   ` Pontus Fuchs
2015-03-02 17:40 ` [PATCH RFC 06/14] drivers: wireless: carl9170: shrink carl9170_tx_info Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 07/14] net: wireless: iwlwifi: shrink status private area Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 08/14] net: wireless: mac80211: shrink ieee80211_tx_info Florian Westphal
     [not found]   ` <1425318028-26531-9-git-send-email-fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org>
2015-03-02 18:53     ` Johannes Berg
2015-03-02 19:03       ` Florian Westphal
2015-03-02 19:18         ` Johannes Berg
     [not found]           ` <1425323929.1906.12.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2015-03-02 19:30             ` Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 09/14] net: wireless: mac80211: shrink private driver area Florian Westphal
2015-03-02 18:52   ` Johannes Berg
2015-03-02 17:40 ` [PATCH RFC 10/14] dccp: keep failed options on stack Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 11/14] dccp: reduce size of dccp_skb_cb to 40 bytes Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 12/14] rxrpc: use 32bit jiffies on 64bit platforms, too Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 13/14] net: tcp: don't assert sock_skb_cb_check_size Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 14/14] net: introduce and use KERNEL_MAX_HEADER_PARSE_ADDRLEN Florian Westphal
2015-03-03 17:03   ` Willem de Bruijn
2015-03-03 17:11     ` Florian Westphal
2015-03-02 19:49 ` [PATCH RFC 00/14] shrink skb cb to 44 bytes Eric Dumazet
     [not found]   ` <1425325763.5130.123.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-03-02 20:42     ` Florian Westphal
2015-03-02 21:56       ` Eric Dumazet
2015-03-02 22:17   ` David Miller
2015-03-03  4:02     ` Eric Dumazet
2015-03-03  4:05       ` David Miller
2015-03-03 11:43         ` Florian Westphal

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).