RFC shrink skb cb to 44 bytes
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest14 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | net: gro: shrink napi_gro_cb to fit into hypothetical 44-byte sized skb cbinclude/ | +13 | 0 replies | |
| 2/14 | net: sched: reduce qdisc size to 24 byteinclude/ net/ | +25 | 0 replies | |
| 3/14 | ipv6: use flag instead of u16 for hop in inet6_skb_parminclude/ net/ net/ +1 more | +8 | 0 replies | |
| 4/14 | drivers: wireless: rt2x00: move skb_dma to queue entrydrivers/ drivers/ drivers/ +3 more | +22 | 0 replies | |
| 5/14 | drivers: wireless: ar5523: use container_ofdrivers/ drivers/ | +4 | 1 reply | |
| 6/14 | drivers: wireless: carl9170: shrink carl9170_tx_infodrivers/ drivers/ drivers/ | +20 | 0 replies | |
| 7/14 | net: wireless: iwlwifi: shrink status private areadrivers/ drivers/ include/ | +5 | 0 replies | |
| 8/14 | net: wireless: mac80211: shrink ieee80211_tx_infoinclude/ net/ | +11 | 4 replies | |
| 9/14 | net: wireless: mac80211: shrink private driver areadrivers/ include/ | +4 | 1 reply | |
| 10/14 | dccp: keep failed options on stackinclude/ net/ net/ +5 more | +97 | 0 replies | |
| 11/14 | dccp: reduce size of dccp_skb_cb to 40 bytesnet/ | +7 | 0 replies | |
| 12/14 | rxrpc: use 32bit jiffies on 64bit platforms, toonet/ net/ net/ | +51 | 0 replies | |
| 13/14 | net: tcp: don't assert sock_skb_cb_check_sizenet/ | +2 | 0 replies | |
| 14/14 | net: introduce and use KERNEL_MAX_HEADER_PARSE_ADDRLENdrivers/ drivers/ drivers/ +5 more | +19 | 2 replies |
Reviews trailers per patch
None of the 14 patches has a Reviewed-by or Acked-by.
| Patch | Pontus Fuchs |
|---|---|
| 1/14 | |
| 2/14 | |
| 3/14 | |
| 4/14 | |
| 5/14 | T-b |
| 6/14 | |
| 7/14 | |
| 8/14 | |
| 9/14 | |
| 10/14 | |
| 11/14 | |
| 12/14 | |
| 13/14 | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH RFC 00/14] shrink skb cb to 44 bytes
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.