Date: Mon, 14 Feb 2011 08:09:02 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/geom/sched gs_rr.c Message-ID: <201102140809.p1E89Btf091174@repoman.freebsd.org>
index | next in thread | raw e-mail
luigi 2011-02-14 08:09:02 UTC
FreeBSD src repository
Modified files:
sys/geom/sched gs_rr.c
Log:
SVN rev 218675 on 2011-02-14 08:09:02Z by luigi
Correct a subtle bug in the 'gsched_rr' disk scheduler.
The algorithm is supposed to work as follows:
in order to prevent starvation, when a new client starts being served we
record the start time and reset the counter of bytes served.
We then switch to a new client after a certain amount of time or bytes,
even if the current one still has pending requests.
To avoid charging a new client the time of the first seek,
we start counting time when the first request is served.
Unfortunately a bug in the previous version of the code failed
to set the start time in certain cases, resulting in some processes
exceeding their timeslice.
The fix (in this patch) is trivial, though it took a while to find
out and replicate the bug.
Thanks to Tommaso Caprai for investigating and fixing the problem.
Submitted by: Tommaso Caprai
MFC after: 1 week
Revision Changes Path
1.4 +20 -8 src/sys/geom/sched/gs_rr.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102140809.p1E89Btf091174>
