From owner-cvs-src-old@FreeBSD.ORG Mon Feb 14 08:09:11 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A82B10656C3 for ; Mon, 14 Feb 2011 08:09:11 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 26A238FC13 for ; Mon, 14 Feb 2011 08:09:11 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p1E89BbT091175 for ; Mon, 14 Feb 2011 08:09:11 GMT (envelope-from luigi@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p1E89Btf091174 for cvs-src-old@freebsd.org; Mon, 14 Feb 2011 08:09:11 GMT (envelope-from luigi@repoman.freebsd.org) Message-Id: <201102140809.p1E89Btf091174@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to luigi@repoman.freebsd.org using -f From: Luigi Rizzo Date: Mon, 14 Feb 2011 08:09:02 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/geom/sched gs_rr.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 08:09:11 -0000 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