From owner-freebsd-bugs Mon Oct 9 5:20: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4709B37B66D for ; Mon, 9 Oct 2000 05:20:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA33790; Mon, 9 Oct 2000 05:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from hand.dotat.at (hand.dotat.at [212.240.134.135]) by hub.freebsd.org (Postfix) with ESMTP id 3B06937B66C for ; Mon, 9 Oct 2000 05:12:23 -0700 (PDT) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 13ibmh-000GBv-00 for FreeBSD-gnats-submit@freebsd.org; Mon, 09 Oct 2000 12:11:59 +0000 Message-Id: Date: Mon, 09 Oct 2000 12:11:59 +0000 From: Tony Finch Reply-To: Tony Finch To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/21859: [PATCH] allow syncer to be slowed dow Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21859 >Category: kern >Synopsis: Allow the syncer to be slowed down >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 09 05:20:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Tony Finch >Release: FreeBSD 4.1.1-STABLE-20000928 i386 >Organization: dotat >Environment: FreeBSD hand.dotat.at 4.1.1-STABLE-20000928 FreeBSD 4.1.1-STABLE-20000928 #0: Thu Sep 28 12:31:27 UTC 2000 fanf@hand.dotat.at:/FreeBSD/obj/FreeBSD/releng4/sys/DELL-Latitude-CPx i386 >Description: Many laptops have an option for HDD power-down after an interval, however this doesn't work too well with the syncer which usually touches the disks every 30 seconds even on a quiescent system. This patch allows you to change the syncer delay with a sysctl, and it adds a compile-time kernel option so that you can increse the delay beyond the 30 second default. >How-To-Repeat: >Fix: Index: conf/options =================================================================== RCS file: /home/ncvs/src/sys/conf/options,v retrieving revision 1.191.2.16 diff -u -r1.191.2.16 options --- conf/options 2000/09/30 02:49:29 1.191.2.16 +++ conf/options 2000/10/08 04:18:27 @@ -89,6 +89,7 @@ UCONSOLE ICMP_BANDLIM VFS_AIO +SYNCER_MAXDELAY opt_syncdelay.h # POSIX kernel options P1003_1B opt_posix.h Index: kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.249.2.5 diff -u -r1.249.2.5 vfs_subr.c --- kern/vfs_subr.c 2000/08/03 00:09:33 1.249.2.5 +++ kern/vfs_subr.c 2000/08/08 07:22:04 @@ -43,6 +43,7 @@ * External virtual filesystem routines */ #include "opt_ddb.h" +#include "opt_syncdelay.h" #include #include @@ -133,9 +134,12 @@ /* * The workitem queue. */ +#ifndef SYNCER_MAXDELAY #define SYNCER_MAXDELAY 32 +#endif static int syncer_maxdelay = SYNCER_MAXDELAY; /* maximum delay time */ time_t syncdelay = 30; /* max time to delay syncing data */ +SYSCTL_INT(_kern, OID_AUTO, syncdelay, CTLFLAG_RW, &syncdelay, 0, ""); time_t filedelay = 30; /* time to delay syncing files */ SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, ""); time_t dirdelay = 29; /* time to delay syncing directories */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message