Subject: NetBSD 1.6.2 ping times again
To: None <port-macppc@NetBSD.org>
From: Donald Lee <MacPPC@caution.icompute.com>
List: port-macppc
Date: 07/14/2004 23:15:37
Howdy,

I just spent some time trying to figure out why the NetBSD 1.6.2
kernel appears to be delaying ping reponses to the next
minor system clock tick, causing each ping to take a multiple of
10 ms to complete.

I this is the problem I think it is, it should be a significant
network performance problem on MacPPC NetBSD.

I Followed the code in netinet up through icmp_input, and to the
place where it does the selwakeup() and then ends up in needs_resched(),
which is macppc specific.

On the theory that whatever is not working right is only broken for
MacPPC, I figure if it's broken, it has to be broken in arch/macppc
somewhere.

I followed the code down into the trap.S code in arch/powerpc.  There is a
variable calles "astpending" that is used in the assembly code to re-issue
a trap if it's set.

I'm a bit stuck at this point.  I don't know my assembly very well on PPC,
and my normal debug method - putting in printf()s won't work well at this
level. ;->

Anyone willing to try doing a ping from a NetBSD 1.6.2 machine to
see if this problem is unique to me?  If you have the problem, the
pings should be almost exactly 10 ms.  Do a flood ping to localhost
while the ping is running, and the ping times will drop to a smaller,
more reasonable number.

Ideas?  Help?

Thanks,

-dgl-