svn commit: r305711 - head/sys/dev/ioat
Conrad E. Meyer
cem at FreeBSD.org
Sun Sep 11 20:15:43 UTC 2016
Author: cem
Date: Sun Sep 11 20:15:41 2016
New Revision: 305711
URL: https://svnweb.freebsd.org/changeset/base/305711
Log:
ioat(4): Start poll timer when descriptors are released to HW
Rather than when the software creates the descriptors.
Sponsored by: Dell EMC Isilon
Modified:
head/sys/dev/ioat/ioat.c
Modified: head/sys/dev/ioat/ioat.c
==============================================================================
--- head/sys/dev/ioat/ioat.c Sun Sep 11 20:14:19 2016 (r305710)
+++ head/sys/dev/ioat/ioat.c Sun Sep 11 20:15:41 2016 (r305711)
@@ -949,6 +949,13 @@ ioat_release(bus_dmaengine_t dmaengine)
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
ioat_write_2(ioat, IOAT_DMACOUNT_OFFSET, (uint16_t)ioat->hw_head);
+
+ if (!ioat->is_completion_pending) {
+ ioat->is_completion_pending = TRUE;
+ callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback,
+ ioat);
+ callout_stop(&ioat->shrink_timer);
+ }
mtx_unlock(&ioat->submit_lock);
}
@@ -1788,13 +1795,6 @@ ioat_submit_single(struct ioat_softc *io
atomic_add_rel_int(&ioat->head, 1);
atomic_add_rel_int(&ioat->hw_head, 1);
- if (!ioat->is_completion_pending) {
- ioat->is_completion_pending = TRUE;
- callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback,
- ioat);
- callout_stop(&ioat->shrink_timer);
- }
-
ioat->stats.descriptors_submitted++;
}
More information about the svn-src-all
mailing list