All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] Interrupt mitigation for USB Atheros dongles
@ 2014-02-14  1:45 Dimosthenis Pediaditakis
  2014-02-14 10:50 ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: Dimosthenis Pediaditakis @ 2014-02-14  1:45 UTC (permalink / raw)
  To: ath9k-devel

Hi all,
I am using a capacity and available bandwidth measurement software that
compute estimates based on the gaps among packet trains/pairs.

For that reason I need to disable RX/TX interrupt mitigation for the
devices that I take the measurement form, because it introduces skew, and
renders unmeasurable the fast links (> 54Kbps).
The less latencies the drivers+kernel introduces, the better.

I have so far managed to disable all together the RX mitigation for
mini-PCIe devices by hard-coding  the following line in
 "linux/drivers/net/wireless/ath/ath9k/ hw.c"
ah->config.rx_intr_mitigation = false;

While the above trick improves my results, it doesn't change the behaviour
of the Atheros-based USB WiFi dongles.
AFAIK my TP-Link TL-WN722N USB dongle uses the ath9k_htc driver, but I
haven't found anything relevant in the respective sources ( htc_*.{c, h} )

Apart from that, I suspect that the USB-net driver itself might also
introduce some fixed delays which affect the minimum time-spacing
measurement that my software can perceive at the receiver side.

Here follow the details of my hardware:
https://wikidevi.com/wiki/TP-LINK_TL-WN722N
I am using linux kernel 3.11 at the moment, but I am flexible to switch to
a newer version.

Thank you in advance for your help,
Dimos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140214/aa394a18/attachment.htm 

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

* [ath9k-devel] Interrupt mitigation for USB Atheros dongles
  2014-02-14  1:45 [ath9k-devel] Interrupt mitigation for USB Atheros dongles Dimosthenis Pediaditakis
@ 2014-02-14 10:50 ` Felix Fietkau
  2014-02-14 19:06   ` Adrian Chadd
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2014-02-14 10:50 UTC (permalink / raw)
  To: ath9k-devel

On 2014-02-14 02:45, Dimosthenis Pediaditakis wrote:
> Hi all,
> I am using a capacity and available bandwidth measurement software that
> compute estimates based on the gaps among packet trains/pairs.
> 
> For that reason I need to disable RX/TX interrupt mitigation for the
> devices that I take the measurement form, because it introduces skew,
> and renders unmeasurable the fast links (> 54Kbps).
> The less latencies the drivers+kernel introduces, the better.
> 
> I have so far managed to disable all together the RX mitigation for
> mini-PCIe devices by hard-coding  the following line in
>  "linux/drivers/net/wireless/ath/ath9k/ hw.c"
> ah->config.rx_intr_mitigation = false;
It seems to me that a better way to do this would be to drop your
fragile software based time measurement of rx interrupts, and instead
use the hardware timestamp (measured in microseconds).

> While the above trick improves my results, it doesn't change the
> behaviour of the Atheros-based USB WiFi dongles.
> AFAIK my TP-Link TL-WN722N USB dongle uses the ath9k_htc driver, but I
> haven't found anything relevant in the respective sources ( htc_*.{c, h} )
There is no interrupt mitigation here.

> Apart from that, I suspect that the USB-net driver itself might also
> introduce some fixed delays which affect the minimum time-spacing
> measurement that my software can perceive at the receiver side.
USB in general adds too much latency for what you want to do.
Use hardware timestamps here as well.

- Felix

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

* [ath9k-devel] Interrupt mitigation for USB Atheros dongles
  2014-02-14 10:50 ` Felix Fietkau
@ 2014-02-14 19:06   ` Adrian Chadd
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Chadd @ 2014-02-14 19:06 UTC (permalink / raw)
  To: ath9k-devel

Hm, do we have a sane way to get an unmolested RX timestamp?

like, is there any twiddle we can do to use the second TSF on Kiwi and
later and leave it free-running, so in STA mode we can get the RX
timestamps from said free-running clock, rather than the hostap BSS
adjusted TSF?


-a


On 14 February 2014 02:50, Felix Fietkau <nbd@openwrt.org> wrote:
> On 2014-02-14 02:45, Dimosthenis Pediaditakis wrote:
>> Hi all,
>> I am using a capacity and available bandwidth measurement software that
>> compute estimates based on the gaps among packet trains/pairs.
>>
>> For that reason I need to disable RX/TX interrupt mitigation for the
>> devices that I take the measurement form, because it introduces skew,
>> and renders unmeasurable the fast links (> 54Kbps).
>> The less latencies the drivers+kernel introduces, the better.
>>
>> I have so far managed to disable all together the RX mitigation for
>> mini-PCIe devices by hard-coding  the following line in
>>  "linux/drivers/net/wireless/ath/ath9k/ hw.c"
>> ah->config.rx_intr_mitigation = false;
> It seems to me that a better way to do this would be to drop your
> fragile software based time measurement of rx interrupts, and instead
> use the hardware timestamp (measured in microseconds).
>
>> While the above trick improves my results, it doesn't change the
>> behaviour of the Atheros-based USB WiFi dongles.
>> AFAIK my TP-Link TL-WN722N USB dongle uses the ath9k_htc driver, but I
>> haven't found anything relevant in the respective sources ( htc_*.{c, h} )
> There is no interrupt mitigation here.
>
>> Apart from that, I suspect that the USB-net driver itself might also
>> introduce some fixed delays which affect the minimum time-spacing
>> measurement that my software can perceive at the receiver side.
> USB in general adds too much latency for what you want to do.
> Use hardware timestamps here as well.
>
> - Felix
> _______________________________________________
> ath9k-devel mailing list
> ath9k-devel at lists.ath9k.org
> https://lists.ath9k.org/mailman/listinfo/ath9k-devel

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

end of thread, other threads:[~2014-02-14 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14  1:45 [ath9k-devel] Interrupt mitigation for USB Atheros dongles Dimosthenis Pediaditakis
2014-02-14 10:50 ` Felix Fietkau
2014-02-14 19:06   ` Adrian Chadd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.