From owner-freebsd-hackers Wed Jan 8 20:35:57 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id UAA28263 for hackers-outgoing; Wed, 8 Jan 1997 20:35:57 -0800 (PST) Received: from crh.cl.msu.edu (crh.cl.msu.edu [35.8.1.24]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id UAA28257 for ; Wed, 8 Jan 1997 20:35:55 -0800 (PST) Received: (from henrich@localhost) by crh.cl.msu.edu (8.8.4/8.8.4) id XAA06374 for freebsd-hackers@freebsd.org; Wed, 8 Jan 1997 23:35:51 -0500 (EST) From: Charles Henrich Message-Id: <199701090435.XAA06374@crh.cl.msu.edu> Subject: is time() valid in kernel? To: freebsd-hackers@freebsd.org Date: Wed, 8 Jan 1997 23:35:51 -0500 (EST) X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I want to have the kernel time how long sync() takes in the vfs_update() routine, is it legit to throw in a standard call to gettimeofday() or is there a cooler (e.g. macro) that will give me the time so I can find out how long this sucker is taking? Why: I want to experiment changing how frequently update() runs on a busy newserver, and see what the time differences are. I have a gut-feeling that changing it from 30 seconds to 300 or more seconds wont significantly increase the sync() time, but as I'm now doing it 1/10th as often I get a large performance win.. [This system is attached to a UPS that notifies FreeBSD when the power drops which starts doing sync's and after a few minutes shuts down] -Crh Charles Henrich Michigan State University henrich@msu.edu http://pilot.msu.edu/~henrich