[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio_pcs: time slice for rpc rebinding

Konstantin Khorenko khorenko at virtuozzo.com
Thu Sep 27 12:41:02 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.11.6.vz7.71.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.11.6.vz7.71.15
------>
commit cfc3e1fb3a4daf8a73997bbd46ca963ff11b3f82
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Thu Sep 27 12:41:02 2018 +0300

    fs/fuse kio_pcs: time slice for rpc rebinding
    
    Forwarding time slice for rpc rebinding as option in sysfs.
    
    It's hard to say what value this parameter will be the most optimal, let's throw
    it outside so that we can play with it.
    
    https://pmc.acronis.com/browse/VSTOR-14031
    
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rpc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c
index 9f0dfd017579..e3fb8a14c2ab 100644
--- a/fs/fuse/kio/pcs/pcs_rpc.c
+++ b/fs/fuse/kio/pcs/pcs_rpc.c
@@ -34,6 +34,10 @@ static unsigned int rpc_affinity_mode = RPC_AFFINITY_SPREAD;
 module_param(rpc_affinity_mode, uint, 0644);
 MODULE_PARM_DESC(rpc_affinity_mode, "RPC affinity mode");
 
+static unsigned long rpc_cpu_time_slice = PCS_RPC_CPU_SLICE;
+module_param(rpc_cpu_time_slice, ulong, 0644);
+MODULE_PARM_DESC(rpc_cpu_time_slice, "Time slice for RPC rebinding");
+
 static void timer_work(struct work_struct *w);
 static int rpc_gc_classify(struct pcs_rpc * ep);
 
@@ -653,13 +657,13 @@ static void pcs_rpc_affinity(struct pcs_rpc *ep, bool was_idle)
 		case RPC_AFFINITY_RETENT:
 			/* Naive socket-to-cpu binding approach */
 			if (time_is_before_jiffies(ep->cpu_stamp) && was_idle) {
-				ep->cpu_stamp = jiffies + PCS_RPC_CPU_SLICE;
+				ep->cpu_stamp = jiffies + rpc_cpu_time_slice;
 				ep->cpu = smp_processor_id();
 			}
 			break;
 		case RPC_AFFINITY_SPREAD:
 			if (time_is_before_jiffies(ep->cpu_stamp) && was_idle) {
-				ep->cpu_stamp = jiffies + PCS_RPC_CPU_SLICE;
+				ep->cpu_stamp = jiffies + rpc_cpu_time_slice;
 				ep->cpu = pcs_rpc_cpu_next();
 			}
 			break;


More information about the Devel mailing list