2006-03-30 07:27:00

by Denis Vlasenko

[permalink] [raw]
Subject: [PATCH] deinline 200+ byte inlines in sock.h

We have 200+ byte inlines in sock.h. That's way too large
in my opinion.

Sizes in bytes (i386) and files where those inlines are used:

238 sock_queue_rcv_skb 2.6.16/net/x25/x25_in.o
238 sock_queue_rcv_skb 2.6.16/net/rose/rose_in.o
238 sock_queue_rcv_skb 2.6.16/net/packet/af_packet.o
238 sock_queue_rcv_skb 2.6.16/net/netrom/nr_in.o
238 sock_queue_rcv_skb 2.6.16/net/llc/llc_sap.o
238 sock_queue_rcv_skb 2.6.16/net/llc/llc_conn.o
238 sock_queue_rcv_skb 2.6.16/net/irda/af_irda.o
238 sock_queue_rcv_skb 2.6.16/net/ipx/af_ipx.o
238 sock_queue_rcv_skb 2.6.16/net/ipv6/udp.o
238 sock_queue_rcv_skb 2.6.16/net/ipv6/raw.o
238 sock_queue_rcv_skb 2.6.16/net/ipv4/udp.o
238 sock_queue_rcv_skb 2.6.16/net/ipv4/raw.o
238 sock_queue_rcv_skb 2.6.16/net/ipv4/ipmr.o
238 sock_queue_rcv_skb 2.6.16/net/econet/econet.o
238 sock_queue_rcv_skb 2.6.16/net/econet/af_econet.o
238 sock_queue_rcv_skb 2.6.16/net/bluetooth/sco.o
238 sock_queue_rcv_skb 2.6.16/net/bluetooth/l2cap.o
238 sock_queue_rcv_skb 2.6.16/net/bluetooth/hci_sock.o
238 sock_queue_rcv_skb 2.6.16/net/ax25/ax25_in.o
238 sock_queue_rcv_skb 2.6.16/net/ax25/af_ax25.o
238 sock_queue_rcv_skb 2.6.16/net/appletalk/ddp.o
238 sock_queue_rcv_skb 2.6.16/drivers/net/pppoe.o

276 sk_receive_skb 2.6.16/net/decnet/dn_nsp_in.o
276 sk_receive_skb 2.6.16/net/dccp/ipv6.o
276 sk_receive_skb 2.6.16/net/dccp/ipv4.o
276 sk_receive_skb 2.6.16/net/dccp/dccp_ipv6.o
276 sk_receive_skb 2.6.16/drivers/net/pppoe.o

209 sk_dst_check 2.6.16/net/ipv6/ip6_output.o
209 sk_dst_check 2.6.16/net/ipv4/udp.o
209 sk_dst_check 2.6.16/net/decnet/dn_nsp_out.o

Should I also attack sock_recv_timestamp() etc?

Large inlines with multiple callers:
Size ?Uses Wasted Name and definition
===== ==== ====== ================================================
? 238 ? 21 ? 4360 sock_queue_rcv_skb ? ?include/net/sock.h
? 109 ? 10 ? ?801 sock_recv_timestamp ? include/net/sock.h
? 276 ? ?4 ? ?768 sk_receive_skb ? ? ? ?include/net/sock.h
? ?94 ? ?8 ? ?518 __sk_dst_check ? ? ? ?include/net/sock.h
? 209 ? ?3 ? ?378 sk_dst_check ?include/net/sock.h
? 131 ? ?4 ? ?333 sk_setup_caps include/net/sock.h
? 152 ? ?2 ? ?132 sk_stream_alloc_pskb ?include/net/sock.h
? 125 ? ?2 ? ?105 sk_stream_writequeue_purge ? ?include/net/sock.h

Signed-off-by: Denis Vlasenko <[email protected]>
--
vda


Attachments:
(No filename) (2.23 kB)
sock.patch (5.35 kB)
Download all attachments

2006-03-30 08:07:39

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] deinline 200+ byte inlines in sock.h

From: Denis Vlasenko <[email protected]>
Date: Thu, 30 Mar 2006 10:26:24 +0300

> We have 200+ byte inlines in sock.h. That's way too large
> in my opinion.

In Linus's tree already.

Would you please check the relevant trees before re-posting patches?
Thanks a lot.