* FAILED: patch "[PATCH] dcache: report a Tasks-RCU quiescent state in dentry_kill()" failed to apply to 5.10-stable tree
@ 2026-11-07 11:17 Sasha Levin
2026-11-10 13:58 ` [PATCH 5.10.y] dcache: report a Tasks-RCU quiescent state in dentry_kill() Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-11-07 11:17 UTC (permalink / raw)
To: leitao, paulmck, brauner; +Cc: stable
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x a647a53bc89a046bee4a12a0a5627f2dfaaef807
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '20261107061710-failed-5.10-a647a53bc89a@kernel.org' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From a647a53bc89a046bee4a12a0a5627f2dfaaef807 Mon Sep 17 00:00:00 2001
From: Breno Leitao <leitao@debian.org>
Date: Fri, 18 Sep 2026 04:01:57 -0700
Subject: [PATCH] dcache: report a Tasks-RCU quiescent state in dentry_kill()
I am constantly seeing the following warning on Meta's fleet:
INFO: rcu_tasks detected stalls on tasks:
native_queued_spin_lock_slowpath
locked_inode_to_wb_and_lock_list
inode_io_list_del
evict
__dentry_kill
shrink_dentry_list
shrink_dcache_tree
d_invalidate
btrfs_delete_subvolume
btrfs_ioctl_snap_destroy
btrfs_ioctl
do_syscall_64
dentry_kill() is the common funnel for dentry teardown: dput(),
shrink_dentry_list() and shrink_dcache_tree() all reach it, once per
dentry, and its cond_resched() is the only reschedule point on that path.
cond_resched() is not an RCU-tasks quiescent state.
Use cond_resched_tasks_rcu_qs() so the teardown reports an RCU-tasks
quiescent state as it proceeds.
Fixes: 9c5f1d30199d ("dcache: move cond_resched() into the end of __dentry_kill()")
Cc: stable@vger.kernel.org
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260918-dcache-task-rcu-qa-v1-1-963ec83e6d0b@debian.org
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
---
fs/dcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 8f17db2724b38..e974d42b03e72 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -843,7 +843,7 @@ static struct dentry *dentry_kill(struct dentry *dentry)
if (dentry->d_op && dentry->d_op->d_release)
dentry->d_op->d_release(dentry);
- cond_resched();
+ cond_resched_tasks_rcu_qs();
/* now that it's negative, ->d_parent is stable */
if (!IS_ROOT(dentry)) {
parent = dentry->d_parent;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 5.10.y] dcache: report a Tasks-RCU quiescent state in dentry_kill()
2026-11-07 11:17 FAILED: patch "[PATCH] dcache: report a Tasks-RCU quiescent state in dentry_kill()" failed to apply to 5.10-stable tree Sasha Levin
@ 2026-11-10 13:58 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-11-10 13:58 UTC (permalink / raw)
To: stable
Cc: Breno Leitao, Paul E. McKenney, Christian Brauner (Amutable),
Sasha Levin
From: Breno Leitao <leitao@debian.org>
[ Upstream commit a647a53bc89a046bee4a12a0a5627f2dfaaef807 ]
I am constantly seeing the following warning on Meta's fleet:
INFO: rcu_tasks detected stalls on tasks:
native_queued_spin_lock_slowpath
locked_inode_to_wb_and_lock_list
inode_io_list_del
evict
__dentry_kill
shrink_dentry_list
shrink_dcache_tree
d_invalidate
btrfs_delete_subvolume
btrfs_ioctl_snap_destroy
btrfs_ioctl
do_syscall_64
dentry_kill() is the common funnel for dentry teardown: dput(),
shrink_dentry_list() and shrink_dcache_tree() all reach it, once per
dentry, and its cond_resched() is the only reschedule point on that path.
cond_resched() is not an RCU-tasks quiescent state.
Use cond_resched_tasks_rcu_qs() so the teardown reports an RCU-tasks
quiescent state as it proceeds.
Fixes: 9c5f1d30199d ("dcache: move cond_resched() into the end of __dentry_kill()")
Cc: stable@vger.kernel.org
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260918-dcache-task-rcu-qa-v1-1-963ec83e6d0b@debian.org
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
[ sashal: applied the cond_resched() replacement in __dentry_kill() instead of dentry_kill() ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/dcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index d17c98508a088..34e8a97e0323e 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -595,7 +595,7 @@ static void __dentry_kill(struct dentry *dentry)
spin_unlock(&dentry->d_lock);
if (likely(can_free))
dentry_free(dentry);
- cond_resched();
+ cond_resched_tasks_rcu_qs();
}
static struct dentry *__lock_parent(struct dentry *dentry)
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-10 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 11:17 FAILED: patch "[PATCH] dcache: report a Tasks-RCU quiescent state in dentry_kill()" failed to apply to 5.10-stable tree Sasha Levin
2026-11-10 13:58 ` [PATCH 5.10.y] dcache: report a Tasks-RCU quiescent state in dentry_kill() Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox