Date: Sun, 20 Oct 2002 13:10:53 -0700 From: Peter Wemm <peter@wemm.org> To: David Schultz <dschultz@uclink.Berkeley.EDU> Cc: Dan Nelson <dnelson@allantgroup.com>, Terry Lambert <tlambert2@mindspring.com>, Brooks Davis <brooks@one-eyed-alien.net>, hackers@FreeBSD.ORG Subject: Re: adding a delay before background fsck Message-ID: <20021020201053.1C3092A88D@canning.wemm.org> In-Reply-To: <20021020071930.GA24660@HAL9000.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
David Schultz wrote: > Thus spake Dan Nelson <dnelson@allantgroup.com>: > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021020201053.1C3092A88D>