linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Radivoje Jovanovic <radivoje.jovanovic@linux.intel.com>
Cc: Punit Agrawal <punit.agrawal@arm.com>,
	rjw@rjwysocki.net, LKML <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Radivoje Jovanovic <radivoje.jovanovic@intel.com>
Subject: Re: [PATCH] thermal/cpu_cooling: remove local cooling state variable
Date: Fri, 31 Jul 2015 08:48:41 +0530	[thread overview]
Message-ID: <20150731031841.GH17794@linux> (raw)
In-Reply-To: <20150730132130.3c957267@radivoje-desk2>

Thanks.

I will try to add more layman terms here to map cooling state with
frequencies. So, the cooling state 0 maps to the highest frequency the
cpufreq table supports, and the highest cooling state n maps to the
lowest frequency. Right ?

On 30-07-15, 13:21, Radivoje Jovanovic wrote:
> In this case both userspace thermal solution and cpu_cooling are
> changing policy->max and the userspace solution will let governor or HW
> (depends on architecture) decide the clipped-freq. Now let us say that
> cpu_cooling has 4 available states 0-3

Lets say: 0 == 1.2 GHz
          1 == 1.1 GHz
          2 == 1 GHz
          3 == 800 MHz

> and let us say that cpu_cooling
> has set the state 1 as the last state.

i.e. cpu_cooling says "don't go over 1.1 GHz"..

> Now userspace component comes in
> and changes the state of the system that matches cpu_cooling state 0.

So, policy->max reaches 1.2 GHz and that is not in sync with
cpu_cooling. Right ?

> cpu_cooling is unaware of this change and does not change the local
> cur_state.

That's where I think you one of us might be incorrect. At this point
when policy->max is changed to 1.2 GHz, a notifier will get issued to
cpu_cooling, which will bring policy->max again to 1.1 GHz and so
things will be back in control.

> Now the temperature changes and cpu_cooling should change
> the system state to 1 (userspace component malfunctioned and is not
> picking up this change) but since the cur_state is already at 1
> cpu_cooling will not do anything since it believes it is in the correct
> state. Hope this explains it better

-- 
viresh

  reply	other threads:[~2015-07-31  3:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 22:13 [PATCH] thermal/cpu_cooling: remove local cooling state variable Radivoje Jovanovic
2015-07-24 15:26 ` Punit Agrawal
2015-07-24 17:09   ` Radivoje Jovanovic
2015-07-29 16:46     ` Punit Agrawal
2015-07-29 17:00       ` Radivoje Jovanovic
2015-07-30  8:05       ` Viresh Kumar
2015-07-30 20:21         ` Radivoje Jovanovic
2015-07-31  3:18           ` Viresh Kumar [this message]
2015-07-31 15:30             ` Radivoje Jovanovic
2015-08-01 11:34               ` Viresh Kumar
2015-08-03  3:13                 ` Viresh Kumar
2015-08-03 19:28                   ` Radivoje Jovanovic

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=20150731031841.GH17794@linux \
    --to=viresh.kumar@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=punit.agrawal@arm.com \
    --cc=radivoje.jovanovic@intel.com \
    --cc=radivoje.jovanovic@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).