From fanf@dotat.at  Mon Oct  9 05:12:24 2000
Return-Path: <fanf@dotat.at>
Received: from hand.dotat.at (hand.dotat.at [212.240.134.135])
	by hub.freebsd.org (Postfix) with ESMTP id 3B06937B66C
	for <FreeBSD-gnats-submit@freebsd.org>; 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: <E13ibmh-000GBv-00@hand.dotat.at>
Date: Mon, 09 Oct 2000 12:11:59 +0000
From: Tony Finch <dot@dotat.at>
Sender: fanf@dotat.at
Reply-To: Tony Finch <dot@dotat.at>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] allow syncer to be slowed dow
X-Send-Pr-Version: 3.2

>Number:         21859
>Category:       kern
>Synopsis:       [vfs] [patch] Allow the syncer to be slowed down
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    fanf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 09 05:20:01 PDT 2000
>Closed-Date:    Mon Oct 24 01:53:35 GMT 2005
>Last-Modified:  Mon Oct 24 01:53:35 GMT 2005
>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:
Responsible-Changed-From-To: freebsd-bugs->fanf 
Responsible-Changed-By: jmg 
Responsible-Changed-When: Sat Jun 21 00:05:02 PDT 2003 
Responsible-Changed-Why:  
Tony should take his own PR's. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21859 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Oct 24 01:52:28 GMT 2005 
State-Changed-Why:  
Mark as 'suspended' since this does not seem as though it is being 
actively worked on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21859 
>Unformatted:
