summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_poll.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-06-27 23:23:04 +0000
committerluigi <luigi@FreeBSD.org>2002-06-27 23:23:04 +0000
commitf5aea44c6774363158a8ab598583c50fe77c9f2c (patch)
tree919f78d6404e172c11560f9475f58afea5164bd5 /sys/kern/kern_poll.c
parent24c014fcd5bfe9e57a1208a57b8c0f9aa77261ec (diff)
downloadFreeBSD-src-f5aea44c6774363158a8ab598583c50fe77c9f2c.zip
FreeBSD-src-f5aea44c6774363158a8ab598583c50fe77c9f2c.tar.gz
Remove a printf and add a comment on an assumption that could be
occasionally violated by device drivers.
Diffstat (limited to 'sys/kern/kern_poll.c')
-rw-r--r--sys/kern/kern_poll.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c
index 4101cdf..a197bc0 100644
--- a/sys/kern/kern_poll.c
+++ b/sys/kern/kern_poll.c
@@ -195,6 +195,12 @@ init_device_poll(void)
/*
* Hook from hardclock. Tries to schedule a netisr, but keeps track
* of lost ticks due to the previous handler taking too long.
+ * Normally, this should not happen, because polling handler should
+ * run for a short time. However, in some cases (e.g. when there are
+ * changes in link status etc.) the drivers take a very long time
+ * (even in the order of milliseconds) to reset and reconfigure the
+ * device, causing apparent lost polls.
+ *
* The first part of the code is just for debugging purposes, and tries
* to count how often hardclock ticks are shorter than they should,
* meaning either stray interrupts or delayed events.
@@ -217,10 +223,11 @@ hardclock_device_poll(void)
prev_t = t;
if (pending_polls > 100) {
- /* too much, assume it has stalled */
+ /*
+ * Too much, assume it has stalled (not always true
+ * see comment above).
+ */
stalled++;
- printf("poll stalled [%d] in phase %d\n",
- stalled, phase);
pending_polls = 0;
phase = 0;
}
OpenPOWER on IntegriCloud