linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Brian Norris <briannorris@chromium.org>
Subject: Re: [RFC PATCH] PM / devfreq: Add policy notifier
Date: Fri, 18 May 2018 09:25:25 -0700	[thread overview]
Message-ID: <20180518162525.GA29467@google.com> (raw)
In-Reply-To: <5AFE0FA6.4020101@samsung.com>

On Fri, May 18, 2018 at 08:26:30AM +0900, Chanwoo Choi wrote:
> Hi,
> 
> On 2018년 05월 18일 08:07, Matthias Kaehlcke wrote:
> > Hi,
> > 
> > On Thu, May 17, 2018 at 11:01:34AM +0900, Chanwoo Choi wrote:
> >> Hi,
> >>
> >> Could you give some use-case of DEVFREQ_POLICY_NOTIFIER
> >> or send use-case patch with this patch?
> > 
> > This is a WIP patch that makes use of the DEVFREQ_POLICY_NOTIFIER:
> > 
> > https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1065122
> > 
> >> I already knew the CPUFREQ_POLICY_NOTIFIER.
> >> But, until now, there are no any requirements of DEVFREQ_POLICY_NOTIFIER.
> >> If there are no any use-case, it is not necessary codes.
> > 
> > Sure, I intend to land the above driver upstream if devfreq can
> > provide the necessary interfaces.
> 
> I recommend that you should send the patch with the use-case patch.

One of the reasons this patch was sent as an RFC was to get an idea
whether it would be feasible to add support for
DEVFREQ_POLICY_NOTIFIER before spending much time implementing a
driver that relies on it, and then possibly hear that it's not going
to fly.

However since you didn't voice general concerns about the idea I made
progress with the driver in the last days. I'll polish it a bit more
and send it in a series with related devfreq patches.

> >> On 2018년 05월 16일 06:24, Matthias Kaehlcke wrote:
> >>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> >>> index fe2af6aa88fc..a7294c056f65 100644
> >>> --- a/drivers/devfreq/devfreq.c
> >>> +++ b/drivers/devfreq/devfreq.c
> >>> @@ -273,6 +273,9 @@ int update_devfreq(struct devfreq *devfreq)
> >>>  	if (err)
> >>>  		return err;
> >>>  
> >>> +	srcu_notifier_call_chain(&devfreq->policy_notifier_list,
> >>> +			DEVFREQ_ADJUST, &freq);
> >>
> >> It is not proper to used 'freq' as the passed data.
> >> In current step,'freq' is not adjusted and is not final decided
> >> frequency.
> > 
> > Right, the next revision will pass a struct devfreq_policy instead,
> > where the notifiers can adjust the min/max values, similar to what
> > cpufreq does.
> 
> Actually, I don't know the devfreq_policy(?). As I already commented,
> it is not proper to discuss it because there is no any real code and patches.
> It is difficult to understand for me.

      reply	other threads:[~2018-05-18 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180515212545epcas1p2bdfd9c90f2ce6b74ac0fdd8cd9f9f63b@epcas1p2.samsung.com>
2018-05-15 21:24 ` [RFC PATCH] PM / devfreq: Add policy notifier Matthias Kaehlcke
2018-05-17  2:01   ` Chanwoo Choi
2018-05-17 23:07     ` Matthias Kaehlcke
2018-05-17 23:26       ` Chanwoo Choi
2018-05-18 16:25         ` Matthias Kaehlcke [this message]

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=20180518162525.GA29467@google.com \
    --to=mka@chromium.org \
    --cc=briannorris@chromium.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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).