Date: Mon, 09 Oct 2000 12:11:59 +0000 From: Tony Finch <dot@dotat.at> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/21859: [PATCH] allow syncer to be slowed dow Message-ID: <E13ibmh-000GBv-00@hand.dotat.at>
next in thread | raw e-mail | index | archive | help
>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 <dot@dotat.at> >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 <sys/param.h> #include <sys/systm.h> @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E13ibmh-000GBv-00>