From: Thomas Gleixner <tglx@linutronix.de>
To: "dbasehore ." <dbasehore@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>,
x86@kernel.org,
Platform Driver <platform-driver-x86@vger.kernel.org>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>,
Linux-pm mailing list <linux-pm@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v5 2/5] tick: Add freeze timer events
Date: Thu, 13 Jul 2017 06:54:35 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1707130641520.2332@nanos> (raw)
In-Reply-To: <CAGAzgspJ1HoT_RsxCv-sGAWGeLw+cLCkN=kMUTika8fBeA2YxA@mail.gmail.com>
Derek,
On Wed, 12 Jul 2017, dbasehore . wrote:
> On Wed, Jul 12, 2017 at 2:25 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Fri, 7 Jul 2017, Derek Basehore wrote:
> >> +/*
> >> + * Clockevent device may run during freeze
> >> + */
> >> +# define CLOCK_EVT_FEAT_FREEZE_NONSTOP 0x000100
> >
> > Is that really restricted to freezing?
>
> I'm not going to make the call on what firmware may do when it enters
> suspend. Even if it's not supposed to do anything, it still might.
The feature is a description of the hardware capability not of the
way how it's used by software.
> >> + if (!clockevent_state_shutdown(dev)) {
> >
> > What puts the device in shutdown mode when the machine is in freeze state?
>
> tick_freeze does through timekeeping_suspend or tick_suspend_local
> depending on whether it's the last CPU to freeze or not.
Ok. I completely forgot about the inner workings of freeze. So this check
for shutdown actually wants to have a printk, because that's a state which
is wrong. The nonavailability of oneshot mode is just factual information
that this is not possible and does not justify dmesg spam.
> >> + clockevents_tick_resume(dev);
> >
> > That looks wrong as well. What did call suspend on that device?
> >
> > I'm not aware that freeze will actually call suspend on anything down deep
> > in the core code. Can you please explain this magic here?
>
> tick_freeze in tick-common.c calls the tick suspend code.
Fair enough.
> > All of this lacks an explanation how any of this is safe vs. the normal
> > operation of clock event devices and the tick device code.
> >
> > This lacks documentation of calling conventions and checks which make sure
> > they are obeyed.
>
> If I get rid of passing in the cpu id, the only thing left to check
> seems to be making sure that tick_clear_freeze_event is called on the
> same CPU as tick_set_freeze_event.
Yes, you want to store that information somewhere.
> Am I missing something? I'll add Documentation.
Please make that whole thing depend on a Kconfig option. There is no point
having the code and the exports there for everyone while it has only a
single user.
Thanks,
tglx
next prev parent reply other threads:[~2017-07-13 4:54 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 0:02 [PATCH v5 1/5] x86: stub out pmc function Derek Basehore
2017-07-08 0:03 ` [PATCH v5 2/5] tick: Add freeze timer events Derek Basehore
2017-07-08 16:05 ` Andy Shevchenko
2017-07-10 21:11 ` dbasehore .
2017-07-10 12:53 ` Rafael J. Wysocki
2017-07-12 21:25 ` Thomas Gleixner
2017-07-13 1:18 ` dbasehore .
2017-07-13 4:54 ` Thomas Gleixner [this message]
2017-07-13 7:32 ` Peter Zijlstra
2017-07-13 15:09 ` Rafael J. Wysocki
2017-07-13 22:58 ` dbasehore .
2017-07-15 12:39 ` Rafael J. Wysocki
2017-07-18 0:30 ` dbasehore .
2017-07-18 1:33 ` Rafael J. Wysocki
2017-07-18 3:52 ` dbasehore .
2017-07-18 6:40 ` Thomas Gleixner
2017-07-18 20:09 ` dbasehore .
2017-07-18 21:53 ` Thomas Gleixner
2017-07-18 22:03 ` dbasehore .
2017-07-18 22:22 ` Thomas Gleixner
2017-07-18 22:37 ` dbasehore .
2017-07-18 22:39 ` Thomas Gleixner
2017-07-08 0:03 ` [PATCH v5 3/5] x86, apic: Add freeze event support Derek Basehore
2017-07-13 5:13 ` Thomas Gleixner
2017-07-08 0:03 ` [PATCH v5 4/5] freeze: Add error reporting Derek Basehore
2017-07-08 0:03 ` [PATCH v5 5/5] intel_idle: Add S0ix validation Derek Basehore
2017-07-09 7:13 ` kbuild test robot
2017-07-10 13:33 ` Rafael J. Wysocki
2017-07-10 21:57 ` dbasehore .
2017-07-10 22:09 ` Rafael J. Wysocki
2017-07-10 22:24 ` dbasehore .
2017-07-11 14:57 ` Rafael J. Wysocki
2017-07-11 15:43 ` Len Brown
2017-07-12 22:16 ` Thomas Gleixner
2017-07-12 23:14 ` dbasehore .
2017-07-13 5:11 ` Thomas Gleixner
2017-07-13 22:49 ` dbasehore .
2017-07-13 1:06 ` dbasehore .
2017-07-08 16:00 ` [PATCH v5 1/5] x86: stub out pmc function Andy Shevchenko
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=alpine.DEB.2.20.1707130641520.2332@nanos \
--to=tglx@linutronix.de \
--cc=dbasehore@chromium.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rajneesh.bhardwaj@intel.com \
--cc=rjw@rjwysocki.net \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox