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 b6133ff6b308efb601a63a6b54993fd377cecc50
Author: Pavel Butsykin <pbutsy...@virtuozzo.com>
Date:   Mon Apr 15 15:55:12 2019 +0300

    fs/fuse kio: add missed sock write in pcs_sock_sendmsg()
    
    We need to write the ready data to socket, in case write_queue list is 
empty,
    instead of rescheduling it. This will help maintain a balance between recv 
and
    send, because after rescheduling the receive will be called first.
    
    Signed-off-by: Pavel Butsykin <pbutsy...@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 <kuz...@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_sock_io.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c
index ede71c255084..e0699f57a007 100644
--- a/fs/fuse/kio/pcs/pcs_sock_io.c
+++ b/fs/fuse/kio/pcs/pcs_sock_io.c
@@ -415,6 +415,8 @@ int pcs_sockio_delayed_seg(struct pcs_sockio *sio)
 
 void pcs_sock_sendmsg(struct pcs_sockio * sio, struct pcs_msg *msg)
 {
+       int was_idle = list_empty(&sio->write_queue);
+
        DTRACE("sio(%p) msg:%p\n", sio, msg);
 
        if (pcs_if_error(&sio->error)) {
@@ -432,6 +434,10 @@ void pcs_sock_sendmsg(struct pcs_sockio * sio, struct 
pcs_msg *msg)
        if (!(sio->flags & PCS_SOCK_F_POOLOUT))
                sio->flags |= PCS_SOCK_F_POOLOUT;
 
+       if (was_idle) {
+               sio->flags &= ~PCS_SOCK_F_POOLOUT;
+               pcs_sockio_send(sio);
+       }
 }
 
 /* Try to cancel message send. If it is impossible, because message is in the 
middle

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to