The commit is pushed to "branch-rh10-6.12.0-55.13.1.2.x.vz10-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.2.24.vz10
------>
commit 9b13f86dec8a81f0a92d54cde09892ae7f1ff73e
Author: Alexey Kuznetsov <[email protected]>
Date: Fri Dec 5 17:10:44 2025 +0800
fs/fuse/kio: finish cleanup of unused flow detection code
It was not clean which was not obvious until QA detected
significant drop in performance because small ioreqs
were accounted as 512k ones.
Fixes: f2a0764cc5d25 ("fs/fuse kio: remove unused flow detection code")
https://virtuozzo.atlassian.net/browse/VSTOR-117505
Signed-off-by: Alexey Kuznetsov <[email protected]>
Feature: vStorage
(cherry picked from commit 774b2479fd4a1dd4317c64b77051a4a2e93e82fd)
---
fs/fuse/kio/pcs/pcs_cs.c | 2 --
fs/fuse/kio/pcs/pcs_map.c | 25 ++++++-------------------
fs/fuse/kio/pcs/pcs_req.h | 2 --
3 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_cs.c b/fs/fuse/kio/pcs/pcs_cs.c
index 8c7820617bd4b..98bbefa50f8a7 100644
--- a/fs/fuse/kio/pcs/pcs_cs.c
+++ b/fs/fuse/kio/pcs/pcs_cs.c
@@ -699,8 +699,6 @@ static void do_cs_submit(struct pcs_cs *cs, struct
pcs_int_request *ireq)
ioh->fiemap_count = PCS_FIEMAP_CHUNK_COUNT;
memset(&ioh->sync, 0, sizeof(ioh->sync));
- if (ireq->flags & IREQ_F_SEQ)
- ioh->sync.misc = PCS_CS_IO_SEQ;
if (ireq->dentry->no_csum_on_read)
ioh->sync.misc |= PCS_CS_IO_NOCSUM;
if ((ireq->dentry->fileinfo.attr.attrib & PCS_FATTR_IMMEDIATE_WRITE) ||
ireq->dentry->no_write_delay)
diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index db3605a29a4d9..4f2f0a2f0de63 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -1473,7 +1473,7 @@ static void pcs_cs_deaccount(struct pcs_int_request
*ireq, struct pcs_cs * cs, i
ireq->iochunk.cmd == PCS_REQ_T_FIEMAP)
cost = PCS_CS_HOLE_WEIGHT;
else
- cost = (ireq->flags & IREQ_F_RND_WEIGHT) ? 512*1024 :
cong_roundup(ireq->iochunk.size);
+ cost = cong_roundup(ireq->iochunk.size);
} else
cost = PCS_CS_FLUSH_WEIGHT;
@@ -1876,11 +1876,8 @@ static int select_cs_for_read(struct pcs_cluster_core
*cc, struct pcs_cs_list *
else if (io_locality == 0 && local_mask != local_busy_mask) {
selected = local_idx;
io_cost = local_min / 16;
- } else if (get_io_tweaks(cc) & PCS_TWEAK_IGNORE_SEQUENTIAL)
- selected = remote_idx;
- else {
+ } else
selected = remote_idx;
- }
/* Add penalty. The result of current decision will reflect itself in
latency
* after at least one round-trip time. Penalty poisons weight until
that moment.
@@ -2060,15 +2057,10 @@ static int pcs_cslist_submit_read(struct
pcs_int_request *ireq, struct pcs_cs_li
}
}
- sreq->flags &= ~(IREQ_F_RND_WEIGHT | IREQ_F_SEQ);
- if (ireq->iochunk.cmd != PCS_REQ_T_READ) {
+ if (ireq->iochunk.cmd != PCS_REQ_T_READ)
weight = PCS_CS_HOLE_WEIGHT;
- } else if (sreq->iochunk.size >= 512*1024) {
+ else
weight = cong_roundup(sreq->iochunk.size);
- } else {
- sreq->flags |= IREQ_F_RND_WEIGHT;
- weight = 512*1024;
- }
cs_increment_in_flight(cs, weight);
allot -= weight;
@@ -2225,15 +2217,10 @@ static int pcs_cslist_submit_write(struct
pcs_int_request *ireq, struct pcs_cs_l
}
}
- sreq->flags &= ~(IREQ_F_RND_WEIGHT | IREQ_F_SEQ);
- if (ireq->iochunk.cmd != PCS_REQ_T_WRITE) {
+ if (ireq->iochunk.cmd != PCS_REQ_T_WRITE)
weight = PCS_CS_HOLE_WEIGHT;
- } else if (sreq->iochunk.size > 512*1024) {
+ else
weight = cong_roundup(sreq->iochunk.size);
- } else {
- weight = 512*1024;
- sreq->flags |= IREQ_F_RND_WEIGHT;
- }
for (i = 0; i < csl->nsrv; i++)
cs_increment_in_flight(csl->cs[i].cslink.cs, weight);
diff --git a/fs/fuse/kio/pcs/pcs_req.h b/fs/fuse/kio/pcs/pcs_req.h
index 00af53adbe301..a8c9c9b8b9dba 100644
--- a/fs/fuse/kio/pcs/pcs_req.h
+++ b/fs/fuse/kio/pcs/pcs_req.h
@@ -114,9 +114,7 @@ struct pcs_int_request
int flags;
#define IREQ_F_FATAL 1
#define IREQ_F_ONCE 2
-#define IREQ_F_RND_WEIGHT 8
#define IREQ_F_CACHED 0x10
-#define IREQ_F_SEQ 0x20
#define IREQ_F_MAPPED 0x40
#define IREQ_F_MAP_REQUIRED 0x80
#define IREQ_F_LOC_TOKEN 0x100
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel