lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202512221734.SzKNollL-lkp@intel.com>
Date: Mon, 22 Dec 2025 17:31:23 +0800
From: kernel test robot <lkp@...el.com>
To: Wanpeng Li <kernellwp@...il.com>, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Sean Christopherson <seanjc@...gle.com>
Cc: oe-kbuild-all@...ts.linux.dev, K Prateek Nayak <kprateek.nayak@....com>,
	Christian Borntraeger <borntraeger@...ux.ibm.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Juri Lelli <juri.lelli@...hat.com>, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, Wanpeng Li <wanpengli@...cent.com>
Subject: Re: [PATCH v2 5/9] sched/fair: Wire up yield deboost in
 yield_to_task_fair()

Hi Wanpeng,

kernel test robot noticed the following build errors:

[auto build test ERROR on kvm/queue]
[also build test ERROR on kvm/next tip/sched/core peterz-queue/sched/core tip/master linus/master v6.19-rc2 next-20251219]
[cannot apply to kvm/linux-next tip/auto-latest]
[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/Wanpeng-Li/sched-fair-Add-rate-limiting-and-validation-helpers/20251219-125353
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link:    https://lore.kernel.org/r/20251219035334.39790-6-kernellwp%40gmail.com
patch subject: [PATCH v2 5/9] sched/fair: Wire up yield deboost in yield_to_task_fair()
config: i386-randconfig-003-20251222 (https://download.01.org/0day-ci/archive/20251222/202512221734.SzKNollL-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251222/202512221734.SzKNollL-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512221734.SzKNollL-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: kernel/sched/fair.o: in function `yield_deboost_calculate_penalty':
>> kernel/sched/fair.c:9213:(.text+0x278d): undefined reference to `__udivdi3'


vim +9213 kernel/sched/fair.c

9a700d273608de Wanpeng Li 2025-12-19  9176  
9a700d273608de Wanpeng Li 2025-12-19  9177  /*
9a700d273608de Wanpeng Li 2025-12-19  9178   * Calculate vruntime penalty for yield deboost.
9a700d273608de Wanpeng Li 2025-12-19  9179   *
9a700d273608de Wanpeng Li 2025-12-19  9180   * The penalty is based on:
9a700d273608de Wanpeng Li 2025-12-19  9181   * - Fairness gap: vruntime difference between yielding and target tasks
9a700d273608de Wanpeng Li 2025-12-19  9182   * - Scheduling granularity: base unit for penalty calculation
9a700d273608de Wanpeng Li 2025-12-19  9183   * - Queue size: adaptive caps to prevent starvation in larger queues
9a700d273608de Wanpeng Li 2025-12-19  9184   *
9a700d273608de Wanpeng Li 2025-12-19  9185   * Queue-size-based caps (multiplier of granularity):
9a700d273608de Wanpeng Li 2025-12-19  9186   *   2 tasks:  6.0x - Strongest push for 2-task ping-pong scenarios
9a700d273608de Wanpeng Li 2025-12-19  9187   *   3 tasks:  4.0x
9a700d273608de Wanpeng Li 2025-12-19  9188   *   4-6:      2.5x
9a700d273608de Wanpeng Li 2025-12-19  9189   *   7-8:      2.0x
9a700d273608de Wanpeng Li 2025-12-19  9190   *   9-12:     1.5x
9a700d273608de Wanpeng Li 2025-12-19  9191   *   >12:      1.0x - Minimal push to avoid starvation
9a700d273608de Wanpeng Li 2025-12-19  9192   *
9a700d273608de Wanpeng Li 2025-12-19  9193   * Returns the calculated penalty value.
9a700d273608de Wanpeng Li 2025-12-19  9194   */
9a700d273608de Wanpeng Li 2025-12-19  9195  static u64 __maybe_unused
9a700d273608de Wanpeng Li 2025-12-19  9196  yield_deboost_calculate_penalty(struct rq *rq, struct sched_entity *se_y_lca,
9a700d273608de Wanpeng Li 2025-12-19  9197  				struct sched_entity *se_t_lca,
9a700d273608de Wanpeng Li 2025-12-19  9198  				struct task_struct *p_target, int h_nr_queued)
9a700d273608de Wanpeng Li 2025-12-19  9199  {
9a700d273608de Wanpeng Li 2025-12-19  9200  	u64 gran, need, penalty, maxp;
9a700d273608de Wanpeng Li 2025-12-19  9201  	u64 weighted_need, base;
9a700d273608de Wanpeng Li 2025-12-19  9202  
9a700d273608de Wanpeng Li 2025-12-19  9203  	gran = calc_delta_fair(sysctl_sched_base_slice, se_y_lca);
9a700d273608de Wanpeng Li 2025-12-19  9204  
9a700d273608de Wanpeng Li 2025-12-19  9205  	/* Calculate fairness gap */
9a700d273608de Wanpeng Li 2025-12-19  9206  	need = 0;
9a700d273608de Wanpeng Li 2025-12-19  9207  	if (se_t_lca->vruntime > se_y_lca->vruntime)
9a700d273608de Wanpeng Li 2025-12-19  9208  		need = se_t_lca->vruntime - se_y_lca->vruntime;
9a700d273608de Wanpeng Li 2025-12-19  9209  
9a700d273608de Wanpeng Li 2025-12-19  9210  	/* Base penalty is granularity plus 110% of fairness gap */
9a700d273608de Wanpeng Li 2025-12-19  9211  	penalty = gran;
9a700d273608de Wanpeng Li 2025-12-19  9212  	if (need) {
9a700d273608de Wanpeng Li 2025-12-19 @9213  		weighted_need = need + need / 10;
9a700d273608de Wanpeng Li 2025-12-19  9214  		if (weighted_need > U64_MAX - penalty)
9a700d273608de Wanpeng Li 2025-12-19  9215  			weighted_need = U64_MAX - penalty;
9a700d273608de Wanpeng Li 2025-12-19  9216  		penalty += weighted_need;
9a700d273608de Wanpeng Li 2025-12-19  9217  	}
9a700d273608de Wanpeng Li 2025-12-19  9218  
9a700d273608de Wanpeng Li 2025-12-19  9219  	/* Apply debounce to reduce ping-pong */
9a700d273608de Wanpeng Li 2025-12-19  9220  	penalty = yield_deboost_apply_debounce(rq, p_target, penalty, need, gran);
9a700d273608de Wanpeng Li 2025-12-19  9221  
9a700d273608de Wanpeng Li 2025-12-19  9222  	/* Queue-size-based upper bound */
9a700d273608de Wanpeng Li 2025-12-19  9223  	if (h_nr_queued == 2)
9a700d273608de Wanpeng Li 2025-12-19  9224  		maxp = gran * 6;
9a700d273608de Wanpeng Li 2025-12-19  9225  	else if (h_nr_queued == 3)
9a700d273608de Wanpeng Li 2025-12-19  9226  		maxp = gran * 4;
9a700d273608de Wanpeng Li 2025-12-19  9227  	else if (h_nr_queued <= 6)
9a700d273608de Wanpeng Li 2025-12-19  9228  		maxp = (gran * 5) / 2;
9a700d273608de Wanpeng Li 2025-12-19  9229  	else if (h_nr_queued <= 8)
9a700d273608de Wanpeng Li 2025-12-19  9230  		maxp = gran * 2;
9a700d273608de Wanpeng Li 2025-12-19  9231  	else if (h_nr_queued <= 12)
9a700d273608de Wanpeng Li 2025-12-19  9232  		maxp = (gran * 3) / 2;
9a700d273608de Wanpeng Li 2025-12-19  9233  	else
9a700d273608de Wanpeng Li 2025-12-19  9234  		maxp = gran;
9a700d273608de Wanpeng Li 2025-12-19  9235  
9a700d273608de Wanpeng Li 2025-12-19  9236  	penalty = clamp(penalty, gran, maxp);
9a700d273608de Wanpeng Li 2025-12-19  9237  
9a700d273608de Wanpeng Li 2025-12-19  9238  	/* Baseline push when no fairness gap exists */
9a700d273608de Wanpeng Li 2025-12-19  9239  	if (need == 0) {
9a700d273608de Wanpeng Li 2025-12-19  9240  		if (h_nr_queued == 3)
9a700d273608de Wanpeng Li 2025-12-19  9241  			base = (gran * 15) / 16;
9a700d273608de Wanpeng Li 2025-12-19  9242  		else if (h_nr_queued >= 4 && h_nr_queued <= 6)
9a700d273608de Wanpeng Li 2025-12-19  9243  			base = (gran * 5) / 8;
9a700d273608de Wanpeng Li 2025-12-19  9244  		else if (h_nr_queued >= 7 && h_nr_queued <= 8)
9a700d273608de Wanpeng Li 2025-12-19  9245  			base = gran / 2;
9a700d273608de Wanpeng Li 2025-12-19  9246  		else if (h_nr_queued >= 9 && h_nr_queued <= 12)
9a700d273608de Wanpeng Li 2025-12-19  9247  			base = (gran * 3) / 8;
9a700d273608de Wanpeng Li 2025-12-19  9248  		else if (h_nr_queued > 12)
9a700d273608de Wanpeng Li 2025-12-19  9249  			base = gran / 4;
9a700d273608de Wanpeng Li 2025-12-19  9250  		else
9a700d273608de Wanpeng Li 2025-12-19  9251  			base = gran;
9a700d273608de Wanpeng Li 2025-12-19  9252  
9a700d273608de Wanpeng Li 2025-12-19  9253  		if (penalty < base)
9a700d273608de Wanpeng Li 2025-12-19  9254  			penalty = base;
9a700d273608de Wanpeng Li 2025-12-19  9255  	}
9a700d273608de Wanpeng Li 2025-12-19  9256  
9a700d273608de Wanpeng Li 2025-12-19  9257  	return penalty;
9a700d273608de Wanpeng Li 2025-12-19  9258  }
9a700d273608de Wanpeng Li 2025-12-19  9259  

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ