diff options
author | Leesoo Ahn <lsahn@ooseel.net> | 2023-01-06 19:49:49 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-09 07:23:54 +0000 |
commit | fb59bf28cd638a0b8671bf90b6692fea4898d207 (patch) | |
tree | 3ba09d4ed9ffa305b95184d75b6e02b9259bd0e8 /drivers/scsi/cxgbi/cxgb4i | |
parent | 9cb8bae3d17b517abba74c13dd0327653b9142a4 (diff) |
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>
Diffstat (limited to 'drivers/scsi/cxgbi/cxgb4i')
0 files changed, 0 insertions, 0 deletions