Poll Or Be Interrupted
You are writing the completion path for a storage driver. Measurements:
- a 4 KB read usually completes in about 12 microseconds
- roughly one read in 2,000 stalls for 2 milliseconds while the device does internal housekeeping
- taking an interrupt, running the handler, and switching back to the blocked thread costs about 4 microseconds of CPU
- the application runs one request at a time and has nothing else to do while it waits
Which completion strategy is the right default?
Sign in to answer questions and track your progress
Sign In