All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Liu <ye.liu@linux.dev>
To: sashiko-reviews@lists.linux.dev
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v3 05/15] cpu/hotplug: convert thread iterator to for_each_thread_rculock
Date: Fri, 11 Sep 2026 17:55:41 +0800	[thread overview]
Message-ID: <4ec3887b-9beb-484b-924f-666763994421@linux.dev> (raw)
In-Reply-To: <20260911081120.542271F000FF@smtp.kernel.org>



在 2026/9/11 16:11, sashiko-bot@kernel.org 写道:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The commit message incorrectly claims to replace `for_each_thread()` with `for_each_thread_rculock()`, but the code actually replaces `for_each_process()` with `for_each_process_rculock()`.
> --
> 
> commit 3ac98de6fbc4e97ba4981ef0c4941692c15a9309
> Author: Ye Liu <liuye@kylinos.cn>
> 
> cpu/hotplug: convert thread iterator to for_each_thread_rculock
> 
> This commit replaces a manual rcu_read_lock() and rcu_read_unlock() pair
> in clear_tasks_mm_cpumask() with a scoped RCU lock iterator macro.
> 
>> cpu/hotplug: convert thread iterator to for_each_thread_rculock
>>     
>> Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined
>> with for_each_thread() loop in kernel/cpu.c with for_each_thread_rculock(),
> 
> [Severity: Medium]
> Is the commit message accurate regarding the iterator being replaced?
> 
> The commit message subject and body describe converting a thread iterator
> using for_each_thread() to for_each_thread_rculock(). However, looking at
> clear_tasks_mm_cpumask() in the diff:
> 
>> diff --git a/kernel/cpu.c b/kernel/cpu.c
>> index b3c8553d7bd6c..00638d2abc0f6 100644
>> --- a/kernel/cpu.c
>> +++ b/kernel/cpu.c
>> @@ -1254,8 +1254,7 @@ void clear_tasks_mm_cpumask(int cpu)
>>  	 * full-fledged tasklist_lock.
>>  	 */
>>  	WARN_ON(cpu_online(cpu));
>> -	rcu_read_lock();
>> -	for_each_process(p) {
>> +	for_each_process_rculock(p) {
> 
> The code actually replaces for_each_process() with for_each_process_rculock().
> 
> Could the commit message be updated to match the process iterator actually
> used in the patch to avoid confusion during review or bisection?
> 

Sorry, copy error. It should be the following content:

cpu/hotplug: convert process iterator to for_each_process_rculock
    
    Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined
    with for_each_process() loop in kernel/cpu.c with for_each_process_rculock(),
    which scopes the RCU read lock to the loop body via scoped_guard(rcu).
    
    No functional change.

-- 
Thanks,
Ye Liu


  reply	other threads:[~2026-09-11  9:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  7:57 [PATCH v3 00/15] sched: introduce for_each_process_rculock and for_each_thread_rculock Ye Liu
2026-09-11  7:57 ` [PATCH v3 01/15] " Ye Liu
2026-09-11  7:57 ` [PATCH v3 02/15] mm/oom_kill: convert process/thread iterators to for_each_*_rculock Ye Liu
2026-09-11  7:57 ` [PATCH v3 03/15] mm/ksm: convert process iterator to for_each_process_rculock Ye Liu
2026-09-11  7:57 ` [PATCH v3 04/15] mm/memory-failure: " Ye Liu
2026-09-11  8:13   ` sashiko-bot
2026-09-11  9:51     ` Ye Liu
2026-09-17  3:08       ` Ye Liu
2026-09-11  7:57 ` [PATCH v3 05/15] cpu/hotplug: convert thread iterator to for_each_thread_rculock Ye Liu
2026-09-11  8:11   ` sashiko-bot
2026-09-11  9:55     ` Ye Liu [this message]
2026-09-11  7:57 ` [PATCH v3 06/15] freezer: " Ye Liu
2026-09-11  7:57 ` [PATCH v3 07/15] hung_task: convert process/thread iterators to for_each_*_rculock Ye Liu
2026-09-11  7:57 ` [PATCH v3 08/15] locking/lockdep: " Ye Liu
2026-09-11  7:57 ` [PATCH v3 09/15] rcu: convert process/thread iterator to for_each_process_thread_rculock Ye Liu
2026-09-11  7:57 ` [PATCH v3 10/15] sched: convert process/thread iterators to for_each_*_rculock Ye Liu
2026-09-11  7:57 ` [PATCH v3 11/15] tracing/fgraph: convert process/thread iterator to for_each_process_thread_rculock Ye Liu
2026-09-11  8:10   ` sashiko-bot
2026-09-11 12:59   ` Steven Rostedt
2026-09-11  7:57 ` [PATCH v3 12/15] unwind: " Ye Liu
2026-09-11 12:57   ` Steven Rostedt
2026-09-11  7:57 ` [PATCH v3 13/15] fs: convert process/thread iterators to for_each_*_rculock Ye Liu
2026-09-11  8:15   ` sashiko-bot
2026-09-11  7:57 ` [PATCH v3 14/15] lib: convert process iterator to for_each_process_rculock Ye Liu
2026-09-11  7:58 ` [PATCH v3 15/15] security/landlock: convert thread iterator to for_each_thread_rculock Ye Liu

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=4ec3887b-9beb-484b-924f-666763994421@linux.dev \
    --to=ye.liu@linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.