linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Bo Yan <byan@nvidia.com>
Cc: Saravana Kannan <skannan@codeaurora.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	sgurrappadi@nvidia.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended
Date: Mon, 5 Feb 2018 09:31:18 +0530	[thread overview]
Message-ID: <20180205040118.GB28462@vireshk-i7> (raw)
In-Reply-To: <dc33ef16-9684-3d8d-f4cc-6e24697f007f@nvidia.com>

On 02-02-18, 13:28, Bo Yan wrote:
> On 02/02/2018 11:34 AM, Saravana Kannan wrote:
> >I rather have this fixed in the dpm_suspend/resume() code. This is just
> >masking the first issue that's being caused by unbalanced error handling.
> >If that means adding flags in dpm_suspend/resume() then that's what we
> >should do right now and clean it up later if it can be improved. Making
> >cpufreq more messy doesn't seem like the right answer.

+1

> dpm_suspend and dpm_resume by themselves are not balanced in this particular
> case. As it's currently structured, dpm_resume can't be omitted even if
> dpm_suspend is skipped due to earlier failure.  I think checking
> cpufreq_suspended flag is a reasonable compromise. If we can find a way to
> make dpm_suspend/dpm_resume also balanced, that will be best.

I think cpufreq is just one of the users which broke. Others didn't break
because:

- They don't have a complicated resume part.
- Or we just don't know that they broke.

Resuming something that never suspended is just broken by design. Yeah, its much
simpler in this particular case to fix cpufreq core but the
suspend/resume/hibernation part is really core kernel and should be fixed to
avoid such band-aids.

-- 
viresh

  reply	other threads:[~2018-02-05  4:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 21:57 [PATCH] cpufreq: skip cpufreq resume if it's not suspended Bo Yan
2018-01-24  2:02 ` Rafael J. Wysocki
2018-01-24 20:53   ` Bo Yan
2018-02-02 11:54     ` Rafael J. Wysocki
2018-02-02 19:34       ` Saravana Kannan
2018-02-02 21:28         ` Bo Yan
2018-02-05  4:01           ` Viresh Kumar [this message]
2018-02-05  8:50             ` Rafael J. Wysocki
2018-02-05  9:05               ` Viresh Kumar
2018-02-15 21:27                 ` Saravana Kannan
2018-02-15 22:06                   ` Rafael J. Wysocki
2018-01-25 19:15   ` [PATCH v2] " Bo Yan
2018-02-05  9:19 ` [PATCH] " Rafael J. Wysocki
2018-02-05  9:23   ` Viresh Kumar

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=20180205040118.GB28462@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=byan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sgurrappadi@nvidia.com \
    --cc=skannan@codeaurora.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;
as well as URLs for NNTP newsgroup(s).