Subject: Re: 80Mbps routing with Micrel KS8695
To: Jesse Off <joff@embeddedARM.com>
From: Chris Gilbert <chris@dokein.co.uk>
List: port-arm
Date: 01/27/2005 11:29:37
On Sun, 16 Jan 2005 19:27:40 -0700 (MST)
"Jesse Off" <joff@embeddedARM.com> wrote:
> Needless to say, I was a little disappointed to only get 350KB/s extra,
> (Linux 2.4 is almost 2x faster than NetBSD on this benchmark and gets
> 6600KB/s) so I ran a profiling kernel (should have done this in the first
> place). I put the profile output on
> http://www.embeddedx86.com/~joff/gmon.txt for single kttcp -t run.
> Interestingly, splx() was accounted the most time. I'm not sure if this
> is an artifact of pending irqs being accounted to splx() though.
Perhaps you could revisit using an splx that's in software only, as I believe your splx writes to the hardware interrupt mask? That said shaving a few instructions there may not help, however splx and splraise make up 16% of the run time...
Although looking in sys/mbuf.h, I note that MBUFLOCK appears to use splvm, rather than splnet, yet the comment states:
prevents a section of code from from being interrupted by network drivers.
anyone know why we go to splvm?
Just thinking of interrupt code that checks what level they're currently at, and if it's the same as the splx call, they don't do anything, eg epe_ifstart is run with splnet, and calls mbuf code, which mbuflocks.
Chris