From owner-svn-src-head@freebsd.org Sun Mar 19 22:18:45 2017 Return-Path: Delivered-To: svn-src-head@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 D4216D137B5; Sun, 19 Mar 2017 22:18:45 +0000 (UTC) (envelope-from avos@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 A3C6F1CB2; Sun, 19 Mar 2017 22:18:45 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2JMIiD3059440; Sun, 19 Mar 2017 22:18:44 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2JMIiTx059439; Sun, 19 Mar 2017 22:18:44 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201703192218.v2JMIiTx059439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 19 Mar 2017 22:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315594 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Mar 2017 22:18:45 -0000 Author: avos Date: Sun Mar 19 22:18:44 2017 New Revision: 315594 URL: https://svnweb.freebsd.org/changeset/base/315594 Log: net80211: do not cancel callout when FF queue is empty. This should reduce overhead for aggregates (since every second frame clears the queue and reschedules the task there is no need to cancel the callout here; let it just run once at the end - even if queue is empty). Reported by: adrian Modified: head/sys/net80211/ieee80211_superg.c Modified: head/sys/net80211/ieee80211_superg.c ============================================================================== --- head/sys/net80211/ieee80211_superg.c Sun Mar 19 22:14:22 2017 (r315593) +++ head/sys/net80211/ieee80211_superg.c Sun Mar 19 22:18:44 2017 (r315594) @@ -103,24 +103,6 @@ ff_age_all(void *arg, int npending) ieee80211_ff_age_all(ic, ieee80211_ffagemax + 1); } -static void -ff_check_cancel_age_timer(struct ieee80211com *ic) -{ - struct ieee80211_superg *sg = ic->ic_superg; - - IEEE80211_FF_LOCK_ASSERT(ic); - - if (sg->ff_stageq[WME_AC_VO].depth == 0 && - sg->ff_stageq[WME_AC_VI].depth == 0 && - sg->ff_stageq[WME_AC_BE].depth == 0 && - sg->ff_stageq[WME_AC_BK].depth == 0) { - struct timeout_task *qtask = &sg->ff_qtimer; - - /* NB: may be called from the task itself */ - (void) taskqueue_cancel_timeout(ic->ic_tq, qtask, NULL); - } -} - void ieee80211_superg_attach(struct ieee80211com *ic) { @@ -679,10 +661,9 @@ ieee80211_ff_age(struct ieee80211com *ic sq->head = m->m_nextpkt; sq->depth--; } - if (m == NULL) { + if (m == NULL) sq->tail = NULL; - ff_check_cancel_age_timer(ic); - } else + else M_AGE_SUB(m, quanta); IEEE80211_FF_UNLOCK(ic); @@ -732,7 +713,6 @@ stageq_remove(struct ieee80211com *ic, s if (sq->tail == m) sq->tail = mprev; sq->depth--; - ff_check_cancel_age_timer(ic); return; } mprev = m;