[stgt] [PATCH] new timer-based work scheduling

Alexander Nezhinsky alexandern at Voltaire.COM
Sun Jan 16 17:24:59 CET 2011

On 01/15/2011 01:14 PM, FUJITA Tomonori wrote:
>> Re-implementing the time-based work scheduler. This patch implements
>> a timer-based scheme.

> You need this patch for more precise timer, right? In another way, the
> problem that you try to fix is that the current timer is too
> unexpected.

Yes, the jiffies mechanism relied on the timeout values passed to 
epoll_wait(), but the events could pop up before the timed has expired.
So under load, the intervals between jiffies counts are practically zero.
On the other hand, event handlers can take indefinite times, but this
would be undetected by the jiffies count.

In the new scheme, the timer never "underflows" - at least the requested
interval is alwys guaranteed. Other event handlers can still delay 
the actual work scheduling, but after they return all overdue work units
are submitted for execution immediately.

The underlying timer fires every 250ms, setting the expected accuracy of
scheduling. I guess that all event handlers practically complete well
within this interval, so we can fairly count on delays bounded by, 
let's say, ~300ms.

To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

More information about the stgt mailing list