Hi Aaron,

kernel test robot noticed the following build errors:

[auto build test ERROR on tj-wq/for-next]
[also build test ERROR on linus/master v7.3-rc1 next-20260831]
[cannot apply to trace/for-next]
[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/Aaron-Tomlin/workqueue-Add-workqueue_cpu_intensive-tracepoint/20260829-190515
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    
https://lore.kernel.org/r/20260829230517.42468-4-atomlin%40atomlin.com
patch subject: [PATCH 3/3] workqueue: Add workqueue_bh_budget_yield tracepoint
config: i386-allnoconfig-bpf 
(https://download.01.org/0day-ci/archive/20260831/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20260831/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   ld: kernel/workqueue.o: in function `wq_worker_tick':
>> kernel/workqueue.c:1561:(.text+0xa0b6): undefined reference to `__udivdi3'


vim +1561 kernel/workqueue.c

  1522  
  1523  /**
  1524   * wq_worker_tick - a scheduler tick occurred while a kworker is running
  1525   * @task: task currently running
  1526   *
  1527   * Called from sched_tick(). We're in the IRQ context and the current
  1528   * worker's fields which follow the 'K' locking rule can be accessed 
safely.
  1529   */
  1530  void wq_worker_tick(struct task_struct *task)
  1531  {
  1532          struct worker *worker = kthread_data(task);
  1533          struct pool_workqueue *pwq = worker->current_pwq;
  1534          struct worker_pool *pool = worker->pool;
  1535          u64 dur;
  1536  
  1537          if (!pwq)
  1538                  return;
  1539  
  1540          /*
  1541           * @pwq is shared across CPUs for unbound wqs and this advisory 
stat is
  1542           * bumped outside pool->lock, so the update is intentionally 
racy.
  1543           */
  1544          data_race(pwq->stats[PWQ_STAT_CPU_TIME] += TICK_USEC);
  1545  
  1546          if (!wq_cpu_intensive_thresh_us)
  1547                  return;
  1548  
  1549          /*
  1550           * If the current worker is concurrency managed and hogged the 
CPU for
  1551           * longer than wq_cpu_intensive_thresh_us, it's automatically 
marked
  1552           * CPU_INTENSIVE to avoid stalling other concurrency-managed 
work items.
  1553           *
  1554           * Set @worker->sleeping means that @worker is in the process of
  1555           * switching out voluntarily and won't be contributing to
  1556           * @pool->nr_running until it wakes up. As wq_worker_sleeping() 
also
  1557           * decrements ->nr_running, setting CPU_INTENSIVE here can lead 
to
  1558           * double decrements. The task is releasing the CPU anyway. 
Let's skip.
  1559           * We probably want to make this prettier in the future.
  1560           */
> 1561          dur = (READ_ONCE(worker->task->se.sum_exec_runtime) - 
> worker->current_at) /
  1562                NSEC_PER_USEC;
  1563          if ((worker->flags & WORKER_NOT_RUNNING) || 
READ_ONCE(worker->sleeping) ||
  1564              dur < wq_cpu_intensive_thresh_us)
  1565                  return;
  1566  
  1567          raw_spin_lock(&pool->lock);
  1568  
  1569          worker_set_flags(worker, WORKER_CPU_INTENSIVE);
  1570          wq_cpu_intensive_report(worker->current_func);
  1571          pwq->stats[PWQ_STAT_CPU_INTENSIVE]++;
  1572  
  1573          if (kick_pool(pool))
  1574                  pwq->stats[PWQ_STAT_CM_WAKEUP]++;
  1575  
  1576          raw_spin_unlock(&pool->lock);
  1577  
  1578          trace_workqueue_cpu_intensive(pwq, worker->current_work,
  1579                                        worker->current_func, dur);
  1580  }
  1581  

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

Reply via email to