On Wed, 28 Nov 2012 08:30:49 EST erik quanstrom <[email protected]> wrote: > On Wed Nov 28 08:11:43 EST 2012, [email protected] wrote: > > No, really, I'm quite serious. A grep of /sys/src/cmd/ suggests that > > most sleeps are relatively large, and arbitrary.
Chicken and egg. > > None of the applications look likely to need microsecond let alone > > nanosecond resolution, and that seems reasonable to me. > > One exception is sleep(0), but that's yield() > > you haven't explained how one can emulate a sub-ms > sleep with the edf scheduler. i've got a legit problem. Why not add nsleep() with sleeptime in nanosecond units? And of course, any necessary kernel changes for better accuracy. The whole idea of a kernel HZ clock seems a bit outdated now. If the system has nothing do for the next N seconds, it should may be go into low-power mode & just wait for an interrupt.
