public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Radivoje Jovanovic <radivoje.jovanovic@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
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: Sat, 1 Aug 2015 17:04:05 +0530	[thread overview]
Message-ID: <20150801113405.GL899@linux> (raw)
In-Reply-To: <20150731083003.2f47ca5f@radivoje-desk2>

On 31-07-15, 08:30, Radivoje Jovanovic wrote:
> I just looked over the notifier in the current upstream (my patch was
> made on our production kernel which is 3.14 and has old notifier
> implementation with notifier_device in place) and I see your point.

That's disappointing. You were expected to check if the same problem
exists in mainline.

> I agree with you that this patch is trivial for the current
> implementation since the notifier, as it is currently, will enforce
> cpu_cooling policy change at every CPUFREQ_ADJUST which would cause
> problems in our current implementation. In our implementation there is
> a cpufreq driver that will also change policies during CPUFREQ_ADJUST,
> once the request comes from the underlying FW so there would be a fight
> who gets there first since cpu_cooling will change the policy in
> CPUFREQ_ADJUST notifier_chain and the driver would do the same thing.
> It seems to me that better implementation of the cpu_cooling notifer
> would be to keep the flag and change the policy in CPUFREQ_ADJUST only
> when the change was requested by cpu_cooling, and update the current
> state of cpufreq_cooling_device during CPUFREQ_NOTIFY event.
> What do you think?

I think the way cpu-cooling is written today, is an *ugly* hack. We hack
the notifier to change policy->max and no one is notified for it.

That's crap.

I would rather get some help from cpufreq core on that. Which can
provide some APIs to take care of thermal considerations.

Okay, I push that to my todo list. Will keep you all posted.

-- 
viresh

  reply	other threads:[~2015-08-01 11:34 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
2015-07-31 15:30             ` Radivoje Jovanovic
2015-08-01 11:34               ` Viresh Kumar [this message]
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=20150801113405.GL899@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