android_kernel_xiaomi_sm8350/net
Denis Vlasenko 56079431b6 [NET]: Deinline some larger functions from netdevice.h
On a allyesconfig'ured kernel:

Size  Uses Wasted Name and definition
===== ==== ====== ================================================
   95  162  12075 netif_wake_queue      include/linux/netdevice.h
  129   86   9265 dev_kfree_skb_any     include/linux/netdevice.h
  127   56   5885 netif_device_attach   include/linux/netdevice.h
   73   86   4505 dev_kfree_skb_irq     include/linux/netdevice.h
   46   60   1534 netif_device_detach   include/linux/netdevice.h
  119   16   1485 __netif_rx_schedule   include/linux/netdevice.h
  143    5    492 netif_rx_schedule     include/linux/netdevice.h
   81    7    366 netif_schedule        include/linux/netdevice.h

netif_wake_queue is big because __netif_schedule is a big inline:

static inline void __netif_schedule(struct net_device *dev)
{
        if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {
                unsigned long flags;
                struct softnet_data *sd;

                local_irq_save(flags);
                sd = &__get_cpu_var(softnet_data);
                dev->next_sched = sd->output_queue;
                sd->output_queue = dev;
                raise_softirq_irqoff(NET_TX_SOFTIRQ);
                local_irq_restore(flags);
        }
}

static inline void netif_wake_queue(struct net_device *dev)
{
#ifdef CONFIG_NETPOLL_TRAP
        if (netpoll_trap())
                return;
#endif
        if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
                __netif_schedule(dev);
}

By de-inlining __netif_schedule we are saving a lot of text
at each callsite of netif_wake_queue and netif_schedule.
__netif_rx_schedule is also big, and it makes more sense to keep
both of them out of line.

Patch also deinlines dev_kfree_skb_any. We can deinline dev_kfree_skb_irq
instead... oh well.

netif_device_attach/detach are not hot paths, we can deinline them too.

Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-29 15:57:29 -08:00
..
802 [SNAP]: Remove leftover unused hdr variable 2006-03-20 22:45:37 -08:00
8021q [NET]: Replace skb_pull/skb_postpull_rcsum with skb_pull_rcsum 2006-03-20 22:43:56 -08:00
appletalk [NET]: Fix ipx/econet/appletalk/irda ioctl crashes 2006-03-28 17:02:43 -08:00
atm [NET]: sem2mutex part 2 2006-03-20 22:35:41 -08:00
ax25 [AX.25]: Fix potencial memory hole. 2006-03-19 13:20:06 -08:00
bluetooth [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
bridge [NETFILTER]: Rename init functions. 2006-03-28 17:02:48 -08:00
core [NET]: Deinline some larger functions from netdevice.h 2006-03-29 15:57:29 -08:00
dccp [DCCP]: Use NULL for pointers, comfort sparse. 2006-03-29 13:58:25 -08:00
decnet [DECNET]: Fix refcount 2006-03-29 13:57:31 -08:00
econet [ECONET]: Convert away from SOCKOPS_WRAPPED 2006-03-28 17:02:43 -08:00
ethernet [NET] ethernet: Fix first packet goes out with MAC 00:00:00:00:00:00 2006-02-23 16:18:01 -08:00
ieee80211 [PATCH] Restore channel setting after scan. 2006-03-23 16:18:47 -05:00
ipv4 [NETFILTER]: Rename init functions. 2006-03-28 17:02:48 -08:00
ipv6 [NETFILTER]: Rename init functions. 2006-03-28 17:02:48 -08:00
ipx [NET]: Fix ipx/econet/appletalk/irda ioctl crashes 2006-03-28 17:02:43 -08:00
irda [NET]: Fix ipx/econet/appletalk/irda ioctl crashes 2006-03-28 17:02:43 -08:00
key [NET] sem2mutex: net/ 2006-03-20 22:33:17 -08:00
lapb [NET]: Kill skb->list 2005-08-29 15:31:14 -07:00
llc [LLC]: llc_mac_hdr_init const arguments 2006-03-20 22:59:36 -08:00
netfilter [NETFILTER]: Rename init functions. 2006-03-28 17:02:48 -08:00
netlink [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
netrom [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
packet [NET]: Fix some whitespace issues in af_packet.c 2006-01-23 16:28:02 -08:00
rose [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
rxrpc [PATCH] fix 'defined but not used' warning in net/rxrpc/main.c::rxrpc_initialise 2006-03-25 08:22:52 -08:00
sched [NET_SCHED]: cls_u32: remove unnecessary NULL-ptr check 2006-03-23 01:16:48 -08:00
sctp Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-03-25 08:39:20 -08:00
sunrpc [PATCH] mark f_ops const in the inode 2006-03-28 09:16:05 -08:00
tipc [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
unix [PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications 2006-03-25 08:22:56 -08:00
wanrouter [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
x25 [X25]: dte facilities 32 64 ioctl conversion 2006-03-22 00:02:00 -08:00
xfrm [XFRM]: Fix aevent related crash 2006-03-20 22:40:54 -08:00
compat.c [NET]: socket timestamp 32 bit handler for 64 bit kernel 2006-03-21 23:59:39 -08:00
Kconfig Merge branch 'master' 2006-02-07 01:47:12 -05:00
Makefile [TIPC] Initial merge 2006-01-12 14:06:31 -08:00
nonet.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
socket.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
sysctl_net.c [NET]: Fix "sysctl_net.c:36: error: 'core_table' undeclared here" 2005-10-03 14:16:34 -07:00
TUNABLE