Re: Problems using stock kernel armmp with Marvell 38x hardware.
Hi.
On Sat, Oct 20, 2018 at 01:44:36PM +0200, LinAdmin wrote:
> On 19.10.2018 23:35, Reco wrote:
> > Hi.
> >
> > On Fri, Oct 19, 2018 at 11:25:47PM +0200, LinAdmin wrote:
> >> On 19.10.2018 20:12, Uwe Kleine-König wrote:
> >>> Hello,
> >>>
> >>> On 10/19/2018 04:39 PM, LinAdmin wrote:
> >>>> When the system is idle, one CPU is always busy at least 50%
> >>>> with a kworker thread which IMHO does not perform any useful
> >>>> work. When idle, the kernel 4.9.y built exclusively for
> >>>> Marvell has both CPU’s at below 1% load.
> >>> How do you diagnose that? I have an Turris Omnia here which is powered
> >>> by an Armada385, too. I just logged into it, the load average is below
> >>> 0.1 and according to htop the CPUs run at < 1%.
> >>>
> >>> Best regards
> >>> Uwe
> >>>
> >> Using top or htop show that cpu load.
> > What about 'perf top' result?
> > I happen to have Armada385/Caiman with stock Debian kernel, and I see no
> > such CPU load.
> >
> > Reco
>
> Many thanks for hinting towards perf!
>
> perf top shows on armmp:
>
> Overhead Shared Object Symbol
> 86.45% [kernel] [k]armada_370_delay_timer_read
> 8.73% [kernel] [k] __timer_delay
>
> With the dedicated kernel those high percentages do not show up.
__timer_delay is harmless. Way too generic to blame first anyway.
armada_370_delay_timer_read, on the other hand, is a part of clocksource
code. It should be called from here
(drivers/clocksource/time-armada-370-xp.c):
/*
* Setup free-running clocksource timer (interrupts
* disabled).
*/
writel(0xffffffff, timer_base + TIMER0_VAL_OFF);
writel(0xffffffff, timer_base + TIMER0_RELOAD_OFF);
atomic_io_modify(timer_base + TIMER_CTRL_OFF,
TIMER0_RELOAD_EN | enable_mask,
TIMER0_RELOAD_EN | enable_mask);
armada_370_delay_timer.freq = timer_clk;
register_current_timer_delay(&armada_370_delay_timer);
And yet, my Armada385 board uses the same clocksource
(armada_370_xp_clocksource), but does not call problematic function with
such frequency.
And, as far as I can tell, Debian kernel does not modify
time-armada-370-xp.c.
Which brings the next question - is the source tree of this 'kernel
4.9.y built exclusively for Marvell' public? Are there any clocksource
patches?
Reco
Reply to: