From owner-freebsd-hackers Tue Jun 9 13:30:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA27993 for freebsd-hackers-outgoing; Tue, 9 Jun 1998 13:30:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from beatrice.rutgers.edu (beatrice.rutgers.edu [165.230.209.143]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id NAA27891 for ; Tue, 9 Jun 1998 13:30:16 -0700 (PDT) (envelope-from easmith@beatrice.rutgers.edu) Received: (from easmith@localhost) by beatrice.rutgers.edu (950413.SGI.8.6.12/950213.SGI.AUTOCF) id QAA01010; Tue, 9 Jun 1998 16:29:03 -0400 From: "Allen Smith" Message-Id: <9806091629.ZM1008@beatrice.rutgers.edu> Date: Tue, 9 Jun 1998 16:29:02 -0400 In-Reply-To: Snob Art Genre "Re: Newbie 3 questions." (Jun 9, 1:40am) References: X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: ben@rosengart.com Subject: Re: Newbie 3 questions. Cc: Eivind Eklund , hackers@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Jun 9, 1:40am, Snob Art Genre (possibly) wrote: > On Mon, 8 Jun 1998, Allen Smith wrote: > > > Is async necessary/desirable for an MFS, or is it automatic? From the > > 4.4BSD book, I know that the 4.4BSD MFS is built just like a FFS, only > > using pageable memory space instead of filesystem space. > > Sync and async refer to policies for when to commit certain writes to > disk. MFS lives in RAM, except when it's paged out, and then it's the > pager algorithm that determines which pages get written to disk, not the > metadata update scheme. So far as I can tell, the MFS uses the normal filesystem buffer cache, with transfers to the mount_mfs process's memory determined by the policies of that cache. Since some overhead is experienced with the memory copying, context switching, etcetera, it would be desirable to delay such as long as possible, or at least to avoid having a writing process delayed until such was done. After a closer look at the source code, it appears that ufs_direnter, ufs_dirremove, and ufs_dirrewrite use the MNT_ASYNC flag to tell whether to call bdwrite (which will simply mark the buffer dirty - called with MNT_ASYNC) or bwrite (which will wait on it to be done - called without MNT_ASYNC). In other words, mounting a MFS filesystem async may indeed help. (Of course, I'm by no means an expert, so I'd appreciate corrections to this.) I may later do some experiments to check on this - we'll be using an MFS for Squid. -Allen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message