LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Kevin Hilman <khilman@baylibre.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	fweisbec@gmail.com, Arnd Bergmann <arnd@arndb.de>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH] tick: prefer a lower rating device only if it's CPU local device
Date: Tue, 3 Jul 2018 16:44:59 +0100	[thread overview]
Message-ID: <20180703154459.GA15335@e107155-lin> (raw)
In-Reply-To: <CAOi56cW-QsL9gmyF-R9iscZ1M-zM-gJPxcvG=dvB=zrDioZJgA@mail.gmail.com>

On Tue, Jul 03, 2018 at 08:04:37AM -0700, Kevin Hilman wrote:
> On Tue, Jul 3, 2018 at 3:54 AM Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Mon, Jul 02, 2018 at 04:44:33PM -0700, Kevin Hilman wrote:
> > > Hi Sudeep,
> > >
> > > On Wed, May 9, 2018 at 9:02 AM Sudeep Holla <sudeep.holla@arm.com> wrote:
> > > >
> > > > Checking the equality of cpumask for both new and old tick device doesn't
> > > > ensure that it's CPU local device. This will cause issue if a low rating
> > > > clockevent tick device is registered first followed by the registration
> > > > of higher rating clockevent tick device.
> > > >
> > > > In such case, clockevents_released list will never get emptied as both
> > > > the devices get selected as preferred one and we will loop forever in
> > > > clockevents_notify_released.
> > > >
> > > > Cc: Frederic Weisbecker <fweisbec@gmail.com>
> > > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > >
> > > I've got a arm32 board (meson8b-odroidc1) that's been failing in
> > > kernelCI.org since the merge window (boot log[1]), and I finally got
> > > around to bisecting it[2].  Unfortunately, the bisect pointed at a
> > > merge commit, but with some trial and error (and a suggestion by Arnd)
> > > I was able to test that revering $SUBJECT commit[3], my problem goes
> > > away.
> > >
> >
> > Interesting. Sorry for causing the regression.
> >
> > > Another interesting data point is that disabling SMP (either by
> > > "nosmp" on the command-line or CONFIG_SMP=n) also makes the problem go
> > > away, without needing to revert this patch.
> > >
> >
> > I am not sure of nosmp, but with CONFIG_SMP=n, TICK_BROADCAST also gets
> > disabled. dummy_timer won't be registered I assume.
> >
> > I am not sure if dummy_timer is selected as it's per_cpu but the rating
> > is low anyways.
> 
> > > AFAICT, this platform, is using a single timer as a clocksource
> > > ("amlogic,meson6-timer") which is not a per-CPU timer.
> > >
> >
> > Yes that's what I could gather from DT. But this is A5 right ? It may
> > have per CPU TWD(watchdof timer) but DT doesn't specify it, so should be
> > fine.
> >
> > > I ran out of time to keep digging on this issue, and I'm still not
> > > sure exactly what's going on, but I wanted to report it in case anyone
> > > else has any ideas, and so we can hopefully get it fixed during the
> > > -rc cycle.
> > >
> >
> > From the log, it looks like the platform has booted to userspace. Any chance
> > we can have a look at:
> > $ grep "" /sys/devices/system/clock*/{broadcast,clock*}/{available,current}_*
> 
> In the failing case, it doesn't boot to a shell, so I can't do that,
> but after I revert the patch, I have this:
>

Ah ok, does it hang when it registers clockevents ?

> / # ls -l /sys/devices/system/clocksource
> total 0
> drwxr-xr-x    3 root     root             0 Jan  1 00:00 clocksource0
> drwxr-xr-x    2 root     root             0 Jan  1 00:00 power
> -rw-r--r--    1 root     root          4096 Jan  1 00:00 uevent
> / # cat /sys/devices/system/clocksource/clocksource0/available_clocksource
> timer jiffies

Looks good.

> / # cat /sys/devices/system/clocksource/clocksource0/current_clocksource
> timer
>

OK, meson6 clocksource is active

> / # cat /sys/devices/system/clockevents/broadcast/current_device
> meson6_tick

OK, it can support broadcast

> / # cat /sys/devices/system/clockevents/clockevent0/current_device
> dummy_timer
> / # cat /sys/devices/system/clockevents/clockevent1/current_device
> dummy_timer
> / # cat /sys/devices/system/clockevents/clockevent2/current_device
> dummy_timer

But I can't understand why is dummy_timer the active event source and
not meson6_tick. And you say this is working case ? Looks suspicious.

If dummy_timer was getting used, I think meson6_tick was never utilised
before as I see this platform doesn't have cpuidle(at-least from DT)

--
Regards,
Sudeep

  reply	other threads:[~2018-07-03 15:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 16:02 Sudeep Holla
2018-05-13 13:09 ` [tip:timers/core] tick: Prefer " tip-bot for Sudeep Holla
2018-07-02 23:44 ` [PATCH] tick: prefer " Kevin Hilman
2018-07-03 10:53   ` Sudeep Holla
2018-07-03 15:04     ` Kevin Hilman
2018-07-03 15:44       ` Sudeep Holla [this message]
2018-07-03 16:08         ` Thomas Gleixner
2018-07-03 16:48           ` Sudeep Holla
2018-07-08 20:59             ` Martin Blumenstingl
2018-07-09 15:12               ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180703154459.GA15335@e107155-lin \
    --to=sudeep.holla@arm.com \
    --cc=arnd@arndb.de \
    --cc=fweisbec@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH] tick: prefer a lower rating device only if it'\''s CPU local device' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).