From a9799692a7332a902e973c83dbad32c7e2917f4d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 28 Aug 2014 01:03:36 -0700 Subject: [PATCH] Add network busy-polling slides --- index.html | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/index.html b/index.html index 30405ac..e899889 100644 --- a/index.html +++ b/index.html @@ -191,6 +191,68 @@ +
+

Network busy-polling [3.11] (1)

+

A conventional network request/response process looks like:

+ +
    +
  1. + Task calls send(); network stack constructs a + packet; driver adds it to hardware Tx queue +
  2. +
  3. + Task calls poll() or recv(), which blocks; + kernel puts it to sleep and possibly idles the CPU +
  4. +
  5. + Network adapter receives response and generates IRQ, waking + up CPU +
  6. +
  7. + Driver's IRQ handler schedules polling of the hardware Rx + queue (NAPI) +
  8. +
  9. + Kernel runs the driver's NAPI poll function, which passes + the response packet into the network stack +
  10. +
  11. + Network stack decodes packet headers and adds packet to + the task's socket +
  12. +
  13. + Network stack wakes up sleeping task; scheduler switches + to it and the socket call returns +
  14. +
+
+
+ +
+

Network busy-polling [3.11] (2)

+ +
+

Questions?

-- 2.39.5