From owner-freebsd-hackers Sat Oct 31 17:49:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA17734 for freebsd-hackers-outgoing; Sat, 31 Oct 1998 17:49:01 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (castles215.castles.com [208.214.165.215]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA17729 for ; Sat, 31 Oct 1998 17:48:59 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id QAA01547; Sat, 31 Oct 1998 16:16:52 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199811010016.QAA01547@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Peter Wemm cc: Peter Jeremy , hackers@FreeBSD.ORG, gallatin@cs.duke.edu Subject: Re: sync writes with softupdates enabled In-reply-to: Your message of "Sat, 31 Oct 1998 15:46:39 +0800." <199810310746.PAA18872@spinner.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 31 Oct 1998 16:16:51 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Now that this has been committed, can we have some feedback from people using mmap heavily on -current? This should make an enormous difference to mmap's performance there if it's a real fix... Andrew, how does this affect that nasty machine-pegging test program you showed me a while back? > > That's almost certainly correct. Try running without mmap. It used to > > be faster that way; maybe it is again? > > > Hmm, from vm_object.c: > > void > vm_object_page_clean(object, start, end, flags) > > pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) ? VM_PAGER_PUT_SYNC : > 0; > pagerflags |= (flags & OBJPC_INVAL) ? VM_PAGER_PUT_INVAL : 0; > VOP_FSYNC(vp, NULL, (pagerflags & VM_PAGER_PUT_SYNC)?MNT_WAIT:0, curproc); > > vm_object.h: > #define OBJPC_SYNC 0x1 /* sync I/O */ > #define OBJPC_INVAL 0x2 /* invalidate */ > > Yet, we have: > > vfs_subr.c: vm_object_page_clean(vp->v_object, 0, 0, TRUE); > vfs_syscalls.c: vm_object_page_clean(vp->v_object, 0, 0, FALSE); > > param.h:#define TRUE 1 > param.h:#define FALSE 0 > > The sync_fsync() writes are calling vfs_msync() with MNT_NOWAIT, but > vfs_msync() is turning dirty mmap pages into sync writes. This behavior > is needed prior to unmount (obviously) but doesn't seem useful for the > periodic sync. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message