All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Leonard Crestez <leonard.crestez@nxp.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Saravana Kannan <saravanak@google.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] cpufreq: Add user_min/max_freq
Date: Thu, 31 Oct 2019 15:23:56 -0700	[thread overview]
Message-ID: <20191031222356.GE27773@google.com> (raw)
In-Reply-To: <3169109.BFaCN5124U@kreacher>

On Thu, Oct 31, 2019 at 11:24:31AM +0100, Rafael J. Wysocki wrote:
> On Wednesday, October 30, 2019 1:41:49 AM CET Leonard Crestez wrote:
> > Current values in scaling_min_freq and scaling_max freq can change on
> > the fly due to event such as thermal monitoring.
> 
> Which is intentional.
> 
> > This behavior is confusing for userspace and because once an userspace
> > limit is written to scaling_min/max_freq it is not possible to read it back.
> 
> That can be argued both ways.
> 
> It is also useful to know the effective constraints and arguably the ability
> to read back the values that you have written is mostly needed for debugging
> the code.

Agreed that reading the values back is probably mostly useful for debugging.

Reading the effective constraints is a debugging use case as well, userspace
can't make any decisions based on values which might be in constant flux.

IMO the current interface is completely counterintuitive, I really hope we
wouldn't implement it the same way if given a chance to do it again. If there
is use for reading the effective constraints it should be exposed as a separate
read-only attribute. Keep it simple (when possible).

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Kaehlcke <mka@chromium.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Saravana Kannan <saravanak@google.com>,
	linux-pm@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Leonard Crestez <leonard.crestez@nxp.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] cpufreq: Add user_min/max_freq
Date: Thu, 31 Oct 2019 15:23:56 -0700	[thread overview]
Message-ID: <20191031222356.GE27773@google.com> (raw)
In-Reply-To: <3169109.BFaCN5124U@kreacher>

On Thu, Oct 31, 2019 at 11:24:31AM +0100, Rafael J. Wysocki wrote:
> On Wednesday, October 30, 2019 1:41:49 AM CET Leonard Crestez wrote:
> > Current values in scaling_min_freq and scaling_max freq can change on
> > the fly due to event such as thermal monitoring.
> 
> Which is intentional.
> 
> > This behavior is confusing for userspace and because once an userspace
> > limit is written to scaling_min/max_freq it is not possible to read it back.
> 
> That can be argued both ways.
> 
> It is also useful to know the effective constraints and arguably the ability
> to read back the values that you have written is mostly needed for debugging
> the code.

Agreed that reading the values back is probably mostly useful for debugging.

Reading the effective constraints is a debugging use case as well, userspace
can't make any decisions based on values which might be in constant flux.

IMO the current interface is completely counterintuitive, I really hope we
wouldn't implement it the same way if given a chance to do it again. If there
is use for reading the effective constraints it should be exposed as a separate
read-only attribute. Keep it simple (when possible).

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-10-31 22:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  0:41 [PATCH] cpufreq: Add user_min/max_freq Leonard Crestez
2019-10-30  0:41 ` Leonard Crestez
2019-10-30 19:18 ` Matthias Kaehlcke
2019-10-30 19:18   ` Matthias Kaehlcke
2019-10-31 10:24 ` Rafael J. Wysocki
2019-10-31 10:24   ` Rafael J. Wysocki
2019-10-31 13:01   ` Leonard Crestez
2019-10-31 13:01     ` Leonard Crestez
2019-10-31 21:05     ` Rafael J. Wysocki
2019-10-31 21:05       ` Rafael J. Wysocki
2019-10-31 22:23   ` Matthias Kaehlcke [this message]
2019-10-31 22:23     ` Matthias Kaehlcke
2019-11-01 12:03     ` Rafael J. Wysocki
2019-11-01 12:03       ` Rafael J. Wysocki

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=20191031222356.GE27773@google.com \
    --to=mka@chromium.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rjw@rjwysocki.net \
    --cc=saravanak@google.com \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.