From owner-cvs-all Sat Dec 7 13:45: 5 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70CD737B401; Sat, 7 Dec 2002 13:45:04 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BF5C43EC2; Sat, 7 Dec 2002 13:45:04 -0800 (PST) (envelope-from iedowse@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gB7LeVmV048442; Sat, 7 Dec 2002 13:40:31 -0800 (PST) (envelope-from iedowse@repoman.freebsd.org) Received: (from iedowse@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB7LeV80048441; Sat, 7 Dec 2002 13:40:31 -0800 (PST) Message-Id: <200212072140.gB7LeV80048441@repoman.freebsd.org> From: Ian Dowse Date: Sat, 7 Dec 2002 13:40:31 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/fsck_ffs fsutil.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2002/12/07 13:40:31 PST Modified files: sbin/fsck_ffs fsutil.c Log: Slow down the operation of background fsck so as to leave some disk bandwidth for other processes. Since the sleeping is done from userland, this avoids the locking issues that affected the kernel version. The algorithm used here is to measure a moving average of the times taken by a sample of read operations and then delay 1 in 8 reads by 16 times the measured average. This should correspond to a factor of 3 slowdown, but in practice the factor is larger (3.5 to 4) due to hz rounding effects. Reviewed by: mckusick Approved by: re Revision Changes Path 1.20 +46 -1 src/sbin/fsck_ffs/fsutil.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message