Date: Sun, 19 Mar 2017 22:18:44 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315594 - head/sys/net80211 Message-ID: <201703192218.v2JMIiTx059439@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703192218.v2JMIiTx059439>