Subject: fix for heavy ioflush usage on SE/30
To: None <port-mac68k@NetBSD.ORG>
From: David Schmenk <dschmenk@sbcglobal.net>
List: port-mac68k
Date: 01/19/2005 22:06:05
I've just installed NetBSD 2.0 on one of my SE/30's (the other running 
A/UX for comparison) and noticed that ioflush was using 20-25% of my 
very slow and precious CPU cycles while building source packages.  By 
making a small change to the kernel sync thread I now only see about 
0-3% during builds.

In sys/miscfs/syncfs/sync_subr.c simply change the line at the bottom 
of sched_sync():

tsleep(&rushjob, PPAUSE, "syncer", hz);

to read

tsleep(&rushjob, PPAUSE, "syncer", 10*hz);

This simply makes the sync thread run 1/10 as often except when things 
get really busy it runs as usual.  All the comments at the top of the 
file concerning time in seconds are now 10 times as long.  These are 
still reasonably safe values and work much better for 15 year old 
hardware.