A RPC's affinity shouldn't be set from a workqueue worker, 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....@virtuozzo.com> --- 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 f15d0c3fb7cd..ca9c3ac5b1cc 100644 --- a/fs/fuse/kio/pcs/pcs_rpc.c +++ b/fs/fuse/kio/pcs/pcs_rpc.c @@ -858,6 +858,10 @@ static void pcs_rpc_cpu_select(struct pcs_rpc *ep) static void pcs_rpc_affinity(struct pcs_rpc *ep, bool was_idle) { + /* Do not set rpc affinity from a workequeue worker */ + if (current->flags & PF_WQ_WORKER) + return; + switch(rpc_affinity_mode) { case RPC_AFFINITY_NONE: if (unlikely(ep->cpu != WORK_CPU_UNBOUND)) { -- 2.39.5 (Apple Git-154) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel