Searched hist:fb59bf28cd638a0b8671bf90b6692fea4898d207 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/usb/ |
H A D | usbnet.c | diff fb59bf28cd638a0b8671bf90b6692fea4898d207 Fri Jan 06 04:49:49 CST 2023 Leesoo Ahn <lsahn@ooseel.net> usbnet: optimize usbnet_bh() to reduce CPU load
The current source pushes skb into dev-done queue by calling skb_dequeue_tail() and then pop it by skb_dequeue() to branch to rx_cleanup state for freeing urb/skb in usbnet_bh(). It takes extra CPU load, 2.21% (skb_queue_tail) as follows,
- 11.58% 0.26% swapper [k] usbnet_bh - 11.32% usbnet_bh - 6.43% skb_dequeue 6.34% _raw_spin_unlock_irqrestore - 2.21% skb_queue_tail 2.19% _raw_spin_unlock_irqrestore - 1.68% consume_skb - 0.97% kfree_skbmem 0.80% kmem_cache_free 0.53% skb_release_data
To reduce the extra CPU load use return values to call helper function usb_free_skb() to free the resources instead of calling skb_queue_tail() and skb_dequeue() for push and pop respectively.
- 7.87% 0.25% swapper [k] usbnet_bh - 7.62% usbnet_bh - 4.81% skb_dequeue 4.74% _raw_spin_unlock_irqrestore - 1.75% consume_skb - 0.98% kfree_skbmem 0.78% kmem_cache_free 0.58% skb_release_data 0.53% smsc95xx_rx_fixup
Signed-off-by: Leesoo Ahn <lsahn@ooseel.net> Signed-off-by: David S. Miller <davem@davemloft.net>
|