From owner-svn-src-all@freebsd.org Sun Sep 11 20:15:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E41D9BD75CD; Sun, 11 Sep 2016 20:15:42 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B72CE692; Sun, 11 Sep 2016 20:15:42 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8BKFf9o054553; Sun, 11 Sep 2016 20:15:41 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8BKFfgZ054552; Sun, 11 Sep 2016 20:15:41 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609112015.u8BKFfgZ054552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Sep 2016 20:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305711 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 20:15:43 -0000 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++; }