From: kbuild test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
tipbuild@zytor.com, Ingo Molnar <mingo@kernel.org>
Subject: [tip:sched/urgent 1/5] kernel/sched/cpufreq_schedutil.c:346:26: note: in expansion of macro 'min'
Date: Sun, 10 Mar 2019 07:41:22 +0800 [thread overview]
Message-ID: <201903100720.uk4snqnu%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3675 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/urgent
head: ce28d2e53cda890771360d32259495dd6a9c4253
commit: f1212844e9dc3a31d41f99713c5522acf92ff291 [1/5] sched/cpufreq: Fix 32-bit math overflow
config: i386-randconfig-s2-201910 (attached as .config)
compiler: gcc-6 (Debian 6.5.0-2) 6.5.0 20181026
reproduce:
git checkout f1212844e9dc3a31d41f99713c5522acf92ff291
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/percpu.h:45:0,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/cpufreq_schedutil.c:11:
kernel/sched/cpufreq_schedutil.c: In function 'sugov_iowait_boost':
include/linux/kernel.h:846:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:860:4: note: in expansion of macro '__typecheck'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~
include/linux/kernel.h:870:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
>> kernel/sched/cpufreq_schedutil.c:346:26: note: in expansion of macro 'min'
sg_cpu->iowait_boost = min(sg_cpu->iowait_boost << 1, SCHED_CAPACITY_SCALE);
^~~
vim +/min +346 kernel/sched/cpufreq_schedutil.c
311
312 /**
313 * sugov_iowait_boost() - Updates the IO boost status of a CPU.
314 * @sg_cpu: the sugov data for the CPU to boost
315 * @time: the update time from the caller
316 * @flags: SCHED_CPUFREQ_IOWAIT if the task is waking up after an IO wait
317 *
318 * Each time a task wakes up after an IO operation, the CPU utilization can be
319 * boosted to a certain utilization which doubles at each "frequent and
320 * successive" wakeup from IO, ranging from the utilization of the minimum
321 * OPP to the utilization of the maximum OPP.
322 * To keep doubling, an IO boost has to be requested at least once per tick,
323 * otherwise we restart from the utilization of the minimum OPP.
324 */
325 static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
326 unsigned int flags)
327 {
328 bool set_iowait_boost = flags & SCHED_CPUFREQ_IOWAIT;
329
330 /* Reset boost if the CPU appears to have been idle enough */
331 if (sg_cpu->iowait_boost &&
332 sugov_iowait_reset(sg_cpu, time, set_iowait_boost))
333 return;
334
335 /* Boost only tasks waking up after IO */
336 if (!set_iowait_boost)
337 return;
338
339 /* Ensure boost doubles only one time at each request */
340 if (sg_cpu->iowait_boost_pending)
341 return;
342 sg_cpu->iowait_boost_pending = true;
343
344 /* Double the boost at each request */
345 if (sg_cpu->iowait_boost) {
> 346 sg_cpu->iowait_boost = min(sg_cpu->iowait_boost << 1, SCHED_CAPACITY_SCALE);
347 return;
348 }
349
350 /* First wakeup after IO: start with minimum boost */
351 sg_cpu->iowait_boost = sg_cpu->min;
352 }
353
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28597 bytes --]
reply other threads:[~2019-03-09 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201903100720.uk4snqnu%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tipbuild@zytor.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).