From: kbuild test robot <lkp@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild-all@01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: [mmotm:master 172/329] kernel/sched/psi.c:180:2: note: in expansion of macro 'do_div'
Date: Tue, 17 Jul 2018 09:13:10 +0800 [thread overview]
Message-ID: <20180717011310.GT10593@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8275 bytes --]
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: fa5441daae8ad99af4e198bcd4d57cffdd582961
commit: 15c9e6e504f28a6661ba9deedee8d766f2e07c38 [172/329] psi-pressure-stall-information-for-cpu-memory-and-io-fix-fix
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 15c9e6e504f28a6661ba9deedee8d766f2e07c38
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
All warnings (new ones prefixed by >>):
In file included from arch/arm/include/asm/div64.h:127:0,
from include/linux/kernel.h:174,
from include/asm-generic/bug.h:18,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/seq_file.h:7,
from kernel/sched/psi.c:128:
kernel/sched/psi.c: In function 'calc_avgs':
include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
>> kernel/sched/psi.c:180:2: note: in expansion of macro 'do_div'
do_div(pct, psi_period);
^~~~~~
In file included from include/linux/string.h:6:0,
from include/linux/seq_file.h:6,
from kernel/sched/psi.c:128:
include/asm-generic/div64.h:235:25: warning: right shift count >= width of type [-Wshift-count-overflow]
} else if (likely(((n) >> 32) == 0)) { \
^
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
>> kernel/sched/psi.c:180:2: note: in expansion of macro 'do_div'
do_div(pct, psi_period);
^~~~~~
In file included from arch/arm/include/asm/div64.h:127:0,
from include/linux/kernel.h:174,
from include/asm-generic/bug.h:18,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/seq_file.h:7,
from kernel/sched/psi.c:128:
include/asm-generic/div64.h:239:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
__rem = __div64_32(&(n), __base); \
^
>> kernel/sched/psi.c:180:2: note: in expansion of macro 'do_div'
do_div(pct, psi_period);
^~~~~~
In file included from include/linux/kernel.h:174:0,
from include/asm-generic/bug.h:18,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/seq_file.h:7,
from kernel/sched/psi.c:128:
arch/arm/include/asm/div64.h:33:24: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'long unsigned int *'
static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
^~~~~~~~~~
cc1: some warnings being treated as errors
git remote add mmotm git://git.cmpxchg.org/linux-mmotm.git
git remote update mmotm
git checkout 15c9e6e504f28a6661ba9deedee8d766f2e07c38
vim +/do_div +180 kernel/sched/psi.c
60ad478b Johannes Weiner 2018-07-14 @128 #include <linux/seq_file.h>
60ad478b Johannes Weiner 2018-07-14 129 #include <linux/proc_fs.h>
60ad478b Johannes Weiner 2018-07-14 130 #include <linux/cgroup.h>
60ad478b Johannes Weiner 2018-07-14 131 #include <linux/module.h>
60ad478b Johannes Weiner 2018-07-14 132 #include <linux/sched.h>
60ad478b Johannes Weiner 2018-07-14 133 #include <linux/psi.h>
60ad478b Johannes Weiner 2018-07-14 134 #include "sched.h"
60ad478b Johannes Weiner 2018-07-14 135
60ad478b Johannes Weiner 2018-07-14 136 static int psi_bug __read_mostly;
60ad478b Johannes Weiner 2018-07-14 137
60ad478b Johannes Weiner 2018-07-14 138 bool psi_disabled __read_mostly;
60ad478b Johannes Weiner 2018-07-14 139 core_param(psi_disabled, psi_disabled, bool, 0644);
60ad478b Johannes Weiner 2018-07-14 140
60ad478b Johannes Weiner 2018-07-14 141 /* Running averages - we need to be higher-res than loadavg */
60ad478b Johannes Weiner 2018-07-14 142 #define PSI_FREQ (2*HZ+1) /* 2 sec intervals */
60ad478b Johannes Weiner 2018-07-14 143 #define EXP_10s 1677 /* 1/exp(2s/10s) as fixed-point */
60ad478b Johannes Weiner 2018-07-14 144 #define EXP_60s 1981 /* 1/exp(2s/60s) */
60ad478b Johannes Weiner 2018-07-14 145 #define EXP_300s 2034 /* 1/exp(2s/300s) */
60ad478b Johannes Weiner 2018-07-14 146
60ad478b Johannes Weiner 2018-07-14 147 /* Sampling frequency in nanoseconds */
60ad478b Johannes Weiner 2018-07-14 148 static u64 psi_period __read_mostly;
60ad478b Johannes Weiner 2018-07-14 149
60ad478b Johannes Weiner 2018-07-14 150 /* System-level pressure and stall tracking */
60ad478b Johannes Weiner 2018-07-14 151 static DEFINE_PER_CPU(struct psi_group_cpu, system_group_cpus);
60ad478b Johannes Weiner 2018-07-14 152 static struct psi_group psi_system = {
60ad478b Johannes Weiner 2018-07-14 153 .cpus = &system_group_cpus,
60ad478b Johannes Weiner 2018-07-14 154 };
60ad478b Johannes Weiner 2018-07-14 155
60ad478b Johannes Weiner 2018-07-14 156 static void psi_clock(struct work_struct *work);
60ad478b Johannes Weiner 2018-07-14 157
60ad478b Johannes Weiner 2018-07-14 158 static void psi_group_init(struct psi_group *group)
60ad478b Johannes Weiner 2018-07-14 159 {
60ad478b Johannes Weiner 2018-07-14 160 group->period_expires = jiffies + PSI_FREQ;
60ad478b Johannes Weiner 2018-07-14 161 INIT_DELAYED_WORK(&group->clock_work, psi_clock);
60ad478b Johannes Weiner 2018-07-14 162 mutex_init(&group->stat_lock);
60ad478b Johannes Weiner 2018-07-14 163 }
60ad478b Johannes Weiner 2018-07-14 164
60ad478b Johannes Weiner 2018-07-14 165 void __init psi_init(void)
60ad478b Johannes Weiner 2018-07-14 166 {
60ad478b Johannes Weiner 2018-07-14 167 if (psi_disabled)
60ad478b Johannes Weiner 2018-07-14 168 return;
60ad478b Johannes Weiner 2018-07-14 169
60ad478b Johannes Weiner 2018-07-14 170 psi_period = jiffies_to_nsecs(PSI_FREQ);
60ad478b Johannes Weiner 2018-07-14 171 psi_group_init(&psi_system);
60ad478b Johannes Weiner 2018-07-14 172 }
60ad478b Johannes Weiner 2018-07-14 173
60ad478b Johannes Weiner 2018-07-14 174 static void calc_avgs(unsigned long avg[3], u64 time, int missed_periods)
60ad478b Johannes Weiner 2018-07-14 175 {
60ad478b Johannes Weiner 2018-07-14 176 unsigned long pct;
60ad478b Johannes Weiner 2018-07-14 177
60ad478b Johannes Weiner 2018-07-14 178 /* Sample the most recent active period */
15c9e6e5 Andrew Morton 2018-07-14 179 pct = time * 100;
15c9e6e5 Andrew Morton 2018-07-14 @180 do_div(pct, psi_period);
60ad478b Johannes Weiner 2018-07-14 181 pct *= FIXED_1;
60ad478b Johannes Weiner 2018-07-14 182 avg[0] = calc_load(avg[0], EXP_10s, pct);
60ad478b Johannes Weiner 2018-07-14 183 avg[1] = calc_load(avg[1], EXP_60s, pct);
60ad478b Johannes Weiner 2018-07-14 184 avg[2] = calc_load(avg[2], EXP_300s, pct);
60ad478b Johannes Weiner 2018-07-14 185
60ad478b Johannes Weiner 2018-07-14 186 /* Fill in zeroes for periods of no activity */
60ad478b Johannes Weiner 2018-07-14 187 if (missed_periods) {
60ad478b Johannes Weiner 2018-07-14 188 avg[0] = calc_load_n(avg[0], EXP_10s, 0, missed_periods);
60ad478b Johannes Weiner 2018-07-14 189 avg[1] = calc_load_n(avg[1], EXP_60s, 0, missed_periods);
60ad478b Johannes Weiner 2018-07-14 190 avg[2] = calc_load_n(avg[2], EXP_300s, 0, missed_periods);
60ad478b Johannes Weiner 2018-07-14 191 }
60ad478b Johannes Weiner 2018-07-14 192 }
60ad478b Johannes Weiner 2018-07-14 193
---
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: 66085 bytes --]
reply other threads:[~2018-07-17 1:02 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=20180717011310.GT10593@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.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.