From owner-freebsd-hackers Sun Oct 20 13:18: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 1410637B401 for ; Sun, 20 Oct 2002 13:18:49 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3245343E6E for ; Sun, 20 Oct 2002 13:18:48 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g9KKIB01063279; Sun, 20 Oct 2002 22:18:30 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Peter Wemm Cc: David Schultz , Dan Nelson , Terry Lambert , Brooks Davis , hackers@FreeBSD.ORG Subject: Re: adding a delay before background fsck In-Reply-To: Your message of "Sun, 20 Oct 2002 13:10:53 PDT." <20021020201053.1C3092A88D@canning.wemm.org> Date: Sun, 20 Oct 2002 22:18:11 +0200 Message-ID: <63278.1035145091@critter.freebsd.dk> From: Poul-Henning Kamp 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 In message <20021020201053.1C3092A88D@canning.wemm.org>, Peter Wemm writes: >David Schultz wrote: >> >> `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. And just to round this off: Kirk has a patch in the pipeline which implementes the slowdown in specfs::VOP_STRATEGY() where we still operate on a struct buf, I expect him to commit it RSN. In the longer term, I intend to tag struct bio with a priority which disksort routines can apply as they see fit futher down, but this is still only on the white-board as a "Cool ideas" thing and I'm not going to spend any time on it before I have that time. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message