From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.196 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796201816; b=AXdBsF8r8AnQZo0BlMRbD5as5rlxFklSjaGnCIz9989a0Ysrz/mtpbqRb3oVsHu8sVzd VEQsqIF7F0+FUKVeq11gI1q6OxtOki8/FpYN0U+41wOWphF3vtKsmxLAOZd9p+Lfeiw5K eNTqcA3Kw40djSDOFV2V3SCFpiWJA2I/mqYCWWu5p+GbdyyEKcq0t781EZFJ59f0vrvCH Yt8RKGCtYGEK7o+RsyQheZzDnNiWdG1uUtarSygH1fWcTWm5wann2gYwPyOijunYejTcL 0tEt/cyuyfejlZR9qIf1nMrHzay8eE1wrZEqiaAY2Bd3pSoMc+xN0JnW9H2bCYV4RVg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796201816; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=EFqi8zUEYOBDhw1LW/q65ZlXnaWk/rCtcg24n3k5y08=; b=siWe2qNWk8yBTTjyqwR2L7uVqFU4hc9P9yopcO3R4afex5dFjIrtxuRi7KZPhnvLJ2a3 WGSXPk4vhINEEHGlpRBDI3EX2pz/SdtUD7fLpho4UdWcOl37kNZcAuoWyulQVkF4j7DC1 1DITsfT7Fv/vZXSiMe7TKhiF+KxREtf2Yt/8okS95sW3JvqitGHXX4uK+zIYHY4yLCzNE vIietP5XTo/h6kVrYrkJVd6wummoqaNAH8omEv925EVVmMECq0eCi+FeqTJR59f7Ma+Na /rrXrLeAHvWhscOXsLJr6Zyqokk7BryxyEzBX/UNA8+hqBJxKKhf0tJ0q+TuImvQVXg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=XGPEaE+w; arc=none smtp.remote-ip=91.218.175.196 Received: from mta0.migadu.com (out-196.mta0.migadu.com [91.218.175.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43DDE606A690 for ; Wed, 2 Dec 2026 08:56:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 43DDE606A690 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=XGPEaE+w X-Envelope-To: linux-trace-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=5HG6WME14fsPnA9rhLNXbSGz2oLDpXzNuaf98+3YOaE=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796201813; v=1; x=1796806613; b=XGPEaE+wwoctbtZI2ImwLEBg2zc6Ph5UttCqTenHkdD0dOaCkI1d575X2a6jdOfF7ZqGopGo 4sD9jDn43EFJePpx3/QEsDTez1bjVhZNWbocXg8WFROFBFOXsh7vTrujTbPqq6pb2xBEnCPaAoa vk1smd/MO+fc1BdKmn1MlURE= X-Envelope-To: linux-trace-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id bccf2a15e139ae63; Wed, 02 Dec 2026 08:56:52 +0000 X-Mizu-Trace-ID: bccf2a15e139ae63 X-Migadu-Flow: FLOW_OUT Message-ID: Date: Wed, 2 Dec 2026 16:56:34 +0800 X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 00/15] sched: introduce for_each_process_rculock and for_each_thread_rculock To: Peter Zijlstra , Ingo Molnar , Andrew Morton , Michal Hocko , "Paul E. McKenney" , Steven Rostedt , Josh Poimboeuf , =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Oleg Nesterov , Thomas Gleixner , Ye Liu Cc: David Hildenbrand , Miaohe Lin , Naoya Horiguchi , "Rafael J. Wysocki" , =?UTF-8?Q?G=C3=BCnther_Noack?= , Lorenzo Stoakes , SJ Park , Gregory Price , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, rientjes@google.com, shakeel.butt@linux.dev, xu.xin16@zte.com.cn, chengming.zhou@linux.dev, will@kernel.org, boqun@kernel.org, frederic@kernel.org, neeraj.upadhyay@kernel.org, joelagnelf@nvidia.com, josh@joshtriplett.org, urezki@gmail.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, tony.luck@intel.com, reinette.chatre@intel.com, x86@kernel.org, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, pavel@kernel.org, lance.yang@linux.dev, mhiramat@kernel.org, pmladek@suse.com, longman@redhat.com, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, qiang.zhang@linux.dev, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, mark.rutland@arm.com, Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com References: <20260921092101.89285-1-ye.liu@linux.dev> <7842535e-ae71-4de3-b16d-14d55b514df5@linux.dev> Content-Language: en-US From: Ye Liu In-Reply-To: <7842535e-ae71-4de3-b16d-14d55b514df5@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Peter, Friendly ping on this series (v4, 15 patches), posted on Sep 21. Per your earlier request, the combined kernel/ patch has been split into per-subsystem patches. The only pieces that still need sched-tree attention are: - patch 1: introduce for_each_process_rculock() / for_each_thread_rculock() in include/linux/sched/signal.h - patch 10: convert kernel/sched/ iterators Everything else has been reviewed by its respective subsystem maintainers/reviewers, e.g.: - Reviewed-by: Oleg Nesterov (mm, kernel, rcu, lib) - Reviewed-by: Paul E. McKenney (rcu) - Acked-by: Steven Rostedt (tracing/fgraph, unwind) - Reviewed-by: Günther Noack (landlock) - Acked-by: Michal Hocko , David Hildenbrand , Miaohe Lin (mm) Could you please take a look at patches 1 and 10 when you get a chance? No rush. 在 2026/10/12 16:22, Ye Liu 写道: > Hi, Peter > > Friendly ping on this series, posted three weeks ago. You previously > requested splitting the combined kernel/ conversion into per-subsystem > patches, which has been done in v4. > No rush — just want to make sure this is on your radar. > > Thanks, > Ye Liu > > 在 2026/9/21 17:20, Ye Liu 写道: >> From: Ye Liu >> >> Introduce for_each_process_rculock(), for_each_thread_rculock() and >> for_each_process_thread_rculock() macros that combine the existing >> iteration macros with scoped_guard(rcu), so that the RCU read lock >> is automatically acquired before iteration and released when the >> loop exits — including via break, goto, or return. >> >> The rest of the series converts manual rcu_read_lock()/ >> rcu_read_unlock() and guard(rcu)() pairs across mm/, kernel/, fs/, >> lib/ and security/ to use the new macros. >> >> Suggested by Michal Hocko for the oom_kill path [2]. >> >> Signed-off-by: Ye Liu >> >> --- >> Changes since v3 [4]: >> - Fix patch 5 (cpu/hotplug): title and commit message incorrectly >> said "thread iterator" and "for_each_thread_rculock" while the >> code converts for_each_process() to for_each_process_rculock(). >> >> Note: Patches 4, 11, and 13 received automated reviews from sashiko-bot >> in the v3 thread [4] that were verified as false positives: >> >> - Patch 4: claimed the folio lock is dropped before collect_procs(), >> leading to a NULL deref on folio->mapping; the lock is held in all >> call paths. >> - Patch 11: claimed mixing goto/scope-based cleanup in >> alloc_retstack_tasklist(); the goto free label handles memory >> cleanup, not lock management. >> - Patch 13: claimed mixing goto/scope-based cleanup in >> __set_oom_adj(); goto err_unlock manages oom_adj_mutex while >> scoped_guard(rcu) manages the RCU read lock — different resources. >> >> Changes since v2 [3]: >> - Split the kernel/ patch into per-subsystem patches, as the >> combined patch could not be applied (Peter Zijlstra, Steven >> Rostedt). >> - Move changelog below the --- separator so it is excluded from >> the commit message (Lorenzo Stoakes). >> - Indent loop body in macro definitions to show scoped_guard >> scope (Lorenzo Stoakes). >> >> Changes since v1 [1]: >> - Rename macros from *_rcu to *_rculock, as suggested by Steven >> Rostedt and acked by Thomas Gleixner, to avoid confusion with >> existing *_rcu() list iterators that expect the caller to hold >> the RCU read lock. >> - Improve the comment on for_each_process_thread_rculock() to >> document that 'break' only exits the inner loop and 'goto' is >> needed to exit both loops (Thomas Gleixner). >> - Rename the stale 'unlock:' label to 'out:' in hung_task.c, as >> noted by Günther Noack. >> - Clarify in patch 4 that page_pgoff() is safe outside the RCU >> read-side critical section (SJ Park). >> - CC all relevant maintainers on every patch (Lorenzo Stoakes). >> - Drop the mm: prefix from patch 1, as the macros are in >> include/linux/sched/signal.h (Michal Hocko). >> >> [1] https://lore.kernel.org/all/20260904083001.553587-1-ye.liu@linux.dev/ >> [2] https://lore.kernel.org/all/20260813092933.562028-1-ye.liu@linux.dev/ >> [3] https://lore.kernel.org/all/20260907081334.1152889-1-ye.liu@linux.dev/ >> [4] https://lore.kernel.org/all/20260911075800.491472-1-ye.liu@linux.dev/ >> >> Ye Liu (15): >> sched: introduce for_each_process_rculock and for_each_thread_rculock >> mm/oom_kill: convert process/thread iterators to for_each_*_rculock >> mm/ksm: convert process iterator to for_each_process_rculock >> mm/memory-failure: convert process iterator to >> for_each_process_rculock >> cpu/hotplug: convert process iterator to for_each_process_rculock >> freezer: convert thread iterator to for_each_thread_rculock >> hung_task: convert process/thread iterators to for_each_*_rculock >> locking/lockdep: convert process/thread iterators to >> for_each_*_rculock >> rcu: convert process/thread iterator to >> for_each_process_thread_rculock >> sched: convert process/thread iterators to for_each_*_rculock >> tracing/fgraph: convert process/thread iterator to >> for_each_process_thread_rculock >> unwind: convert process/thread iterator to >> for_each_process_thread_rculock >> fs: convert process/thread iterators to for_each_*_rculock >> lib: convert process iterator to for_each_process_rculock >> security/landlock: convert thread iterator to for_each_thread_rculock >> >> fs/proc/base.c | 4 +--- >> fs/resctrl/rdtgroup.c | 8 ++------ >> include/linux/sched/signal.h | 26 ++++++++++++++++++++++++++ >> kernel/cpu.c | 4 +--- >> kernel/freezer.c | 4 +--- >> kernel/hung_task.c | 11 ++++------- >> kernel/locking/lockdep.c | 4 +--- >> kernel/rcu/update.c | 4 +--- >> kernel/sched/core.c | 3 +-- >> kernel/sched/debug.c | 4 +--- >> kernel/trace/fgraph.c | 8 ++------ >> kernel/unwind/deferred.c | 3 +-- >> lib/is_single_threaded.c | 5 +---- >> mm/ksm.c | 4 +--- >> mm/memory-failure.c | 16 ++++------------ >> mm/oom_kill.c | 20 +++++--------------- >> security/landlock/tsync.c | 8 ++------ >> 17 files changed, 55 insertions(+), 81 deletions(-) >> >> -- >> 2.25.1 > -- Thanks, Ye Liu