Events that wake processes poke the ksched
authorBarret Rhoden <brho@cs.berkeley.edu>
Sun, 11 Mar 2012 17:47:57 +0000 (10:47 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sun, 11 Mar 2012 17:47:57 +0000 (10:47 -0700)
commit55ef69c959a79d3fee4f2f5bc313e1fe92f129eb
treeb31a7d556b3abf1db84efe6b0c1f0d3f045a87af
parentfedf1fd6c386d438832ea4efe2d78d33b24636ad
Events that wake processes poke the ksched

Previously, the processes would wake up, but wouldn't tell the ksched.
The ksched would have to notice on its next tick, which could be 10ms
away (current ksched), or never (tickless kscheds).  For block_test,
which sleeps 5ms per loop, without this patch, you'd wait close to 5ms
til the next timer tick.  This patch cuts down block test to about
5.5sec (poke to run when avail), instead of 10sec (run on timer tick).

Unblocking is a big enough deal that it got its own callback, but we're
not using it for anything other than a RES_CORES poke right now.
kern/include/schedule.h
kern/src/event.c
kern/src/process.c
kern/src/schedule.c
tests/block_test.c