[Devel] [PATCH VZ9 2/3] fs/fuse kio: dispatch msgs in correct order from the krpc_send kthread

Liu Kui kui.liu at virtuozzo.com
Sat Apr 5 05:22:02 MSK 2025


The msgs kept in the llist are in reverse order that must be reversed
before traversing. Misordered msgs could hit performance severely.

Fixes: VSTOR-103577
https://virtuozzo.atlassian.net/browse/VSTOR-103577

Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_krpc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c
index eac6ac9c34bd..78180bdb4993 100644
--- a/fs/fuse/kio/pcs/pcs_krpc.c
+++ b/fs/fuse/kio/pcs/pcs_krpc.c
@@ -653,6 +653,7 @@ static int krpc_threadfn(void *data)
 
 		__set_current_state(TASK_RUNNING);
 
+		ll = llist_reverse_order(ll);
 		while (ll) {
 			struct llist_node *next = ll->next;
 			struct krpc_req *kreq = container_of(ll, struct krpc_req, llist_link);
-- 
2.39.5 (Apple Git-154)



More information about the Devel mailing list