From owner-freebsd-hackers Sun Oct 20 13:10:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78C9737B401 for ; Sun, 20 Oct 2002 13:10:53 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34E0743E77 for ; Sun, 20 Oct 2002 13:10:53 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 1C3092A88D; Sun, 20 Oct 2002 13:10:53 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: David Schultz Cc: Dan Nelson , Terry Lambert , Brooks Davis , hackers@FreeBSD.ORG Subject: Re: adding a delay before background fsck In-Reply-To: <20021020071930.GA24660@HAL9000.homeunix.com> Date: Sun, 20 Oct 2002 13:10:53 -0700 From: Peter Wemm Message-Id: <20021020201053.1C3092A88D@canning.wemm.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Schultz wrote: > Thus spake Dan Nelson : > > In the last episode (Oct 19), Terry Lambert said: > > > Brooks Davis wrote: > > > > Please comment on the following patch to add a delay before > > > > starting background fsck. The issues this addresses is that it > > > > takes a long time to start X or other large apps like mozilla while > > > > a background fsck is running (at least on my laptop). Once they > > > > are up and in cache, performance is slightly bumpy, but acceptable. > > > > Thus, being able to set a delay (I use 120s) to allow those > > > > applications to be started, makes background fsck much more useful. > > > > I suspect this feature would also be useful in aiding recover on > > > > servers. > > > > > > Shouldn't running it at idleprio "just work"? > > > > Unfortunately, priorities do not apply to I/O. > > `Nice' values *do* apply to I/O in -CURRENT. Specifically, if a > process with a positive nice value attempts to do disk I/O while > there are other outstanding requests, it is put to sleep for > p_nice/HZ seconds. I think this feature was added specifically > for background fsck. If performance is a problem, perhaps it is > the nice value that needs to be tuned. See Kirk's BSDCon paper on > snapshots for details. Just because something is in a paper that does not mean it is true. It is not the case in -current. Read subr_disk.c, and the #ifdef notquite around the code. It doesn't work because it assumes that every 'struct bio' is really embedded in a 'struct buf', which isn't the case. It used the vnode that was attached to each 'struct buf' to determine the insert point. 'struct bio' doesn't have associated vnodes. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message