Date: Thu, 10 Jan 2008 13:40:22 -0500 From: "J.R. Oldroyd" <fbsd@opal.com> To: freebsd-stable@freebsd.org Subject: Re: 7.0BETA4 desktop system also periodically freezes Message-ID: <20080110134022.69572ebd@linwhf.opal.com> In-Reply-To: <20080110053303.GC57756@deviant.kiev.zoral.com.ua> References: <4783D41B.3000204@FreeBSD.org> <4783D748.1050401@raad.tartu.ee> <4783D824.1050502@FreeBSD.org> <4783DB72.6030605@raad.tartu.ee> <4783DCAA.1080108@FreeBSD.org> <4783EA7E.1050008@raad.tartu.ee> <4783ED15.1060606@FreeBSD.org> <20080109141859.74d08743@linwhf.opal.com> <478522B5.5030101@FreeBSD.org> <20080109235819.7707133d@linwhf.opal.com> <20080110053303.GC57756@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/19Keo7OZTGUjJb8PTxZU+Ig Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 10 Jan 2008 07:33:03 +0200, Kostik Belousov <kostikbel@gmail.com> w= rote: > >=20 > For the SU-imposed jerkiness, try the patch below. Progress on developing > the change stalled somehow, and I would like to process with it. >=20 > diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c > index 248ce22..005f915 100644 > --- a/sys/kern/vfs_mount.c > +++ b/sys/kern/vfs_mount.c > @@ -2001,6 +2001,12 @@ __mnt_vnode_next(struct vnode **mvp, struct mount = *mp) > mtx_assert(MNT_MTX(mp), MA_OWNED); > =20 > KASSERT((*mvp)->v_mount =3D=3D mp, ("marker vnode mount list mismatch")= ); > + if ((*mvp)->v_yield++ =3D=3D 500) { > + MNT_IUNLOCK(mp); > + (*mvp)->v_yield =3D 0; > + uio_yield(); > + MNT_ILOCK(mp); > + } > vp =3D TAILQ_NEXT(*mvp, v_nmntvnodes); > while (vp !=3D NULL && vp->v_type =3D=3D VMARKER) > vp =3D TAILQ_NEXT(vp, v_nmntvnodes); > diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h > index 0525a43..1ac289a 100644 > --- a/sys/sys/vnode.h > +++ b/sys/sys/vnode.h > @@ -131,6 +131,7 @@ struct vnode { > struct socket *vu_socket; /* v unix domain net (VSOCK) */ > struct cdev *vu_cdev; /* v device (VCHR, VBLK) */ > struct fifoinfo *vu_fifoinfo; /* v fifo (VFIFO) */ > + int vu_yield; /* yield count (VMARKER) */ > } v_un; > =20 > /* > @@ -185,6 +186,7 @@ struct vnode { > #define v_socket v_un.vu_socket > #define v_rdev v_un.vu_cdev > #define v_fifoinfo v_un.vu_fifoinfo > +#define v_yield v_un.vu_yield > =20 > /* XXX: These are temporary to avoid a source sweep at this time */ > #define v_object v_bufobj.bo_object > diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c > index a221b66..02cf45b 100644 > --- a/sys/ufs/ffs/ffs_softdep.c > +++ b/sys/ufs/ffs/ffs_softdep.c > @@ -864,6 +864,7 @@ softdep_process_worklist(mp, full) > */ > if (loopcount++ % 128 =3D=3D 0) { > FREE_LOCK(&lk); > + uio_yield(); > bwillwrite(); > ACQUIRE_LOCK(&lk); > } Applied this patch. No change when deleting 1Gb files - the system still freezes briefly during the deallocation. -jr --Sig_/19Keo7OZTGUjJb8PTxZU+Ig Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHhmaXls33urr0k4kRAoFIAKCW8ggUNo+bDNuYlHWGPEF3bInb+wCgrYAT P+NBjkAzg4rpD1p5SgM1IQw= =m7yx -----END PGP SIGNATURE----- --Sig_/19Keo7OZTGUjJb8PTxZU+Ig--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080110134022.69572ebd>