From owner-freebsd-hackers Sun Oct 20 16:47:50 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 D10D537B401 for ; Sun, 20 Oct 2002 16:47:49 -0700 (PDT) Received: from HAL9000.homeunix.com (12-232-220-15.client.attbi.com [12.232.220.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2327643E6A for ; Sun, 20 Oct 2002 16:47:49 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id g9KNlYYX000422; Sun, 20 Oct 2002 16:47:34 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id g9KNlYgd000421; Sun, 20 Oct 2002 16:47:34 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Sun, 20 Oct 2002 16:47:34 -0700 From: David Schultz To: Peter Wemm Cc: Dan Nelson , Terry Lambert , Brooks Davis , hackers@FreeBSD.ORG Subject: Re: adding a delay before background fsck Message-ID: <20021020234734.GA390@HAL9000.homeunix.com> Mail-Followup-To: Peter Wemm , Dan Nelson , Terry Lambert , Brooks Davis , hackers@FreeBSD.ORG References: <20021020071930.GA24660@HAL9000.homeunix.com> <20021020201053.1C3092A88D@canning.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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 Thus spake Peter Wemm : > > `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. Actually I *did* glance at the code before posting, but I missed the ifdef surrounding the relevant chunk. Oops. Thanks for clarifying! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message