Date: Thu, 10 Jan 2008 07:33:03 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: "J.R. Oldroyd" <fbsd@opal.com> Cc: Kris Kennaway <kris@freebsd.org>, freebsd-stable@freebsd.org Subject: Re: 7.0BETA4 desktop system also periodically freezes Message-ID: <20080110053303.GC57756@deviant.kiev.zoral.com.ua> In-Reply-To: <20080109235819.7707133d@linwhf.opal.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--U06nEXQpEf10f9fB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 09, 2008 at 11:58:19PM -0500, J.R. Oldroyd wrote: > On Wed, 09 Jan 2008 20:38:29 +0100, Kris Kennaway <kris@freebsd.org> wrot= e: > > > >=20 > > OK, same requests as to the others then. > >=20 >=20 > I presume you mean hwpmc... >=20 > In setting that up, I may have stumbled upon a possible cause. > I ran pmcstat for a while and ended up with a very large output > file. Having not noticed any freezes during that time, I decided > to start over with the output to a different filesystem with more > free space. When I removed that first output file, the resulting > disk i/o for the block deallocation caused a very similar freeze > for a few seconds. And when it came back, the load average graph > peaked up, just as before. >=20 > This appears to be repeatable: >=20 > 1. create a very large file, say 1Gb or so > 2. remove it > 3. observe freeze during file dealloc i/o activity >=20 > This on an ata drive, ufs filesystem with softupdates. >=20 > Folk complaining of jerky mouse syndrome (e.g., during compilations) > may be seeing the same - the compiler creates and removes lots of > files. >=20 > I'm not sure how this would explain those longer freezes (30s or > several minutes) though. For the SU-imposed jerkiness, try the patch below. Progress on developing the change stalled somehow, and I would like to process with it. 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 *m= p) 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); } --U06nEXQpEf10f9fB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHha4OC3+MBN1Mb4gRAuJqAJ9ddrTwSREYVsRzoDZOYqWT+YCubgCgnCc7 ma8oolIVP5ccUHdi6nZsQd4= =j8hC -----END PGP SIGNATURE----- --U06nEXQpEf10f9fB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080110053303.GC57756>