linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] mac80211: sta_cleanup timer handling
@ 2010-04-16  7:35 Juuso Oikarinen
  2010-04-16  7:35 ` [RFC PATCH] mac80211: Prevent running sta_cleanup timer unnecessarily Juuso Oikarinen
  0 siblings, 1 reply; 6+ messages in thread
From: Juuso Oikarinen @ 2010-04-16  7:35 UTC (permalink / raw)
  To: linux-wireless

The sta_cleanup timer is used to expire frames in the sta structure ps_tx_buf 
-list. To perform this, the timer is executed periodically.

The timer is executed periodically, regardless if there are frames in the
buffer or not. As a result, the system gets periodically woken up for no
reason at all, wasting precious resources.

This patch proposes a simple fix. It prevent rescheduling the sta_cleanup
timer if on the particular invocation the ps_tx_buf buffers for all sta's 
were empty. On the TX path, the timer is restarted upon queueing frames to
those buffers.

Due to the way checking is performed, this approach will "leak" a few 
unnecessary invocations of the timer handler, but in the big picture those
do not matter.

Comments are appreciated.

Juuso Oikarinen (1):
  mac80211: Prevent running sta_cleanup timer unnecessarily

 net/mac80211/sta_info.c |   13 ++++++++++---
 net/mac80211/tx.c       |    7 +++++++
 2 files changed, 17 insertions(+), 3 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-04-19  5:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16  7:35 [RFC PATCH] mac80211: sta_cleanup timer handling Juuso Oikarinen
2010-04-16  7:35 ` [RFC PATCH] mac80211: Prevent running sta_cleanup timer unnecessarily Juuso Oikarinen
2010-04-16 13:41   ` John W. Linville
2010-04-16 20:17   ` Johannes Berg
2010-04-19  4:56     ` Juuso Oikarinen
2010-04-19  5:57       ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).