mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Run-time configuration of VFS update interval. Old UPDATE_INTERVAL
configuration option is no longer supported.
This commit is contained in:
parent
ebe06549fd
commit
57034e7407
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1952
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
|
||||
* $Id: kern_sysctl.c,v 1.3 1994/08/02 07:42:19 davidg Exp $
|
||||
* $Id: kern_sysctl.c,v 1.4 1994/08/08 00:30:03 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -180,6 +180,8 @@ char domainname[MAXHOSTNAMELEN];
|
||||
int domainnamelen;
|
||||
long hostid;
|
||||
int securelevel;
|
||||
extern int vfs_update_wakeup;
|
||||
extern int vfs_update_interval;
|
||||
|
||||
/*
|
||||
* kernel related system variables.
|
||||
@ -216,6 +218,18 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
return (sysctl_int(oldp, oldlenp, newp, newlen, &maxproc));
|
||||
case KERN_MAXFILES:
|
||||
return (sysctl_int(oldp, oldlenp, newp, newlen, &maxfiles));
|
||||
case KERN_UPDATEINTERVAL:
|
||||
/*
|
||||
* NB: this simple-minded approach only works because
|
||||
* `tsleep' takes a timeout argument of 0 as meaning
|
||||
* `no timeout'.
|
||||
*/
|
||||
error = sysctl_int(oldp, oldlenp, newp, newlen,
|
||||
&vfs_update_interval);
|
||||
if(!error) {
|
||||
wakeup(&vfs_update_wakeup);
|
||||
}
|
||||
return error;
|
||||
case KERN_ARGMAX:
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, ARG_MAX));
|
||||
case KERN_SECURELVL:
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: vfs_bio.c,v 1.6 1994/08/06 09:15:28 davidg Exp $
|
||||
* $Id: vfs_bio.c,v 1.7 1994/08/07 14:53:20 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -646,11 +646,7 @@ count_lock_queue()
|
||||
return(count);
|
||||
}
|
||||
|
||||
#ifndef UPDATE_INTERVAL
|
||||
int vfs_update_interval = 30;
|
||||
#else
|
||||
int vfs_update_interval = UPDATE_INTERVAL;
|
||||
#endif
|
||||
|
||||
void
|
||||
vfs_update() {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sysctl.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id: sysctl.h,v 1.2 1994/08/02 07:53:41 davidg Exp $
|
||||
* $Id: sysctl.h,v 1.3 1994/08/08 00:30:12 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSCTL_H_
|
||||
@ -129,7 +129,8 @@ struct ctlname {
|
||||
#define KERN_SAVED_IDS 20 /* int: saved set-user/group-ID */
|
||||
#define KERN_BOOTTIME 21 /* struct: time kernel was booted */
|
||||
#define KERN_DOMAINNAME 22 /* string: YP domain name */
|
||||
#define KERN_MAXID 23 /* number of valid kern ids */
|
||||
#define KERN_UPDATEINTERVAL 23 /* int: update process sleep time */
|
||||
#define KERN_MAXID 24 /* number of valid kern ids */
|
||||
|
||||
#define CTL_KERN_NAMES { \
|
||||
{ 0, 0 }, \
|
||||
@ -155,6 +156,7 @@ struct ctlname {
|
||||
{ "saved_ids", CTLTYPE_INT }, \
|
||||
{ "boottime", CTLTYPE_STRUCT }, \
|
||||
{ "domainname", CTLTYPE_STRING }, \
|
||||
{ "update", CTLTYPE_INT }, \
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user