[RHEL7,COMMIT] fs/fuse kio: export io_locality

Submitted by Konstantin Khorenko on April 15, 2019, 12:55 p.m.

Details

Message ID 201904151255.x3FCtD16010383@finist-ce7.sw.ru
State New
Series "KIO performance fixes"
Headers show

Commit Message

Konstantin Khorenko April 15, 2019, 12:55 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.94.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.94.13
------>
commit b57aff4506dc303bbcfac256885f8af7bee47dec
Author: Pavel Butsykin <pbutsykin@virtuozzo.com>
Date:   Mon Apr 15 15:55:13 2019 +0300

    fs/fuse kio: export io_locality
    
    We will need this option for performance analysis.
    
    Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
    
    =====================
    Patchset description:
    
    KIO performance fixes
    
    This patch-set aims to fix the performance issue with single-thread sequential
    async reads.
    
    https://pmc.acronis.com/browse/VSTOR-11050
    
    Acked-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
    
    Pavel Butsykin (4):
      fs/fuse kio: fix a typo in worth_to_grow()
      fs/fuse kio: relax congestion avoidance limits (backport from usermode)
      fs/fuse kio: add missed sock write in pcs_sock_sendmsg()
      fs/fuse kio: export io_locality
---
 fs/fuse/kio/pcs/pcs_cluster_core.c | 1 -
 fs/fuse/kio/pcs/pcs_map.c          | 7 ++++++-
 fs/fuse/kio/pcs/pcs_req.h          | 1 -
 3 files changed, 6 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_cluster_core.c b/fs/fuse/kio/pcs/pcs_cluster_core.c
index d1379c99ac6a..053325f94de9 100644
--- a/fs/fuse/kio/pcs/pcs_cluster_core.c
+++ b/fs/fuse/kio/pcs/pcs_cluster_core.c
@@ -159,7 +159,6 @@  int pcs_cc_init(struct pcs_cluster_core *cc, struct workqueue_struct *wq,
 	cc->cfg.curr = cc->cfg.def;
 	cc->cfg.sn = PCS_CONFIG_SEQ_ANY;
 
-	cc->io_locality = 0;
 	cc->io_tweaks = 0;
 	cc->netlat_cutoff = PCS_MAX_NETWORK_LATENCY*1000;
 	cc->iolat_cutoff = PCS_MAX_IO_LATENCY*1000;
diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 26b70df26b05..0d50250e6496 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -5,6 +5,7 @@ 
 #include <linux/rbtree.h>
 #include <linux/highmem.h>
 #include <linux/log2.h>
+#include <linux/module.h>
 
 #include "pcs_types.h"
 #include "pcs_sock_io.h"
@@ -30,6 +31,10 @@ 
 
 struct kmem_cache *pcs_map_cachep;
 
+unsigned int cs_io_locality = 0;
+module_param(cs_io_locality, uint, 0644);
+MODULE_PARM_DESC(cs_io_locality, "CS IO locality");
+
 static struct pcs_cs_list *cs_link_to_cs_list(struct pcs_cs_link *csl)
 {
 	struct pcs_cs_record *cs_rec;
@@ -1705,7 +1710,7 @@  static int get_io_locality(struct pcs_cluster_core *cc)
 {
 	int io_locality;
 
-	io_locality = cc->io_locality;
+	io_locality = cs_io_locality;
 	if (io_locality == 0)
 		io_locality = cc->cfg.curr.io_locality;
 
diff --git a/fs/fuse/kio/pcs/pcs_req.h b/fs/fuse/kio/pcs/pcs_req.h
index e668e55f0b71..604402de173d 100644
--- a/fs/fuse/kio/pcs/pcs_req.h
+++ b/fs/fuse/kio/pcs/pcs_req.h
@@ -215,7 +215,6 @@  struct pcs_cluster_core
 		int			in_progress;
 	} cfg;
 
-	int			io_locality;
 	int			io_tweaks;
 	int			iolat_cutoff;
 	int			netlat_cutoff;