All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wanpeng Li <kernellwp@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	Wanpeng Li <wanpengli@tencent.com>
Subject: Re: [PATCH v2 5/9] sched/fair: Wire up yield deboost in yield_to_task_fair()
Date: Mon, 22 Dec 2025 17:31:23 +0800	[thread overview]
Message-ID: <202512221734.SzKNollL-lkp@intel.com> (raw)
In-Reply-To: <20251219035334.39790-6-kernellwp@gmail.com>

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@intel.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

  parent reply	other threads:[~2025-12-22  9:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19  3:53 [PATCH v2 0/9] sched/kvm: Semantics-aware vCPU scheduling for oversubscribed KVM Wanpeng Li
2025-12-19  3:53 ` [PATCH v2 1/9] sched: Add vCPU debooster infrastructure Wanpeng Li
2025-12-19  3:53 ` [PATCH v2 2/9] sched/fair: Add rate-limiting and validation helpers Wanpeng Li
2025-12-22 21:12   ` kernel test robot
2026-01-04  4:09   ` Hillf Danton
2025-12-19  3:53 ` [PATCH v2 3/9] sched/fair: Add cgroup LCA finder for hierarchical yield Wanpeng Li
2025-12-19  3:53 ` [PATCH v2 4/9] sched/fair: Add penalty calculation and application logic Wanpeng Li
2025-12-22 23:36   ` kernel test robot
2025-12-19  3:53 ` [PATCH v2 5/9] sched/fair: Wire up yield deboost in yield_to_task_fair() Wanpeng Li
2025-12-22  7:06   ` kernel test robot
2025-12-22  9:31   ` kernel test robot [this message]
2025-12-19  3:53 ` [PATCH v2 6/9] KVM: x86: Add IPI tracking infrastructure Wanpeng Li
2025-12-19  3:53 ` [PATCH v2 7/9] KVM: x86/lapic: Integrate IPI tracking with interrupt delivery Wanpeng Li
2025-12-19  3:53 ` [PATCH v2 8/9] KVM: Implement IPI-aware directed yield candidate selection Wanpeng Li
2025-12-19  3:53 ` [PATCH v2 9/9] KVM: Relaxed boost as safety net Wanpeng Li
2026-01-04  2:40 ` [PATCH v2 0/9] sched/kvm: Semantics-aware vCPU scheduling for oversubscribed KVM Wanpeng Li
2026-01-05  6:26 ` K Prateek Nayak
2026-03-13  1:13 ` Sean Christopherson
2026-04-01  9:48   ` Wanpeng Li
2026-04-02 23:43     ` Sean Christopherson
2026-03-26 14:41 ` Christian Borntraeger
2026-04-01  9:34   ` Wanpeng Li
2026-04-08  9:35     ` Richie Buturla
2026-04-17 11:30       ` Richie Buturla
2026-05-13 12:52         ` Richie Buturla

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=202512221734.SzKNollL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernellwp@gmail.com \
    --cc=kprateek.nayak@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=wanpengli@tencent.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 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.