Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] 64-bit division by a constant on 32-bit architectures causes a linker error (`undefined reference to '__udivdi3'`). --
commit 87b8b280347790d2ca859c486100f7c5e7ab2a4c Author: Aaron Tomlin <[email protected]> workqueue: Add workqueue_cpu_intensive tracepoint This commit adds a tracepoint to record when a concurrency-managed per-CPU work item runs continuously without sleeping for longer than the CPU intensive threshold. It enables real-time detection and attribution of CPU-hogging work items. > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > index bfeef512f6dd8..957a1190aa28b 100644 > --- a/kernel/workqueue.c > +++ b/kernel/workqueue.c [ ... ] > @@ -1557,9 +1558,10 @@ void wq_worker_tick(struct task_struct *task) > * double decrements. The task is releasing the CPU anyway. Let's skip. > * We probably want to make this prettier in the future. > */ > + dur = (READ_ONCE(worker->task->se.sum_exec_runtime) - > worker->current_at) / > + NSEC_PER_USEC; [Severity: Low] Will this cause a build failure on 32-bit architectures? Using the standard division operator to divide a 64-bit integer by a non-power-of-2 constant (NSEC_PER_USEC) typically results in a linker error for the missing __udivdi3 compiler built-in on 32-bit targets. Could this use div_u64() or a similar helper from linux/math64.h to prevent the linkage error? > if ((worker->flags & WORKER_NOT_RUNNING) || READ_ONCE(worker->sleeping) > || > - READ_ONCE(worker->task->se.sum_exec_runtime) - worker->current_at < > - wq_cpu_intensive_thresh_us * NSEC_PER_USEC) > + dur < wq_cpu_intensive_thresh_us) > return; > > raw_spin_lock(&pool->lock); -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
