[Gta04-owner] Small update to 3.7-gta04 kernel: faster wifi. Issue #488

Dr. H. Nikolaus Schaller hns at goldelico.com
Sat Oct 19 09:51:59 CEST 2013


Hi,

Am 19.10.2013 um 01:56 schrieb NeilBrown:

> On Fri, 18 Oct 2013 13:47:43 +0200 "Dr. H. Nikolaus Schaller"
> <hns at goldelico.com> wrote:
> 
>> 
>> Am 18.10.2013 um 13:17 schrieb NeilBrown:
>> 
>>> On Fri, 18 Oct 2013 12:00:57 +0200 "Dr. H. Nikolaus Schaller"
>>> <hns at goldelico.com> wrote:
>>> 
>>>> Hi Neil,
>>>> 
>>>> Am 18.10.2013 um 11:44 schrieb NeilBrown:
>>>> 
>>>>> 
>>>>> I've just pushed out a small update to 3.7-gta04.
>>>>> 
>>>>> This update adds support for the IRQ line from SDIO cards, such as the wifi
>>>>> in the gta04.
>>>>> This allows the wifi to go faster.
>>>>> With polling (the old behaviour) I get about 1Mb/sec
>>>>> With Interupts enabled and polling disabled I get about 4Mb/sec.
>>>>> If I have interrupts *and* polling (which admittedly is a strange
>>>>> config to even try) I get 5Mb/sec on my 800MHz board, and 6Mb/sec on
>>>>> my 1GHz board.
>>>> 
>>>> That is good news for Issue #488 [1].
>>>> 
>>>>> So the code currently does both.  It is a bit of a hack (and not the only
>>>>> hack) but it works OK for now.
>>>>> 
>>>>> This is will well short of the 40Mb/sec my notebook gets!
>>>>> So it is an improvement, but not as much as I had hoped.
>>>> 
>>>> Does you patch also work for 3.12 or does it need (additional) hacks?
>>>> 
>>>> Or has anyone already done speed tests with 3.12 showing if it is
>>>> really needed or not?
>>> 
>>> There is a 3.12 patch in my 'mainline' branch.
>>> 
>>> http://git.neil.brown.name/git?p=gta04.git;a=commitdiff;h=ad39271dc470f4c1ce048e58e4d137b37d5ff808
>>> 
>>> 
>>> There were patches on the omap list recently:
>>> https://lkml.org/lkml/2013/10/5/36
>>> 
>>> but they don't work for me.
>>> 
>>>> 
>>>> BTW: the MMC1 interface (SD card) is running with ca. 19 MByte/s
>>>> (which fits to the 25 MHz clock and 8 data bits parallel bus).
>>> 
>>> Isn't it a 4bit bus between the OMAP and the WIFI?
>> 
>> Yes, but that should still allow for ~ 9 MByte/s = 72 Mbit/s bandwidth.
>> 
>> So I wonder why we get the high data rate at the MMC1 interface
>> without IRQ patches, but not at MMC2 (with SDIO and Libertas).
> 
> I don't think you can really compare memory card access with SDIO access.
> The former is synchronous - the host is in complete control.
> The later is asynchronous.  The SDIO card (wifi chip) does a lot of the work
> and interrupts the host when there is something for it to do.

Ah, I see. So the theoretically available speed of the interface is not reached 
if the CPU code is slow...

> 
> My guess is that there is some latency between the IRQ line being asserted,
> and the libertas driver handing it.
> That could explain the better throughput in the 1GHz board: if the latency is
> causes by lots of instructions being executed, they would execute faster on
> the faster board.
> 
> Looking at the code I don't see anything obvious, but I'm not really sure
> what to look for.
> 

I have found that Andreas Kemnade already had shared a patch for 3.5-rc2
quite a while ago. I may have noticed it back then and assumed that it is part
of 3.7 and therefore became automagically part of 3.12. What a pity that we
don't work on a single repository and the same kernel version until recently...

Here was his patch:

http://lists.goldelico.com/pipermail/gta04-owner/2012-June/002483.html

And he mentioned in a follow-up that the speed throttle may also be related
to power/fclk management. This appears to be very similar to your patch so
that I wonder if you may have based yours on his code? Then, we should
mention Andreas in the Signed-off: note as well.

BTW: there had been similar issues reported for the Gumstix Overo:

http://wiki.gumstix.org/index.php?title=Overo_Wifi#Issues

BR,
Nikolaus




More information about the Gta04-owner mailing list