From owner-freebsd-arm@FreeBSD.ORG Wed Mar 5 06:06:50 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 244AC2C5; Wed, 5 Mar 2014 06:06:50 +0000 (UTC) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.freebsd.org (Postfix) with ESMTP id 7E5817E0; Wed, 5 Mar 2014 06:06:49 +0000 (UTC) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id F1C05B828; Wed, 5 Mar 2014 08:06:39 +0200 (SAST) Date: Wed, 5 Mar 2014 08:06:39 +0200 From: John Hay To: Ian Lepore Subject: Re: Pandaboard ES and SD card Message-ID: <20140305060639.GA22828@zibbi.meraka.csir.co.za> References: <1393977031.1149.325.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1393977031.1149.325.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 06:06:50 -0000 On Tue, Mar 04, 2014 at 04:50:31PM -0700, Ian Lepore wrote: > On Mon, 2014-03-03 at 17:12 +0100, Svatopluk Kraus wrote: > > Hi, > > > > I finally have found time to install FreeBSD 11.0-CURRENT on Pandaboard ES > > on my table. It's been installed to SD card. When I boot to multiuser, > > it's very very slow. It looks that SD card write performance is very poor. > > When I boot to singleuser, it's OK. However, when I make root filesystem > > read-write by one command and immediately readonly by second one, the > > second one takes a few minutes to finish. ... > > The "mount -uw / ; mount -ur /" is a completely separate thing. That > takes about 30 seconds on every sdcard-based system I have. I don't > know why, but it's really annoying. I don't think it's a driver thing, > it happens with several different drivers. It is svn 230553 to vfs_subr.c that causes it. ############## When doing vflush(WRITECLOSE), clean vnode pages. Unmounts do vfs_msync() before calling VFS_UNMOUNT(), but there is still a race allowing a process to dirty pages after msync finished. Remounts rw->ro just left dirty pages in system. --- head/sys/kern/vfs_subr.c 2012/01/17 01:08:01 230249 +++ head/sys/kern/vfs_subr.c 2012/01/25 20:54:09 230553 @@ -2496,6 +2496,18 @@ * vnodes open for writing. */ if (flags & WRITECLOSE) { + if (vp->v_object != NULL) { + VM_OBJECT_LOCK(vp->v_object); + vm_object_page_clean(vp->v_object, 0, 0, 0); + VM_OBJECT_UNLOCK(vp->v_object); + } + error = VOP_FSYNC(vp, MNT_WAIT, td); + if (error != 0) { + VOP_UNLOCK(vp, 0); + vdrop(vp); + MNT_VNODE_FOREACH_ABORT(mp, mvp); + return (error); + } error = VOP_GETATTR(vp, &vattr, td->td_ucred); VI_LOCK(vp); ############## I'm running with the pfsense patch which basically put an if() around it, with a sysctl that is not set. https://redmine.pfsense.org/projects/pfsense-tools/repository/revisions/008742971cb44d8c0f81929504ab7330442c4ba4/entry/patches/RELENG_8_3/vfs_subr_mount_RO.diff With 230553 only the AVILA watchdog will reset the box everytime you make a config change. I'm sure there must be something wrong or very un-optimal with that code because with a very slow flash interface I cannot see how doing "mount -u -w /; vi /etc/rc.conf; mount -u -r /", can cause the last mount to take half a minute or more. John -- John Hay -- jhay@meraka.csir.co.za / jhay@meraka.org.za