Date: Fri, 2 Oct 2009 19:24:38 +0700 From: Yohanes Nugroho <yohanes@gmail.com> To: Stanislav Sedov <stas@freebsd.org> Cc: freebsd-net@freebsd.org, freebsd-arm@freebsd.org Subject: Re: FreeBSD ARM network speed Message-ID: <260bb65e0910020524p374a7706r21c72a12b8ce93fb@mail.gmail.com> In-Reply-To: <20091002133559.283d377f.stas@FreeBSD.org> References: <260bb65e0910012258w7c569505xa8cac5bd8bbd2aaa@mail.gmail.com> <20091002133559.283d377f.stas@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 2, 2009 at 4:35 PM, Stanislav Sedov <stas@freebsd.org> wrote: > On Fri, 2 Oct 2009 12:58:38 +0700 > Yohanes Nugroho <yohanes@gmail.com> mentioned: > >> I have two question: >> 1. Is the network speed in Freebsd ARM currently slower than Linux ARM? >> > > I don't think so. =C2=A0Our network stack is arch-independent and should = perform > equally well on all platforms. =C2=A0I've been able to acchieve speeds up= to > 70 Mbps on my 180Mhz AT91 based board which uses very plain and dumb > ethernet controller (although, DMA is supported). Ok, glad to hear that :) because the first time I asked about a problem in the USB, it turns out that there was a problem in the latest source code in busdma, and I have spent several days thinking it was my bug. > > This looks weird. =C2=A0Why do you stop the TX engine to add more packets > in the ring? =C2=A0This thing definitely can kill the network performace yes, you are right, that is weird, I will have a look at it again. > The main strategy of the driver should be to keep the ring filled, > waking up when some reasonable amount of space in the ring become > available, and sleeping all other time when the adapter is working. Thank you for your enlightenment. > I'm not sure why Linux doesn't use interrupt, but this looks really > wrong. It is because the driver comes from a vendor (very messy code), not in the mainline kernel yet. the background story: - I have a cheap chinese NAS device (Agestar NCB3AST, cost about $50, now you can get it for about $40), comes with linux kernel 2.4, no source code was given. SoC used is Starsemi 9104 - I found out that there is a Linux source code for this SoC but for different device (with different hardware around the SoC). - Based on the source code, I ported it to work on Linux kernel 2.6, I didn't bother to try to clean up the source code - I am thinking of trying to add my code to mainline kernel, I realized that I didn't understand most of the source code - Bruce Simpson offered a device with same SoC (NSD-100) and I tried to port FreeBSD to it, thinking that I will understand the SoC better when rewriting the code - Starsemi was bought by cavium, the SoC is renamed to Econa CNS1102, and the datasheet was released. The datasheet is not very clear, so I am still basing some of my code on the Linux code (just the logic, not copy pasting, I understand about the license implication). > I'd suggest you to ananlyze the performance of network driver > either by using the profiling tools available (kgmon, hardware > counters (if any)) or/and via system monitoring tools (top, etc). > Top, in particular, will allow you to see where all the CPU time > went. I am testing in single user mode. Last time i tested using kgmon, it doesn't show any particular area that might cause the slowdown. Once again, thank you, I now have some ideas on what to do this weekend. --=20 Regards Yohanes http://yohan.es/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?260bb65e0910020524p374a7706r21c72a12b8ce93fb>