dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/3] wait: Introduce non-irq variants of wait_event_lock_timeout
Date: Thu, 30 Jul 2026 11:53:44 +0000	[thread overview]
Message-ID: <20260730115345.6FA241F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730-panthor-cache-flush-fix-v2-1-28790478bfff@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The kerneldoc comment for wait_event_lock_timeout incorrectly states that the process can be awakened by a signal.
--

--- Patch [1]: [PATCH v2 1/3] wait: Introduce non-irq variants of wait_event_lock_timeout ---
commit a625303b88e13551964ad465fcf368350aa20d46
Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

wait: Introduce non-irq variants of wait_event_lock_timeout

This commit introduces non-irq variants of wait_event_lock_timeout and 
wait_event_interruptible_lock_timeout. These macros are optimized for 
spinlocks that are never acquired in an interrupt context, avoiding the 
overhead of globally disabling IRQs.

> diff --git a/include/linux/wait.h b/include/linux/wait.h
> index dce055e6add39..cd9b989c120e5 100644
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
[ ... ]
> +/**
> + * wait_event_lock_timeout - sleep until a condition gets true or a timeout
> + *		elapses. The condition is checked under the lock with IRQs
> + *		enabled. This is expected to be called with the lock taken.
> + * @wq_head: the waitqueue to wait on
> + * @condition: a C expression for the event to wait for
> + * @lock: a spinlock_t that has been locked with spin_lock(), which will be
> + *	  released before schedule() and reacquired afterwards.
> + * @timeout: timeout, in jiffies
> + *
> + * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
> + * @condition evaluates to true or signal is received. The @condition is
> + * checked each time the waitqueue @wq_head is woken up.

[Severity: Low]
This isn't a bug, but is the mention of a signal being received accurate 
here?

Since wait_event_lock_timeout places the task in TASK_UNINTERRUPTIBLE state, 
it should not be awakened by signals. It looks like this sentence might have 
been copied from the interruptible variant above it.

> + *
> + * wake_up() has to be called after changing any variable that could
> + * change the result of the wait condition.
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-panthor-cache-flush-fix-v2-0-28790478bfff@collabora.com?part=1

  reply	other threads:[~2026-07-30 11:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 11:45 [PATCH v2 0/3] Rework panthor's cache flush and soft reset locking Nicolas Frattaroli
2026-07-30 11:45 ` [PATCH v2 1/3] wait: Introduce non-irq variants of wait_event_lock_timeout Nicolas Frattaroli
2026-07-30 11:53   ` sashiko-bot [this message]
2026-07-30 15:08   ` Liviu Dudau
2026-07-31  8:00   ` Steven Price
2026-07-30 11:45 ` [PATCH v2 2/3] drm/panthor: Revisit reqs_lock handling in flush/reset paths Nicolas Frattaroli
2026-07-30 12:02   ` sashiko-bot
2026-07-30 14:56   ` Liviu Dudau
2026-07-31  8:01   ` Steven Price
2026-08-03  8:53   ` Boris Brezillon
2026-08-03 13:13     ` Nicolas Frattaroli
2026-08-03 13:20       ` Nicolas Frattaroli
2026-08-03 15:59       ` Boris Brezillon
2026-07-30 11:45 ` [PATCH v2 3/3] drm/panthor: Add tracepoints for cache flushing Nicolas Frattaroli
2026-07-30 13:46   ` Steven Rostedt
2026-07-30 15:14   ` Liviu Dudau
2026-07-31  8:03   ` Steven Price
2026-08-03  9:03   ` Boris Brezillon
2026-08-04 14:44     ` Nicolas Frattaroli

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=20260730115345.6FA241F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nicolas.frattaroli@collabora.com \
    --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