mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Chunyan Zhang <chunyan.zhang@unisoc.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Vincent Wang <vincent.wang@unisoc.com>,
	Quentin Perret <quentin.perret@arm.com>,
	linux-kernel@vger.kernel.org,
	Chunyan Zhang <zhang.lyra@gmail.com>
Subject: Re: [PATCH V2] sched/cpufreq: calculate util / cap in advance in map_util_freq()
Date: Fri, 18 Jan 2019 17:16:16 +0100	[thread overview]
Message-ID: <20190118161616.GH14054@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <1547089325-15691-1-git-send-email-chunyan.zhang@unisoc.com>

On Thu, Jan 10, 2019 at 11:02:05AM +0800, Chunyan Zhang wrote:
> From: Vincent Wang <vincent.wang@unisoc.com>
> 
> When a task that is in_iowait state is enqueued, cpufreq_update_util()
> will be invoked with SCHED_CPUFREQ_IOWAIT flag. In this case,the value
> of util and cap, which are parameters used in map_util_freq(), will be
> cpu frequency, instead of cpu util and capactiy.
> 
> For some 32bit architectures, the size of unsigned long is 32. When
> calculating freq, there may be an overflow error in this expression:

Would it not be much better to fix that one case instead of adding extra
instructions for everyone all the time?

      reply	other threads:[~2019-01-18 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  3:02 Chunyan Zhang
2019-01-18 16:16 ` Peter Zijlstra [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=20190118161616.GH14054@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=chunyan.zhang@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=quentin.perret@arm.com \
    --cc=vincent.wang@unisoc.com \
    --cc=zhang.lyra@gmail.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

Powered by JetHome