From: kernel test robot <lkp@intel.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [qais-yousef:uclamp-max-aggregation 2/2] kernel/sched/core.c:7115:10: error: call to undeclared function 'uclamp_util_with'; ISO C99 and later do not support implicit function declarations
Date: Sun, 3 Sep 2023 11:21:05 +0800 [thread overview]
Message-ID: <202309031109.DNJnGquN-lkp@intel.com> (raw)
tree: https://github.com/qais-yousef/linux uclamp-max-aggregation
head: 1c5e789f50e8f3bce19ec226e1971186ab7d35c6
commit: 1c5e789f50e8f3bce19ec226e1971186ab7d35c6 [2/2] sched/uclamp: Remove rq max aggregation
config: i386-buildonly-randconfig-003-20230903 (https://download.01.org/0day-ci/archive/20230903/202309031109.DNJnGquN-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230903/202309031109.DNJnGquN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309031109.DNJnGquN-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/sched/core.c:7115:10: error: call to undeclared function 'uclamp_util_with'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
util = uclamp_util_with(util, p);
^
kernel/sched/core.c:7115:10: note: did you mean 'uclamp_rq_util_with'?
kernel/sched/sched.h:3029:15: note: 'uclamp_rq_util_with' declared here
unsigned long uclamp_rq_util_with(struct rq *rq, unsigned long util,
^
1 error generated.
vim +/uclamp_util_with +7115 kernel/sched/core.c
7056
7057 #ifdef CONFIG_SMP
7058 /*
7059 * This function computes an effective utilization for the given CPU, to be
7060 * used for frequency selection given the linear relation: f = u * f_max.
7061 *
7062 * The scheduler tracks the following metrics:
7063 *
7064 * cpu_util_{cfs,rt,dl,irq}()
7065 * cpu_bw_dl()
7066 *
7067 * Where the cfs,rt and dl util numbers are tracked with the same metric and
7068 * synchronized windows and are thus directly comparable.
7069 *
7070 * The cfs,rt,dl utilization are the running times measured with rq->clock_task
7071 * which excludes things like IRQ and steal-time. These latter are then accrued
7072 * in the irq utilization.
7073 *
7074 * The DL bandwidth number otoh is not a measured metric but a value computed
7075 * based on the task model parameters and gives the minimal utilization
7076 * required to meet deadlines.
7077 */
7078 unsigned long effective_cpu_util(int cpu, unsigned long util_cfs,
7079 enum cpu_util_type type,
7080 struct task_struct *p)
7081 {
7082 unsigned long dl_util, util, irq, max;
7083 struct rq *rq = cpu_rq(cpu);
7084
7085 max = arch_scale_cpu_capacity(cpu);
7086
7087 if (!IS_ENABLED(CONFIG_UCLAMP_TASK) &&
7088 type == FREQUENCY_UTIL && rt_rq_is_runnable(&rq->rt)) {
7089 return max;
7090 }
7091
7092 /*
7093 * Early check to see if IRQ/steal time saturates the CPU, can be
7094 * because of inaccuracies in how we track these -- see
7095 * update_irq_load_avg().
7096 */
7097 irq = cpu_util_irq(rq);
7098 if (unlikely(irq >= max))
7099 return max;
7100
7101 /*
7102 * Because the time spend on RT/DL tasks is visible as 'lost' time to
7103 * CFS tasks and we use the same metric to track the effective
7104 * utilization (PELT windows are synchronized) we can directly add them
7105 * to obtain the CPU's actual utilization.
7106 *
7107 * CFS and RT utilization can be boosted or capped, depending on
7108 * utilization clamp constraints requested by currently RUNNABLE
7109 * tasks.
7110 * When there are no CFS RUNNABLE tasks, clamps are released and
7111 * frequency will be gracefully reduced with the utilization decay.
7112 */
7113 util = util_cfs + cpu_util_rt(rq);
7114 if (type == FREQUENCY_UTIL)
> 7115 util = uclamp_util_with(util, p);
7116
7117 dl_util = cpu_util_dl(rq);
7118
7119 /*
7120 * For frequency selection we do not make cpu_util_dl() a permanent part
7121 * of this sum because we want to use cpu_bw_dl() later on, but we need
7122 * to check if the CFS+RT+DL sum is saturated (ie. no idle time) such
7123 * that we select f_max when there is no idle time.
7124 *
7125 * NOTE: numerical errors or stop class might cause us to not quite hit
7126 * saturation when we should -- something for later.
7127 */
7128 if (util + dl_util >= max)
7129 return max;
7130
7131 /*
7132 * OTOH, for energy computation we need the estimated running time, so
7133 * include util_dl and ignore dl_bw.
7134 */
7135 if (type == ENERGY_UTIL)
7136 util += dl_util;
7137
7138 /*
7139 * There is still idle time; further improve the number by using the
7140 * irq metric. Because IRQ/steal time is hidden from the task clock we
7141 * need to scale the task numbers:
7142 *
7143 * max - irq
7144 * U' = irq + --------- * U
7145 * max
7146 */
7147 util = scale_irq_capacity(util, irq, max);
7148 util += irq;
7149
7150 /*
7151 * Bandwidth required by DEADLINE must always be granted while, for
7152 * FAIR and RT, we use blocked utilization of IDLE CPUs as a mechanism
7153 * to gracefully reduce the frequency when no tasks show up for longer
7154 * periods of time.
7155 *
7156 * Ideally we would like to set bw_dl as min/guaranteed freq and util +
7157 * bw_dl as requested freq. However, cpufreq is not yet ready for such
7158 * an interface. So, we only do the latter for now.
7159 */
7160 if (type == FREQUENCY_UTIL)
7161 util += cpu_bw_dl(rq);
7162
7163 return min(max, util);
7164 }
7165
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-09-03 3:21 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=202309031109.DNJnGquN-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=qyousef@layalina.io \
/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.