Thread (22 messages) 22 messages, 3 authors, 2d ago

Re: [PATCH v2 02/12] rv: Fix read_lock scope in per-task DA cleanup

From: Gabriele Monaco <gmonaco@redhat.com>
Date: 2026-05-29 06:08:17
Also in: lkml

On Thu, 2026-05-28 at 10:43 +0200, Nam Cao wrote:
Gabriele Monaco [off-list ref] writes:
quoted
The da_monitor_reset_all() function for per-task monitors takes
tasklist_lock while iterating over tasks, then keeps it also while
iterating over idle tasks (one per CPU). The latter is not
necessary
since the lock needs to guard only for_each_process_thread().

Use a scoped_guard for more compact syntax and adjust the scope
only
where the lock is necessary.

Fixes: 30984ccf31b7f ("rv: Refactor da_monitor to minimise macros")
Fixes: 8259cb14a7068 ("rv: Reset per-task monitors also for idle
tasks")
Fixes: tag "indicates that the patch fixes a bug in a previous
commit". There is no bug here, so I don't think Fixes tags are
applicable.
Yeah good point, that isn't a real bug.. We're just holding a lock for
a bit too long but there's no harm in that. Will remove the tags.

Thanks,
Gabriele
quoted
Reviewed-by: Wen Yang <redacted>
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Reviewed-by: Nam Cao <redacted>
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help