polling decreases throughput ~50%
dmitry.mityugov at gmail.com
Sun Aug 21 16:41:17 GMT 2005
On 8/21/05, Garrett Cooper <youshi10 at u.washington.edu> wrote:
> Heh. We just discussed polling vs interrupts in an embedded systems
> class this past quarter. Interrupts are better for more intermittent use
> and polling is better for more frequent use, as polling is actually a
> deadloop of course-for checking a flag most of the time-with potentially
> a lot of wasted clock cycles before a context switch is made and the
> task that was being polled for is run. Also, considering that actual
> computer hardware isn't going to be running 100% of the time (except for
> the CPU running idle tasks and stuff), interrupts are by far the better
> way to go in general. But yeah... too many interrupts are bad as well...
> Anyhow, that was sidetracking a bit :).
Probably a good solution to this problem is to switch to the polling
mode when you get an interrupt (or a few interrupts in a row), and
switch back to the interrupt mode when the line has been idle for a
Dmitry Mityugov, St. Petersburg, Russia
I ignore all messages with confidentiality statements
"We live less by imagination than despite it" - Rockwell Kent, "N by E"
More information about the freebsd-questions