The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Li kunyu <likunyu10@163.com>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, kprateek.nayak@amd.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Li kunyu <likunyu10@163.com>
Subject: Re: [PATCH v2] kernel/sched/fair: Fix the issue of virtual runtime conversion error
Date: Thu, 28 May 2026 17:58:47 +0800	[thread overview]
Message-ID: <202605281756.0qWgdGW5-lkp@intel.com> (raw)
In-Reply-To: <20260527072113.359604-1-likunyu10@163.com>

Hi Li,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on peterz-queue/sched/core linus/master v7.1-rc5 next-20260527]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Li-kunyu/kernel-sched-fair-Fix-the-issue-of-virtual-runtime-conversion-error/20260527-152554
base:   tip/sched/core
patch link:    https://lore.kernel.org/r/20260527072113.359604-1-likunyu10%40163.com
patch subject: [PATCH v2] kernel/sched/fair: Fix the issue of virtual runtime conversion error
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260528/202605281756.0qWgdGW5-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605281756.0qWgdGW5-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/202605281756.0qWgdGW5-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/sched/fair.c:7632:6: warning: variable 'delta' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    7632 |         if (unlikely(se->load.weight != NICE_0_LOAD))
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:77:22: note: expanded from macro 'unlikely'
      77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:7644:28: note: uninitialized use occurs here
    7644 |         hrtick_start(rq, (scale * delta) / 1024);
         |                                   ^~~~~
   kernel/sched/fair.c:7632:2: note: remove the 'if' if its condition is always true
    7632 |         if (unlikely(se->load.weight != NICE_0_LOAD))
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7633 |                 delta = div64_ul(NICE_0_LOAD * vdelta, se->load.weight);
   kernel/sched/fair.c:7615:11: note: initialize the variable 'delta' to silence this warning
    7615 |         u64 delta;
         |                  ^
         |                   = 0
   1 warning generated.


vim +7632 kernel/sched/fair.c

  7603	
  7604	/**************************************************
  7605	 * CFS operations on tasks:
  7606	 */
  7607	
  7608	#ifdef CONFIG_SCHED_HRTICK
  7609	static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
  7610	{
  7611		struct sched_entity *se = &p->se;
  7612		unsigned long scale = 1024;
  7613		unsigned long util = 0;
  7614		u64 vdelta;
  7615		u64 delta;
  7616	
  7617		WARN_ON_ONCE(task_rq(p) != rq);
  7618	
  7619		if (rq->cfs.h_nr_queued <= 1)
  7620			return;
  7621	
  7622		/*
  7623		 * Compute time until virtual deadline
  7624		 */
  7625		vdelta = se->deadline - se->vruntime;
  7626		if ((s64)vdelta < 0) {
  7627			if (task_current_donor(rq, p))
  7628				resched_curr(rq);
  7629			return;
  7630		}
  7631	
> 7632		if (unlikely(se->load.weight != NICE_0_LOAD))
  7633			delta = div64_ul(NICE_0_LOAD * vdelta, se->load.weight);
  7634	
  7635		/*
  7636		 * Correct for instantaneous load of other classes.
  7637		 */
  7638		util += cpu_util_irq(rq);
  7639		if (util && util < 1024) {
  7640			scale *= 1024;
  7641			scale /= (1024 - util);
  7642		}
  7643	
  7644		hrtick_start(rq, (scale * delta) / 1024);
  7645	}
  7646	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2026-05-28  9:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  7:15 [PATCH] kernel/sched/fair: Fix the issue of virtual runtime conversion error Li kunyu
2026-05-27  1:16 ` kernel test robot
2026-05-27  6:48   ` Geert Uytterhoeven
2026-05-27  7:21 ` [PATCH v2] " Li kunyu
2026-05-27 11:59   ` Peter Zijlstra
2026-05-28  6:07     ` Li kunyu
2026-05-28  9:58   ` kernel test robot [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=202605281756.0qWgdGW5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=likunyu10@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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