[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio: remove useless pcs_cs initialization
Konstantin Khorenko
khorenko at virtuozzo.com
Wed May 29 17:35:20 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.7
------>
commit 7b072c6a173c6142bf4205c2c82b87651228c1fa
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date: Fri May 24 18:55:00 2019 +0300
fs/fuse kio: remove useless pcs_cs initialization
It's not necessary to initialize cs data with zeros if the allocation is done
by kzalloc().
Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
=====================
Patchset description:
Statistics for vstorage kernel fast-path
Vstorage provides plenty of statistics information via 'vstorage -c cl mnt-top',
but when it comes kernel fast-path, it doesn't work. All because mnt-top
command collects information from .vstorage.info directory, where vstorage-mount
provides a lot of different statistical information in the form of files, but
it was not implemented for for fast-path.
This patch-set is aimed to implementation of the support of some statistics
inforamtion files from .vstorage.info:
cs_stats
fstat
fstat_lat
iostat
requests
Which will be located at "/sys/fs/fuse/connections/*mnt_id*/kio_stat/". This
will be enough to maintain vstorage mnt-top command for fast-path mount points.
https://pmc.acronis.com/browse/VSTOR-20979
Acked-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
Pavel Butsykin (14):
fs/fuse: add conn_ctl to fuse_conn struct
fs/fuse kio: create sysfs stat directory
fs/fuse kio: implement iostat statistics info
fs/fuse kio: make interface pcs_kio_file_list() for listing kio files
fs/fuse kio: make interface pcs_kio_req_list() for listing kio reqs
fs/fuse kio: add retry counter for kio requests
fs/fuse kio: implement pcs_strerror()
fs/fuse kio: implement requests statistics info
fs/fuse kio: implement fstat statistics info
fs/fuse kio: implement fstat_lat statistics info
fs/fuse kio: remove useless pcs_cs initialization
fs/fuse kio: implement cs statistics accounting
fs/fuse kio: convert rpc state id to string
fs/fuse kio: implement cs_stats statistics info
---
fs/fuse/kio/pcs/pcs_cs.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_cs.c b/fs/fuse/kio/pcs/pcs_cs.c
index 16992eb50e8d..64b0229e9bee 100644
--- a/fs/fuse/kio/pcs/pcs_cs.c
+++ b/fs/fuse/kio/pcs/pcs_cs.c
@@ -59,45 +59,25 @@ struct pcs_cs *pcs_cs_alloc(struct pcs_cs_set *css,
INIT_LIST_HEAD(&cs->lru_link);
spin_lock_init(&cs->lock);
cs->css = css;
- cs->in_flight = 0;
cs->cwnd = PCS_CS_INIT_CWND;
cs->eff_cwnd = PCS_CS_INIT_CWND;
cs->ssthresh = PCS_CS_INIT_CWND;
- cs->cwr_state = 0;
- atomic_set(&cs->latency_avg, 0);
- cs->net_latency_avg = 0;
- cs->last_latency = 0;
- cs->latency_stamp = 0;
- cs->net_latency_stamp = 0;
- cs->idle_stamp = 0;
- cs->in_flight_hwm = 0;
- cs->in_flight_hwm_stamp = 0;
+
pcs_cs_init_cong_queue(cs);
pcs_cs_init_active_list(cs);
cs->io_prio = -1;
- cs->mds_flags = 0;
- cs->io_prio_stamp = 0;
INIT_LIST_HEAD(&cs->flow_lru);
- cs->nflows = 0;
-
- cs->state = 0;
- cs->use_count = 0;
- cs->is_dead = 0;
INIT_LIST_HEAD(&cs->bl_link);
- cs->addr_serno = 0;
-
cs->rpc = pcs_rpc_create(&cc->eng, &cn_rpc_params, &cn_rpc_ops);
if (cs->rpc == NULL) {
kfree(cs);
return NULL;
}
cs->rpc->private = cs;
- cs->nmaps = 0;
INIT_LIST_HEAD(&cs->map_list);
- memset(&cs->stat, 0, sizeof(cs->stat));
return cs;
}
More information about the Devel
mailing list