summaryrefslogtreecommitdiff
path: root/sys/kern/kern_workq.c
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2014-10-08 15:28:40 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2014-10-08 15:28:40 +0000
commit9fa043c8e1549a9b456ffedf7eadcea72e0dc4c5 (patch)
tree91b6d62b20c73e6a8dee11c641ad06fb8a310e79 /sys/kern/kern_workq.c
parentf5ce82e96176f3bab796174e6f0a2cb21bea4a9d (diff)
make workq/taskq runner threads yield when they've hogged the cpu
ok deraadt@ dlg@ phessler@
Diffstat (limited to 'sys/kern/kern_workq.c')
-rw-r--r--sys/kern/kern_workq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_workq.c b/sys/kern/kern_workq.c
index a019620ab1c..9aabaf7249e 100644
--- a/sys/kern/kern_workq.c
+++ b/sys/kern/kern_workq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_workq.c,v 1.15 2014/07/12 18:43:32 tedu Exp $ */
+/* $OpenBSD: kern_workq.c,v 1.16 2014/10/08 15:28:39 blambert Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -236,6 +236,7 @@ workq_thread(void *arg)
wqt->wqt_func(wqt->wqt_arg1, wqt->wqt_arg2);
if (mypool)
pool_put(&workq_task_pool, wqt);
+ sched_pause();
}
kthread_exit(0);