All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
	"open list:THERMAL" <linux-pm@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	rodrigo.vivi@intel.com, David Airlie <airlied@linux.ie>,
	"Intel graphics driver community testing & development" 
	<intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH v5 3/3] PM/runtime:Replace jiffies based accounting with ktime based accounting
Date: Fri, 18 Jan 2019 12:05:18 +0100	[thread overview]
Message-ID: <CAJZ5v0gFpK3Kqyf=RM+160A3RAQYPs3c3EgxmNH7ZceEaujEUw@mail.gmail.com> (raw)
In-Reply-To: <CAKfTPtD9fu06sw8=MvjwfQfJoQHb0kT3un9=kdw+WZj+rbVUZg@mail.gmail.com>

On Fri, Jan 18, 2019 at 11:53 AM Vincent Guittot
<vincent.guittot@linaro.org> wrote:
>
> On Fri, 18 Jan 2019 at 11:42, Vincent Guittot
> <vincent.guittot@linaro.org> wrote:
> >
> > Hi Guenter,
> >
> > Le Thursday 17 Jan 2019 à 14:16:28 (-0800), Guenter Roeck a écrit :
> > > On Fri, Dec 21, 2018 at 11:33:56AM +0100, Vincent Guittot wrote:
> > > > From: Thara Gopinath <thara.gopinath@linaro.org>
> > > >
> > > > This patch replaces jiffies based accounting for runtime_active_time
> > > > and runtime_suspended_time with ktime base accounting. This makes the
> > > > runtime debug counters inline with genpd and other pm subsytems which
> > > > uses ktime based accounting.
> > > >
> > > > timekeeping is initialized before pm_runtime_init() so ktime_get() will
> > > > be ready before first call. In fact, timekeeping_init() is called early
> > > > in start_kernel() which is way before driver_init() (and that's when
> > > > devices can start to be initialized) called from rest_init() via
> > > > kernel_init_freeable() and do_basic_setup().
> > > >
> > > This is not (always) correct. My qemu "collie" boot test fails with this
> > > patch applied. Reverting the patch fixes the problem. Bisect log attached.
> > >
> >
> > Can you try the patch below ?
> > ktime_get_mono_fast_ns() has the advantage of being init with dummy clock so
> > it can be used at early_init.
>
> Another possibility would be delay the init of the gpiochip

Well, right.

Initializing devices before timekeeping doesn't feel particularly
robust from the design perspective.

How exactly does that happen?

WARNING: multiple messages have this Message-ID (diff)
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"open list:THERMAL" <linux-pm@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	Intel graphics driver community testing & development
	<intel-gfx@lists.freedesktop.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	rodrigo.vivi@intel.com, Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v5 3/3] PM/runtime:Replace jiffies based accounting with ktime based accounting
Date: Fri, 18 Jan 2019 12:05:18 +0100	[thread overview]
Message-ID: <CAJZ5v0gFpK3Kqyf=RM+160A3RAQYPs3c3EgxmNH7ZceEaujEUw@mail.gmail.com> (raw)
In-Reply-To: <CAKfTPtD9fu06sw8=MvjwfQfJoQHb0kT3un9=kdw+WZj+rbVUZg@mail.gmail.com>

On Fri, Jan 18, 2019 at 11:53 AM Vincent Guittot
<vincent.guittot@linaro.org> wrote:
>
> On Fri, 18 Jan 2019 at 11:42, Vincent Guittot
> <vincent.guittot@linaro.org> wrote:
> >
> > Hi Guenter,
> >
> > Le Thursday 17 Jan 2019 à 14:16:28 (-0800), Guenter Roeck a écrit :
> > > On Fri, Dec 21, 2018 at 11:33:56AM +0100, Vincent Guittot wrote:
> > > > From: Thara Gopinath <thara.gopinath@linaro.org>
> > > >
> > > > This patch replaces jiffies based accounting for runtime_active_time
> > > > and runtime_suspended_time with ktime base accounting. This makes the
> > > > runtime debug counters inline with genpd and other pm subsytems which
> > > > uses ktime based accounting.
> > > >
> > > > timekeeping is initialized before pm_runtime_init() so ktime_get() will
> > > > be ready before first call. In fact, timekeeping_init() is called early
> > > > in start_kernel() which is way before driver_init() (and that's when
> > > > devices can start to be initialized) called from rest_init() via
> > > > kernel_init_freeable() and do_basic_setup().
> > > >
> > > This is not (always) correct. My qemu "collie" boot test fails with this
> > > patch applied. Reverting the patch fixes the problem. Bisect log attached.
> > >
> >
> > Can you try the patch below ?
> > ktime_get_mono_fast_ns() has the advantage of being init with dummy clock so
> > it can be used at early_init.
>
> Another possibility would be delay the init of the gpiochip

Well, right.

Initializing devices before timekeeping doesn't feel particularly
robust from the design perspective.

How exactly does that happen?
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-01-18 11:05 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21 10:33 [PATCH v5 0/3] Move pm_runtime accounted time to raw nsec Vincent Guittot
2018-12-21 10:33 ` Vincent Guittot
2018-12-21 10:33 ` [PATCH v5 1/3] PM/runtime: Add a new interface to get accounted time Vincent Guittot
2018-12-21 10:33   ` Vincent Guittot
2018-12-21 10:33 ` [PATCH v5 2/3] drm/i915: Move on the new pm runtime interface Vincent Guittot
2018-12-21 10:33   ` Vincent Guittot
2018-12-21 11:33   ` [Intel-gfx] " Tvrtko Ursulin
2018-12-21 13:26     ` Vincent Guittot
2018-12-21 13:26       ` Vincent Guittot
2018-12-31 12:32       ` Tvrtko Ursulin
2018-12-31 12:32         ` Tvrtko Ursulin
2019-01-07 14:03         ` Vincent Guittot
2019-01-07 14:03           ` Vincent Guittot
2019-01-07 14:21           ` Rafael J. Wysocki
2019-01-07 14:21             ` Rafael J. Wysocki
2019-01-16 11:59             ` Rafael J. Wysocki
2019-01-16 11:59               ` Rafael J. Wysocki
2018-12-21 10:33 ` [PATCH v5 3/3] PM/runtime:Replace jiffies based accounting with ktime based accounting Vincent Guittot
2018-12-21 10:33   ` Vincent Guittot
2018-12-21 10:43   ` Ulf Hansson
2018-12-21 10:43     ` Ulf Hansson
2019-01-17 22:16   ` Guenter Roeck
2019-01-17 22:16     ` Guenter Roeck
2019-01-18 10:42     ` Vincent Guittot
2019-01-18 10:42       ` Vincent Guittot
2019-01-18 10:53       ` Vincent Guittot
2019-01-18 10:53         ` Vincent Guittot
2019-01-18 11:05         ` Rafael J. Wysocki [this message]
2019-01-18 11:05           ` Rafael J. Wysocki
2019-01-18 12:08           ` Guenter Roeck
2019-01-18 12:08             ` Guenter Roeck
2019-01-21 15:17             ` Vincent Guittot
2019-01-21 15:17               ` Vincent Guittot
2019-01-21 15:24               ` Guenter Roeck
2019-01-21 15:24                 ` Guenter Roeck
2019-01-21 22:52               ` Rafael J. Wysocki
2019-01-21 22:52                 ` Rafael J. Wysocki
2019-01-22  7:57                 ` Vincent Guittot
2019-01-22  7:57                   ` Vincent Guittot
2019-01-18 12:04       ` Guenter Roeck
2019-01-18 10:54     ` Rafael J. Wysocki
2018-12-21 10:45 ` ✗ Fi.CI.CHECKPATCH: warning for Move pm_runtime accounted time to raw nsec Patchwork
2018-12-21 11:32 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-21 20:16 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-18 11:07 ` ✗ Fi.CI.BAT: failure for Move pm_runtime accounted time to raw nsec (rev2) Patchwork

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='CAJZ5v0gFpK3Kqyf=RM+160A3RAQYPs3c3EgxmNH7ZceEaujEUw@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rjw@rjwysocki.net \
    --cc=rodrigo.vivi@intel.com \
    --cc=thara.gopinath@linaro.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.