[Devel] [PATCH 4/4] fs/fuse kio: export io_locality
Pavel Butsykin
pbutsykin at virtuozzo.com
Mon Apr 15 12:04:01 MSK 2019
We will need this option for performance analysis.
Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
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(-)
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 9c3762c92315..e794b94095f3 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;
@@ -1704,7 +1709,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;
--
2.15.1
More information about the Devel
mailing list