7.0BETA4 desktop system also periodically freezes
Kostik Belousov
kostikbel at gmail.com
Wed Jan 9 21:33:13 PST 2008
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 at freebsd.org> wrote:
> >
> >
> > OK, same requests as to the others then.
> >
>
> I presume you mean hwpmc...
>
> 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.
>
> This appears to be repeatable:
>
> 1. create a very large file, say 1Gb or so
> 2. remove it
> 3. observe freeze during file dealloc i/o activity
>
> This on an ata drive, ufs filesystem with softupdates.
>
> Folk complaining of jerky mouse syndrome (e.g., during compilations)
> may be seeing the same - the compiler creates and removes lots of
> files.
>
> 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 *mp)
mtx_assert(MNT_MTX(mp), MA_OWNED);
KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
+ if ((*mvp)->v_yield++ == 500) {
+ MNT_IUNLOCK(mp);
+ (*mvp)->v_yield = 0;
+ uio_yield();
+ MNT_ILOCK(mp);
+ }
vp = TAILQ_NEXT(*mvp, v_nmntvnodes);
while (vp != NULL && vp->v_type == VMARKER)
vp = 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;
/*
@@ -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
/* 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 == 0) {
FREE_LOCK(&lk);
+ uio_yield();
bwillwrite();
ACQUIRE_LOCK(&lk);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20080110/fdb19938/attachment.pgp
More information about the freebsd-stable
mailing list