[Devel] [PATCH RHEL9 COMMIT] fs/fuse kio: do not set RPC affinity from a workequeue worker
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jul 8 17:40:18 MSK 2025
The commit is pushed to "branch-rh9-5.14.0-427.55.1.vz9.82.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.55.1.vz9.82.4
------>
commit c92a76d29b981a391e6cc9d648610b3983064276
Author: Liu Kui <kui.liu at virtuozzo.com>
Date: Tue Jul 8 16:14:16 2025 +0800
fs/fuse kio: do not set RPC affinity from a workequeue worker
A RPC's affinity shouldn't be set from a workqueue worker in case of
RPC_AFFINITY_RETENT mode, otherwise the RPC could be stuck to one cpu
forever. When multiple rpcs are stuck to the same cpu overall performance
degrades significantly.
Fixes: #VSTOR-109481
https://virtuozzo.atlassian.net/browse/VSTOR-109481
Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
Feature: fuse: kRPC - single RPC for kernel and userspace
---
fs/fuse/kio/pcs/pcs_rpc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c
index e3ae54297f5a5..b081614c06c36 100644
--- a/fs/fuse/kio/pcs/pcs_rpc.c
+++ b/fs/fuse/kio/pcs/pcs_rpc.c
@@ -811,6 +811,10 @@ static void pcs_rpc_affinity(struct pcs_rpc *ep, bool was_idle)
pcs_rpc_cpu_select(ep);
break;
case RPC_AFFINITY_RETENT:
+ /* Do not set rpc affinity from a workequeue worker */
+ if (current->flags & PF_WQ_WORKER)
+ break;
+
/* Naive socket-to-cpu binding approach */
if (ep->cpu == WORK_CPU_UNBOUND ||
(time_is_before_jiffies(ep->cpu_stamp) && was_idle)) {
More information about the Devel
mailing list