[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:39:38 MSK 2025


disregard

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 08.07.2025 16:27, Konstantin Khorenko wrote:
> 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 656d21e8a029763e22b8e95969524e3e8d8ff773
> 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 81da47f761555..7e7cc63257702 100644
> --- a/fs/fuse/kio/pcs/pcs_rpc.c
> +++ b/fs/fuse/kio/pcs/pcs_rpc.c
> @@ -802,6 +802,10 @@ static void pcs_rpc_affinity(struct pcs_rpc *ep, bool was_idle)
>   				break;
>   			fallthrough;
>   		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 (time_is_before_jiffies(ep->cpu_stamp) && was_idle) {
>   				ep->cpu_stamp = jiffies + rpc_cpu_time_slice;



More information about the Devel mailing list