Re: [PATCH 2/2] sched/fair: util_est: add running_sum tracking
From: kbuild test robot
Date: Mon Jun 04 2018 - 22:27:09 EST
Hi Patrick,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/sched/core]
[also build test ERROR on next-20180604]
[cannot apply to v4.17]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Patrick-Bellasi/sched-fair-pelt-use-u32-for-util_avg/20180605-082640
config: x86_64-randconfig-x011-201822 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
kernel/sched/fair.c: In function 'enqueue_task_fair':
>> kernel/sched/fair.c:5450:2: error: implicit declaration of function 'util_est_enqueue_running'; did you mean 'util_est_enqueue'? [-Werror=implicit-function-declaration]
util_est_enqueue_running(p);
^~~~~~~~~~~~~~~~~~~~~~~~
util_est_enqueue
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 1 arch/x86/include/asm/atomic64_64.h:arch_atomic64_add
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic64_add
Cyclomatic Complexity 2 arch/x86/include/asm/jump_label.h:arch_static_branch
Cyclomatic Complexity 1 include/linux/jump_label.h:static_key_false
Cyclomatic Complexity 1 include/linux/math64.h:mul_u64_u32_shr
Cyclomatic Complexity 2 include/linux/thread_info.h:test_ti_thread_flag
Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add
Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:__preempt_count_dec_and_test
Cyclomatic Complexity 1 include/linux/lockdep.h:lock_is_held
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_unlock
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock_sched_notrace
Cyclomatic Complexity 2 include/linux/rcupdate.h:rcu_read_unlock_sched_notrace
Cyclomatic Complexity 1 include/linux/rbtree.h:rb_link_node
Cyclomatic Complexity 1 include/linux/sched.h:task_thread_info
Cyclomatic Complexity 1 include/linux/sched.h:test_tsk_thread_flag
Cyclomatic Complexity 1 include/linux/sched.h:test_tsk_need_resched
Cyclomatic Complexity 1 include/linux/sched.h:task_cpu
Cyclomatic Complexity 1 include/linux/sched/cputime.h:get_running_cputimer
Cyclomatic Complexity 2 include/linux/sched/cputime.h:account_group_exec_runtime
Cyclomatic Complexity 1 include/linux/cgroup.h:task_css_set
Cyclomatic Complexity 1 include/linux/cgroup.h:task_dfl_cgroup
Cyclomatic Complexity 3 include/linux/cgroup.h:cgroup_parent
Cyclomatic Complexity 1 include/linux/cgroup.h:cpuacct_charge
Cyclomatic Complexity 2 include/linux/cgroup.h:cgroup_account_cputime
Cyclomatic Complexity 1 kernel/sched/sched.h:cpu_of
Cyclomatic Complexity 1 kernel/sched/sched.h:assert_clock_updated
Cyclomatic Complexity 4 kernel/sched/sched.h:rq_clock
Cyclomatic Complexity 4 kernel/sched/sched.h:rq_clock_task
Cyclomatic Complexity 4 kernel/sched/sched.h:rq_clock_skip_update
Cyclomatic Complexity 1 kernel/sched/sched.h:rq_pin_lock
Cyclomatic Complexity 1 kernel/sched/sched.h:rq_unpin_lock
Cyclomatic Complexity 1 kernel/sched/sched.h:task_on_rq_queued
Cyclomatic Complexity 1 kernel/sched/sched.h:put_prev_task
Cyclomatic Complexity 1 kernel/sched/sched.h:sched_update_tick_dependency
Cyclomatic Complexity 2 kernel/sched/sched.h:add_nr_running
Cyclomatic Complexity 1 kernel/sched/sched.h:sub_nr_running
Cyclomatic Complexity 1 kernel/sched/sched.h:hrtick_enabled
Cyclomatic Complexity 1 kernel/sched/sched.h:rq_lock
Cyclomatic Complexity 1 kernel/sched/sched.h:rq_unlock
Cyclomatic Complexity 2 kernel/sched/sched.h:cpufreq_update_util
Cyclomatic Complexity 4 include/trace/events/sched.h:trace_sched_stat_runtime
Cyclomatic Complexity 1 kernel/sched/fair.c:update_load_add
Cyclomatic Complexity 1 kernel/sched/fair.c:update_load_sub
Cyclomatic Complexity 1 kernel/sched/fair.c:update_load_set
Cyclomatic Complexity 2 kernel/sched/fair.c:task_of
Cyclomatic Complexity 2 kernel/sched/fair.c:rq_of
Cyclomatic Complexity 1 kernel/sched/fair.c:task_cfs_rq
Cyclomatic Complexity 1 kernel/sched/fair.c:cfs_rq_of
Cyclomatic Complexity 1 kernel/sched/fair.c:group_cfs_rq
Cyclomatic Complexity 1 kernel/sched/fair.c:list_add_leaf_cfs_rq
Cyclomatic Complexity 1 kernel/sched/fair.c:parent_entity
Cyclomatic Complexity 1 kernel/sched/fair.c:find_matching_se
Cyclomatic Complexity 2 kernel/sched/fair.c:max_vruntime
Cyclomatic Complexity 2 kernel/sched/fair.c:min_vruntime
Cyclomatic Complexity 1 kernel/sched/fair.c:entity_before
Cyclomatic Complexity 2 kernel/sched/fair.c:calc_delta_fair
Cyclomatic Complexity 1 kernel/sched/fair.c:update_tg_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:update_stats_wait_start
Cyclomatic Complexity 1 kernel/sched/fair.c:update_stats_wait_end
Cyclomatic Complexity 1 kernel/sched/fair.c:update_stats_enqueue
Cyclomatic Complexity 1 kernel/sched/fair.c:update_stats_dequeue
Cyclomatic Complexity 1 kernel/sched/fair.c:update_stats_curr_start
Cyclomatic Complexity 1 kernel/sched/fair.c:task_tick_numa
Cyclomatic Complexity 2 kernel/sched/fair.c:account_entity_enqueue
Cyclomatic Complexity 2 kernel/sched/fair.c:account_entity_dequeue
Cyclomatic Complexity 1 kernel/sched/fair.c:enqueue_runnable_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:dequeue_runnable_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:enqueue_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:dequeue_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:update_cfs_group
Cyclomatic Complexity 3 kernel/sched/fair.c:cfs_rq_util_change
Cyclomatic Complexity 1 kernel/sched/fair.c:update_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:attach_entity_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:detach_entity_load_avg
Cyclomatic Complexity 1 kernel/sched/fair.c:idle_balance
Cyclomatic Complexity 1 kernel/sched/fair.c:util_est_enqueue
Cyclomatic Complexity 1 kernel/sched/fair.c:util_est_dequeue
Cyclomatic Complexity 1 kernel/sched/fair.c:check_spread
Cyclomatic Complexity 1 kernel/sched/fair.c:check_schedstat_required
Cyclomatic Complexity 3 kernel/sched/fair.c:__clear_buddies_last
Cyclomatic Complexity 3 kernel/sched/fair.c:__clear_buddies_next
Cyclomatic Complexity 3 kernel/sched/fair.c:__clear_buddies_skip
Cyclomatic Complexity 4 kernel/sched/fair.c:clear_buddies
Cyclomatic Complexity 1 kernel/sched/fair.c:account_cfs_rq_runtime
Cyclomatic Complexity 1 kernel/sched/fair.c:check_cfs_rq_runtime
Cyclomatic Complexity 1 kernel/sched/fair.c:check_enqueue_throttle
Cyclomatic Complexity 1 kernel/sched/fair.c:return_cfs_rq_runtime
vim +5450 kernel/sched/fair.c
5389
5390 /*
5391 * The enqueue_task method is called before nr_running is
5392 * increased. Here we update the fair scheduling stats and
5393 * then put the task into the rbtree:
5394 */
5395 static void
5396 enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
5397 {
5398 struct cfs_rq *cfs_rq;
5399 struct sched_entity *se = &p->se;
5400
5401 /*
5402 * The code below (indirectly) updates schedutil which looks at
5403 * the cfs_rq utilization to select a frequency.
5404 * Let's add the task's estimated utilization to the cfs_rq's
5405 * estimated utilization, before we update schedutil.
5406 */
5407 util_est_enqueue(&rq->cfs, p);
5408
5409 /*
5410 * If in_iowait is set, the code below may not trigger any cpufreq
5411 * utilization updates, so do it here explicitly with the IOWAIT flag
5412 * passed.
5413 */
5414 if (p->in_iowait)
5415 cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);
5416
5417 for_each_sched_entity(se) {
5418 if (se->on_rq)
5419 break;
5420 cfs_rq = cfs_rq_of(se);
5421 enqueue_entity(cfs_rq, se, flags);
5422
5423 /*
5424 * end evaluation on encountering a throttled cfs_rq
5425 *
5426 * note: in the case of encountering a throttled cfs_rq we will
5427 * post the final h_nr_running increment below.
5428 */
5429 if (cfs_rq_throttled(cfs_rq))
5430 break;
5431 cfs_rq->h_nr_running++;
5432
5433 flags = ENQUEUE_WAKEUP;
5434 }
5435
5436 for_each_sched_entity(se) {
5437 cfs_rq = cfs_rq_of(se);
5438 cfs_rq->h_nr_running++;
5439
5440 if (cfs_rq_throttled(cfs_rq))
5441 break;
5442
5443 update_load_avg(cfs_rq, se, UPDATE_TG);
5444 update_cfs_group(se);
5445 }
5446
5447 if (!se)
5448 add_nr_running(rq, 1);
5449
> 5450 util_est_enqueue_running(p);
5451
5452 hrtick_update(rq);
5453 }
5454
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip