aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdc
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-04-05 00:08:42 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-04-05 00:08:42 +0000
commit25f98057076ce0474c2d37a238861476f974079b (patch)
tree6531bb5ae5c4e6bdad7cb0d3b2f757c592c53bb0 /sys/dev/fdc
parent8e8df7d50ad7f2b0bb1cb0b8c18242ca511635c3 (diff)
downloadsrc-25f98057076ce0474c2d37a238861476f974079b.tar.gz
src-25f98057076ce0474c2d37a238861476f974079b.zip
Don't wakeup the fdc worker thread once a second when idle.
The fdc worker thread was using a one second timeout while waiting for a new bio to arrive or for the device to detach. However, the driver already does a wakeup when queueing a new bio or asking the thread to detach, so the timeout only served to waste CPU time waking up the thread once a second just so it could go right back to sleep. Use an infinite timeout instead. Discussed with: phk Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=297568
Diffstat (limited to 'sys/dev/fdc')
-rw-r--r--sys/dev/fdc/fdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index a8a607fd83f0..a4abd196a579 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -968,7 +968,7 @@ fdc_worker(struct fdc_data *fdc)
fdc->bp = bioq_takefirst(&fdc->head);
if (fdc->bp == NULL)
msleep(&fdc->head, &fdc->fdc_mtx,
- PRIBIO, "-", hz);
+ PRIBIO, "-", 0);
} while (fdc->bp == NULL &&
(fdc->flags & FDC_KTHREAD_EXIT) == 0);
mtx_unlock(&fdc->fdc_mtx);