From: sashiko-bot@kernel.org
To: "Aaron Tomlin" <atomlin@atomlin.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] workqueue: Add workqueue_cpu_intensive tracepoint
Date: Sat, 29 Aug 2026 23:14:03 +0000 [thread overview]
Message-ID: <20260829231403.7F4071F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260829230517.42468-2-atomlin@atomlin.com>
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 <atomlin@atomlin.com>
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/20260829230517.42468-1-atomlin@atomlin.com?part=1
next prev parent reply other threads:[~2026-08-29 23:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 23:05 [PATCH 0/3] workqueue: Add telemetry tracepoints for CPU hogs, distress, and BH budget yields Aaron Tomlin
2026-08-29 23:05 ` [PATCH 1/3] workqueue: Add workqueue_cpu_intensive tracepoint Aaron Tomlin
2026-08-29 23:14 ` sashiko-bot [this message]
2026-08-29 23:05 ` [PATCH 2/3] workqueue: Add workqueue_mayday and workqueue_rescued tracepoints Aaron Tomlin
2026-08-29 23:05 ` [PATCH 3/3] workqueue: Add workqueue_bh_budget_yield tracepoint Aaron Tomlin
2026-08-31 17:41 ` kernel test robot
2026-08-31 21:08 ` [PATCH 0/3] workqueue: Add telemetry tracepoints for CPU hogs, distress, and BH budget yields Tejun Heo
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=20260829231403.7F4071F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=atomlin@atomlin.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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