From: Sudeep Holla <sudeep.holla@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Jisheng Zhang <jszhang@marvell.com>,
Steve Longerbeam <steve_longerbeam@mentor.com>,
Eugeniu Rosca <roscaeugeniu@gmail.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Joshua Frkuska <joshua_frkuska@mentor.com>
Subject: Re: [RFC PATCH] drivers core: cpu: add hotplug callback to update cpu_dev state to resumed
Date: Mon, 4 Feb 2019 15:52:39 +0000 [thread overview]
Message-ID: <20190204155239.GB24131@e107155-lin> (raw)
In-Reply-To: <20190204154421.GA14330@kroah.com>
On Mon, Feb 04, 2019 at 04:44:21PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Feb 04, 2019 at 03:37:20PM +0000, Sudeep Holla wrote:
> > On Thu, Jan 31, 2019 at 04:05:59PM +0000, Sudeep Holla wrote:
> > > On Thu, Jan 31, 2019 at 12:48:49AM +0100, Rafael J. Wysocki wrote:
> > > > On Friday, January 25, 2019 4:09:06 PM CET Sudeep Holla wrote:
> > > > > The sysfs for the cpu caches are managed by adding devices with cpu
> > > > > as the parent in cpu_device_create() when secondary cpu is brought
> > > > > onlin. Generally when the secondary CPUs are hotplugged back is as part
> > > > > of resume from suspend-to-ram, we call cpu_device_create() from the cpu
> > > > > hotplug state machine while the cpu device associated with that CPU is
> > > > > not yet ready to be resumed as the device_resume() call happens bit later.
> > > > > It's not really needed to set the flag is_prepared for cpu devices are
> > > > > they are mostly pseudo device and hotplug framework deals with state
> > > > > machine and not managed through the cpu device.
> > > > >
> > > > > This often results in annoying warning when resuming:
> > > > > Enabling non-boot CPUs ...
> > > > > CPU1: Booted secondary processor
> > > > > cache: parent cpu1 should not be sleeping
> > > > > CPU1 is up
> > > > > CPU2: Booted secondary processor
> > > > > cache: parent cpu2 should not be sleeping
> > > > > CPU2 is up
> > > > > .... and so on.
> > > > >
> > > > > Just fix the warning by updating the device state quite early.
> > > > >
> > > > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > > > > Reported-by: Jisheng Zhang <jszhang@marvell.com>
> > > > > Reported-by: Steve Longerbeam <slongerbeam@gmail.com>
> > > > > Reported-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> > > > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > > > > ---
> > > > > drivers/base/cpu.c | 20 +++++++++++++++++++-
> > > > > include/linux/cpuhotplug.h | 1 +
> > > > > 2 files changed, 20 insertions(+), 1 deletion(-)
> > > > >
> > > > > Hi Rafael,
> > > > >
> > > > > This is getting reported for quite some time. Let me know if you have
> > > > > better solution to fix this harmless yet annoying warnings during system
> > > > > resume.
> > > >
> > > > I'd rather have a flag in struct dev_pm_info that will cause the message to
> > > > be suppressed if set.
> > > >
> > > > It could be used for other purposes too then in princple (like skipping the
> > > > creation of empty "power" attr groups in sysfs for devices that don't
> > > > need them etc.).
> > > >
> > > Thanks for the suggestion. I did quick hack and came up with something
> > > below. I wanted to run through you once before I materialise it into
> > > a formal patch to check if I understood your suggestion correctly.
> > > We can move no_pm_required outside dev_pm_info struct and rename with
> > > any better names.
> > >
> >
> > Sorry for the nag, since the title has RFC, thought there are chances of
> > this getting lost. Let me know if the below idea aligns with your suggestion ?
>
> Personally, I ignore RFC patches unless I'm accidentally interested in
> them, as it shows that the author doesn't feel good enough to propose
> them as a real solution :)
>
I understand. Since Rafael did suggest alternate approach, just thought
of pinging him to check if I understood his idea.
> But that's just me...
>
:)
Regards,
Sudeep
next prev parent reply other threads:[~2019-02-04 15:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 11:37 How to remove warn msg "cache: parent cpui should not be sleeping" i=1, 2, 3 Jisheng Zhang
2016-12-21 16:54 ` Sudeep Holla
2016-12-22 7:48 ` Jisheng Zhang
2018-08-20 17:46 ` Steve Longerbeam
2018-10-02 17:07 ` Eugeniu Rosca
2019-01-25 13:07 ` Eugeniu Rosca
2019-01-25 15:09 ` [RFC PATCH] drivers core: cpu: add hotplug callback to update cpu_dev state to resumed Sudeep Holla
2019-01-27 13:57 ` Eugeniu Rosca
2019-01-30 23:48 ` Rafael J. Wysocki
2019-01-31 16:05 ` Sudeep Holla
2019-02-04 15:37 ` Sudeep Holla
2019-02-04 15:44 ` Greg Kroah-Hartman
2019-02-04 15:52 ` Sudeep Holla [this message]
2019-02-06 10:31 ` Rafael J. Wysocki
2019-02-06 13:59 ` 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=20190204155239.GB24131@e107155-lin \
--to=sudeep.holla@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=joshua_frkuska@mentor.com \
--cc=jszhang@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=roscaeugeniu@gmail.com \
--cc=steve_longerbeam@mentor.com \
/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