SDIO Performance once again
Dan Williams
dcbw at redhat.com
Mon Feb 9 11:23:18 EST 2009
On Mon, 2009-02-09 at 17:13 +0100, Dominik S. Herwald wrote:
> Dan Williams schrieb:
> > On Sun, 2009-02-08 at 17:56 +0100, Dominik S. Herwald wrote:
> >
> >> Hello,
> >>
> >> right now I am testing Marvell 8686 based Modules connected to the SDIO
> >> Controller of a Blackfin BF548.
> >>
> >> Basically the libertas driver works just fine and stable.
> >> But the Performance... :-/
> >>
> >
> > My first thoughts on this are lock contention; there's multiple levels
> > of locking going on here between the SDIO stack, libertas core, and
> > libertas interface drivers. The original Marvell drivers for the 8388
> > had *no* locking whatsoever, which was clearly wrong, but there may well
> > be optimizations we can make inside libertas as well. So here's what
> > would help: find the hotpaths (probably RX/TX, command, and event
> > handlers in the if_* files), and see if you can find out how long some
> > of the lock grabs block for. There's some mutex debug stuff you can
> > define during the kernel build to figure out exactly what threads are
> > waiting on a lock which might be useful.
> >
> > Dan
> >
> >
>
>
> Dan,
>
> did you see my other posting with the Kernel Timer Tick?
>
> -----
>
> self quote:
>
> In the meantime I found out that my Problem seems to be related to the
> Kernel timer tick of 4ms
> (see my second posting on this list with the 4ms frames)...
> On Blackfin the Timer tick is set to 250Hz (4ms) by default. If I set it
> to 1000Hz, performance rises up to 11.2MBit/s performance!
>
> I am still searching for the root of this Problem as setting
> the timer to 1000Hz is no real solution...
>
> -----
>
> So it may be that somewhere is a timer/thread or timeout based on "jiffies"
> or otherwise related to the timer setting of the Controller...
>
> But so far I could not find what exactly causes this behaviour...
Yeah, the only parts of libertas SDIO that use jiffies seem to use it
correctly; ie they always take into account that jiffies/sec can change
depending on what you set HZ to. The actual waits used are mdelay(),
and thus shouldn't be affected by mis-interpreting jiffies... But that
said, it shouldn't be hard to track down why this is happening; there
are only a few places in Libertas that actually care about timeouts.
Dan
More information about the libertas-dev
mailing list