Date: Tue, 29 Aug 2000 13:16:02 -0400 (EDT) From: Christopher Stein <stein@eecs.harvard.edu> To: Jake Burkholder <jburkhol@home.com> Cc: freebsd-arch@freebsd.org Subject: Re: seeking information on kernel threads Message-ID: <Pine.OSF.4.20.0008291240500.18775-100000@wally> In-Reply-To: <20000829024432.90592BA69@io.yi.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 28 Aug 2000, Jake Burkholder wrote: > This isn't really -arch material... Ok, which list would you suggest? This is certainly OS architecture related. Perhaps the -arch in freebsd-arch@ represent machine architecture rather than OS architecture? If this is the case, please direct me to the OS architecture list. > proc0 I guess, which is eventually the swapper. They get started by > sysinits, which are run from mi_startup(). > > SYSINIT(bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &buf_kp) > Here's some ps waux output from my 4.0 system: root 0 0.0 0.0 0 0 ?? DLs Wed04PM 0:00.23 (swapper) root 4 0.0 0.0 0 0 ?? DL Wed04PM 0:00.50 (bufdaemon) root 5 0.0 0.0 0 0 ?? DL Wed04PM 1:59.45 (syncer) bufdaemon and swapper appear to be distinct processes. > > DESCRIPTION > > The update kernel process helps protect the integrity of disk volumes > > by flushing volatile cached filesystem data to disk. This is done at > > thirty second intervals by default. The time period may be changed by > > using sysctl(8) to modify the kern.update variable. The update process > > does the equivalent of the sync(2) function call to do the task. > > > > -- cut here -- > > > > Is this out of date? I thought FreeBSD implemented a trickle sync > > algorithm, which would contradict much of the description above. > > I don't really know what this means. Yes, it is (was) out of date. The man page was replaced with a syncer page in 4.1. My point was that a trickle sync algorithm is more than just an update process with a small period between wakeups. Trickle sync processes a fraction of the dirty buffers on every wakeup, unlike the more bursty update, which used to sync all the dirty blocks. > > > > (2) Syncer (pid 5): sched_sync() in kern/vfs_subr.c. Pretty clear that > > this one writes dirty buffers. However, it seems to have a variable > > throttle (speedup_syncer()).. why then the bufdaemon process? Also the pid > > number suggests that it is started *after* the bufdaemon. Hmm. > > Its not really relevant which is started first, they won't be needed > until after all the sysinits are over and the scheduler() starts. So the syncer writes dirty file system buffers. What does bufdaemon do then? Here are the 3 kernel VM daemons: root 2 0.0 0.0 0 0 ?? DL Wed04PM 0:00.51 (pagedaemon) root 3 0.0 0.0 0 0 ?? DL Wed04PM 0:00.00 (vmdaemon) root 0 0.0 0.0 0 0 ?? DLs Wed04PM 0:00.23 (swapper) How are they different? From the source (vm/vm_pageout.c) vm_daemon appears to perform swapping activities; that is, the eviction of full processes from core. Pagedaemon (also vm/vm_pageout.c) appears to write and evict pages to the swap device. What then does the swapper do? thx -Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.20.0008291240500.18775-100000>