Date: Sat, 20 Sep 2014 13:24:08 -0600 From: Ian Lepore <ian@FreeBSD.org> To: Maxim V FIlimonov <che@bein.link> Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org, mav@freebsd.org Subject: Re: FreeBSD-11.0-CURRENT on ARM: performance and load average Message-ID: <1411241048.66615.148.camel@revolution.hippie.lan> In-Reply-To: <7351653.A2UeEk9AA3@quad> References: <7351653.A2UeEk9AA3@quad>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-z+3p5YfilYZLalC+jqRC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, 2014-09-20 at 22:44 +0400, Maxim V FIlimonov wrote: > Hello everyone, > > Recently, I encountered a problem with -CURRENT on an ARM board (cubieboard2 > to be precise). The problem was that the load average was above 2. Including > the fact that the board has 2 CPU cores, that's strange. Also, the network > throughput was way too slow: from 3 kilobytes per second earlier to 20..50 > about now. > > Here's a workaround for that: > > sysctl kern.eventtimer.periodic=1 > With that, the network performance increased while LA decreased to a decent > 0.3..0.5. Since it's happening only on that hardware, there's a good chance the problem is in the allwinner a10/a20 clock driver, not in the general eventtimer code. In fact, looking at the code it appears that a divide-by-16 is being set in the hardware, but not accounted for when setting the frequency of the eventtimer. Hmm, it should affect the timecounter too, in which case you'd see time-of-day advancing 16x too fast. If ntpd is running it would need to step the clock pretty frequently, which would show up in syslog. I don't have hardware to test on, please see if the attached patch makes a difference. -- Ian --=-z+3p5YfilYZLalC+jqRC Content-Disposition: inline; filename="allwinner_timer.diff" Content-Type: text/x-patch; name="allwinner_timer.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/arm/allwinner/timer.c =================================================================== --- sys/arm/allwinner/timer.c (revision 271909) +++ sys/arm/allwinner/timer.c (working copy) @@ -199,7 +199,7 @@ a10_timer_attach(device_t dev) val |= TIMER_ENABLE; timer_write_4(sc, SW_TIMER_IRQ_EN_REG, val); - sc->timer0_freq = SYS_TIMER_CLKSRC; + sc->timer0_freq = SYS_TIMER_CLKSRC / 16; /* Set desired frequency in event timer and timecounter */ sc->et.et_frequency = sc->timer0_freq; --=-z+3p5YfilYZLalC+jqRC--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1411241048.66615.148.camel>