All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Chen Yu <yu.c.chen@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org,
	Artem S Tashkinov <t.artem@mailcity.com>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH][v2] sched: cpufreq: Fix long idle judgement logic in load calculation
Date: Fri, 8 Jun 2018 09:34:13 +0530	[thread overview]
Message-ID: <20180608040413.2pjfr6by3me5qymk@vireshk-i7> (raw)
In-Reply-To: <1528420053-22884-1-git-send-email-yu.c.chen@intel.com>

On 08-06-18, 09:07, Chen Yu wrote:
> According to current code implementation, detecting the long
> idle period is done by checking if the interval between two
> adjacent utilization update handers is long enough. Although
> this mechanism can detect if the idle period is long enough
> (no utilization hooks invoked during idle period), it might
> not contain a corner case: if the task has occupied the cpu
> for too long which causes no context switch during that
> period, then no utilization handler will be launched until this
> high prio task is switched out. As a result, the idle_periods
> field might be calculated incorrectly because it regards the
> 100% load as 0% and makes the conservative governor who uses
> this field confusing.
> 
> Change the judgement to compare the idle_time with sampling_rate
> directly.
> 
> Reported-by: Artem S. Tashkinov <t.artem@mailcity.com>
> Cc: Artem S Tashkinov <t.artem@mailcity.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> ---
> v2: Per Viresh's suggestion, ignore idle_time longer than 30mins and
>     simplify the code.
> ---
>  drivers/cpufreq/cpufreq_governor.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

  reply	other threads:[~2018-06-08  4:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08  1:07 [PATCH][v2] sched: cpufreq: Fix long idle judgement logic in load calculation Chen Yu
2018-06-08  4:04 ` Viresh Kumar [this message]
2018-06-12 15:05   ` 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=20180608040413.2pjfr6by3me5qymk@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=t.artem@mailcity.com \
    --cc=yu.c.chen@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 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.