net_softirq 操作系统软中断内核进程关于NET_RX/NET_TX中断下半部的调度或执行延迟高的事件。 socketlatency Pod中的进程进行socket相关的读写操作的耗时久的事件。 kernellatency 内核在网络层处理报文耗时久的事件。 virtcmdlatency Virtio-net与宿主机通信耗时久的事件。 tcpreset 接收或发出TCP协议中带有RST标...
执行软中断回调函数 net_rx_action(), 调用 virtio_net.c 中 virtnet_poll() /\ || 检查poll队列上是否有设备在等待轮询 napi_schedule ->__napi_schedule -> list_add_tail(&napi->poll_list, &sd->poll_list); //把NAPI加入到本地cpu的 softnet_data 的 poll_list链表头 __raise_softirq_irqoff(...
int tx_clean_complete = 0, work_done = 0; tx_clean_complete = e1000_clean_tx_irq(adapter, &adapter->tx_ring[0]); adapter->clean_rx(adapter, &adapter->rx_ring[0], &work_done, budget); if (!tx_clean_complete || work_done == budget) return budget; /* Exit the polling mode,...
_internal | | └─enqueue_to_backlog | | └─___napi_schedule触发do_softIRQ | ├─vhost_add_used_and_signal_n | | ├─vhost_add_used | | └─vhost_signal通知guest接收完成 | └─vhost_log_write记录dirty page ├─handle_tx_kick | └─handle_tx └─handle_rx_kick └─handle_tx ...
2.2 SoftIRQ Handler 初始化 net_dev_init分别为接收和发送数据注册了一个软中断处理函数。 static int __init net_dev_init(void) { /* ... */ open_softirq(NET_TX_SOFTIRQ, net_tx_action); open_softirq(NET_RX_SOFTIRQ, net_rx_action); ...
然后设置NET_RX_SOFTIRQ标志位来触发软中断。 _napi_schedule(&rq-napi); static int virtnet_poll(struct napi_struct *napi, int budget) . again: while (received vq, &len) != NULL) num; received+; if (rq-num max / 2) -如果收包队列中可用的desc小于总大小的一半时,回收 if (!try_fill_...
软中断并不会直接中断CPU,也只有当前正在运行的代码(或进程)才会产生软中断。这种中断是一种需要内核为正在运行的进程去做一些事情(通常为I/O)的请求。 除了iowait(等待I/O的CPU使用率)升高,软中断(softirq)CPU使用率升高也是最常见的一种性能问题。
net_softirq カーネル処理ソフトウェアの割り込みにより、NET_RXまたはNET_TXによるパケットスケジューリングが中断されたり、パケット処理が大幅に遅延したりします。 socketlatency ポッド内のプロセスは、ソケット関連の読み取りおよび書き込み操作を完了す...
-> icmp_rcv+0x1 -> ip_local_deliver_finish+0x7f -> ip_local_deliver+0xea -> ip_rcv+0x16d -> __netif_receive_skb_one_core+0x89 -> process_backlog+0xa9 -> __napi_poll+0x2e -> net_rx_action+0x28f -> __do_softirq+0xfb -> do_softirq+0xa7 -> __local_bh_enable_ip+0x...
* This function may only be called from softirq context and interrupts * should be enabled. * * Return values (usually ignored): * NET_RX_SUCCESS: no congestion * NET_RX_DROP: packet was dropped */ //netif_receive_skb 是对于 netif_rx 的 NAPI 对等函数; 它递交一个报文给内核. 当一个...