From owner-freebsd-mobile Thu Jul 27 12: 4:34 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id 1915037BA08; Thu, 27 Jul 2000 12:04:28 -0700 (PDT) (envelope-from fanf@hand.dotat.at) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 13Hswx-0000EA-00; Thu, 27 Jul 2000 19:04:07 +0000 Date: Thu, 27 Jul 2000 19:04:06 +0000 From: Tony Finch To: Mike Smith Cc: mobile@freebsd.org Subject: Re: hdd sppin-down and syncer Message-ID: <20000727190406.A426@hand.dotat.at> References: <200007270806.BAA42887@mass.osd.bsdi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200007270806.BAA42887@mass.osd.bsdi.com> Organization: Covalent Technologies, Inc Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Mike Smith wrote: >> >> My Dell Latitude-CPx spins down its hdd after 10 or 15 seconds, but a >> few seconds later the syncer kicks in and it spins back up again. I >> know it might be unwise to do this but I'd like to make the syncer >> run less frequently. AFAICT one would just need to frob >> SYNCER_MAXDELAY in vfs_subr.c to acheive this, but it will go up by >> powers of two. The change below would be useful to make it easier to >> change it in a kernel configuration file. > >You should use a tunable for this... Do you mean a sysctl or something else? I realised soon after I sent the patch that I forgot to include SYSCTL_INT(_kern, OID_AUTO, syncdelay, CTLFLAG_RW, &syncdelay, 0, ""); which makes things fully tunable up to the SYSCTL_MAXDELAY setting. I'm running with it set to 256 and the sysctls are kern.syncdelay: 240 kern.filedelay: 210 kern.dirdelay: 180 kern.metadelay: 150 which seems to do what I want. I left SYNCER_MAXDELAY as a compile-time option because the syncer's work table has a fixed size and I was disinclined to make it dynamic when I ought to be going to bed. But you think that that is a reasonable thing to do and (other than keeping stuff in RAM longer than before) this won't cause trouble? Tony. -- f.a.n.finch fanf@covalent.net dot@dotat.at 427 sun-bleached stripes on the big top of banality To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message