From owner-freebsd-hackers Wed Nov 4 10:54:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA11228 for freebsd-hackers-outgoing; Wed, 4 Nov 1998 10:54:45 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA11211 for ; Wed, 4 Nov 1998 10:54:42 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id LAA14777; Wed, 4 Nov 1998 11:54:33 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp01.primenet.com, id smtpd014749; Wed Nov 4 11:54:32 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA10702; Wed, 4 Nov 1998 11:54:28 -0700 (MST) From: Terry Lambert Message-Id: <199811041854.LAA10702@usr07.primenet.com> Subject: Re: How sync() gets called every 30 seconds? To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Wed, 4 Nov 1998 18:54:28 +0000 (GMT) Cc: seggers@semyam.dinoco.de, bf20761@binghamton.edu, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199811041554.QAA19119@labinfo.iet.unipi.it> from "Luigi Rizzo" at Nov 4, 98 04:54:54 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > Hi, Can anyone tell me where in the source code the sync() (in > > > vfs_syscalls.c) is set up to be called every 30 seconds? > > > > In vfs_subr.c with a SYSINIT_KT() and an associated struct. This > > creates a process which consists of sched_sync. > > speaking of this... is this parametrized ? It's parameterized. > On a laptop, i wonder if > syncing every 30s while doing ordinary activities (e.g. editing) defeats > completely the disk auto-shutdown routines. Because power failures are > less frequent (i hope!) in that environment, is there any other reason > to have frequent SYNCs ? There's no reason for sync's at all, if your word processor's pages are all paged in, and you don't have "autosave" turned on. If you have "autosave" on, it's going to happen whether you want it to or not. d in, and you don't have "autosave" turned on. If you have "autosave" on, it's going to happen whether you want it to or not. There may be a case of the access time being updated for executable files being paged from... I seem to remember looking into this very issue a while back and seeing something along those lines. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message