Date: Wed, 5 Mar 2014 08:06:39 +0200 From: John Hay <jhay@meraka.org.za> To: Ian Lepore <ian@FreeBSD.org> Cc: freebsd-arm@FreeBSD.org Subject: Re: Pandaboard ES and SD card Message-ID: <20140305060639.GA22828@zibbi.meraka.csir.co.za> In-Reply-To: <1393977031.1149.325.camel@revolution.hippie.lan> References: <CAFHCsPXRXvN1XxnM9-B3iLZ%2BU=y6UgunQY8QBdyA0xESx3C1Bw@mail.gmail.com> <1393977031.1149.325.camel@revolution.hippie.lan>
index | next in thread | previous in thread | raw e-mail
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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140305060639.GA22828>
