diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2014-09-09 07:07:40 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2014-09-09 07:07:40 +0000 |
commit | 1f0361878be3a8e61b684d80415297f4d7d2d0fd (patch) | |
tree | b4ee1f0dd3dbb5a3e6dd66efffd1df05e59293ed /sys/kern | |
parent | f07dd02054baec5315d6604039c9454a49238cd5 (diff) |
Make the cleaner, syncer, pagedaemon, aiodone daemons all
yield() if the cpu is marked SHOULDYIELD.
ok miod@ tedu@ phessler@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_sync.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 53bd6abf5f6..37b8e32c3b4 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.161 2014/08/31 21:08:48 tedu Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.162 2014/09/09 07:07:39 blambert Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -1057,6 +1057,8 @@ buf_daemon(struct proc *p) bawrite(bp); pushed++; + sched_pause(); + /* Never allow processing to run for more than 1 sec */ getmicrouptime(&tv); timersub(&tv, &starttime, &timediff); diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c index 6fbbb36a87b..af1bfd1ae84 100644 --- a/sys/kern/vfs_sync.c +++ b/sys/kern/vfs_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_sync.c,v 1.51 2013/07/02 01:04:23 guenther Exp $ */ +/* $OpenBSD: vfs_sync.c,v 1.52 2014/09/09 07:07:39 blambert Exp $ */ /* * Portions of this code are: @@ -194,6 +194,8 @@ sched_sync(struct proc *p) */ vn_syncer_add_to_worklist(vp, syncdelay); } + + sched_pause(); } splx(s); |