Try   HackMD

計算機網路 - The Interrupt Valley

參考影片

這邊的參考影片以介紹「NIC 觸發中斷之後發生了什麼事」。關於 Linux IRQ 的一般性介紹則可以參考這裡的資料。除此之外也有一個用 Arduino 跟 Raspberry Pi 做 Linux IRQ 的實驗

Network Performance in the Linux Kernel, Getting the most out of the Hardware

這個影片比較偏向討論 NIC 與 kernel 該如何「有效率地產生/處理中斷」。而影片的前半部很清楚地介紹了封包從中斷到 NAPI 到後續處理的流程。

理由是「處理器被 NIC 觸發中斷之後,在中斷上、下半部處理封包」時,有下面兩個可能改進的點:

  1. 特定處理器為了處理接連到來的封包,長期處在 interrupt context 中:封包處理的過程中,上半部在 hard IRQ,下半部在 soft IRQ,兩者都是 interrupt context。所以處理器就會長期處於 interupt context 無法脫身。
  2. Locality:比如需要這個封包的行程執行在 CPU0,但接收封包的是 CPU3。

而其中一個的作法是「將封包分類,並且將他們交由不同的處理器處理」。而這件事除了藉由 kernel 自身的軟體實作之外,也可能交由 NIC 的硬體處理,這就是下面這個影片要介紹的內容。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Offloading Network Traffic Classification to Hardware - Maxime Chevallier, Bootlin

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →