<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello, Den.<br>
Who could help with preparing RK for this patch ?</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>От:</b> Alexey Kuznetsov &lt;kuznet@virtuozzo.com&gt;<br>
<b>Отправлено:</b> 8 мая 2025 г. 14:15<br>
<b>Кому:</b> Kui Liu &lt;kui.liu@virtuozzo.com&gt;<br>
<b>Копия:</b> devel@openvz.org &lt;devel@openvz.org&gt;; Andrey Zaitsev &lt;azaitsev@virtuozzo.com&gt;; Konstantin Khorenko &lt;khorenko@virtuozzo.com&gt;<br>
<b>Тема:</b> Re: [PATCH VZ9] fs/fuse kio: fix hang rpc over rdma io</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hello!<br>
<br>
Can we make this to ready-kernel patch for 5.14.0-427.33.1.vz9.72.5?<br>
I promised customer in <a href="https://virtuozzo.atlassian.net/browse/ASUP-1425">
https://virtuozzo.atlassian.net/browse/ASUP-1425</a><br>
to repair this issue without reboot.<br>
<br>
On Thu, May 8, 2025 at 7:11 PM Alexey Kuznetsov &lt;kuznet@virtuozzo.com&gt; wrote:<br>
&gt;<br>
&gt; Ack<br>
&gt;<br>
&gt; On Thu, May 8, 2025 at 12:26 PM Liu Kui &lt;kui.liu@virtuozzo.com&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; When a large msg is being sent out over rdma and in the stage of waiting<br>
&gt; &gt; for read ack from peer, it is moved from rio-&gt;write_queue to rio-&gt;active_txs.<br>
&gt; &gt; However the msg in rio-&gt;active_txs is not checked by pcs_rdma_next_timeout()<br>
&gt; &gt; to return a correct timeout back to rpc, as a result the rpc timer is not<br>
&gt; &gt; started. When the peer somehow becomes unresponsive, the msg at rio-&gt;active_txs<br>
&gt; &gt; can be stuck at waiting for read ack stage forever, because it can't be killed<br>
&gt; &gt; by the calendar timer since it's now under network I/O. As a result, the rpc<br>
&gt; &gt; can hang forever without detecting the stuck msg at underlying rdma io.<br>
&gt; &gt;<br>
&gt; &gt; Apparently pcs_rdma_next_timeout should return the next timeout based on<br>
&gt; &gt; first msg in rio-&gt;active_txs.<br>
&gt; &gt;<br>
&gt; &gt; Fixes: #VSTOR-105982<br>
&gt; &gt; <a href="https://virtuozzo.atlassian.net/browse/VSTOR-105982">https://virtuozzo.atlassian.net/browse/VSTOR-105982</a><br>
&gt; &gt;<br>
&gt; &gt; Signed-off-by: Liu Kui &lt;kui.liu@virtuozzo.com&gt;<br>
&gt; &gt; ---<br>
&gt; &gt;&nbsp; fs/fuse/kio/pcs/pcs_rdma_io.c | 15 +++++++++++----<br>
&gt; &gt;&nbsp; 1 file changed, 11 insertions(+), 4 deletions(-)<br>
&gt; &gt;<br>
&gt; &gt; diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c<br>
&gt; &gt; index 2755b13fb8a5..6fa38338ad0c 100644<br>
&gt; &gt; --- a/fs/fuse/kio/pcs/pcs_rdma_io.c<br>
&gt; &gt; +++ b/fs/fuse/kio/pcs/pcs_rdma_io.c<br>
&gt; &gt; @@ -1668,14 +1668,21 @@ static unsigned long pcs_rdma_next_timeout(struct pcs_netio *netio)<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct pcs_rdmaio *rio = rio_from_netio(netio);<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct pcs_rpc *ep = netio-&gt;parent;<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct pcs_msg *msg;<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct rio_tx *tx;<br>
&gt; &gt;<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUG_ON(!mutex_is_locked(&amp;ep-&gt;mutex));<br>
&gt; &gt;<br>
&gt; &gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (list_empty(&amp;rio-&gt;write_queue))<br>
&gt; &gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!list_empty(&amp;rio-&gt;active_txs)) {<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tx = list_first_entry(&amp;rio-&gt;active_txs, struct rio_tx, list);<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return tx-&gt;msg-&gt;start_time + rio-&gt;send_timeout;<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &gt;<br>
&gt; &gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg = list_first_entry(&amp;rio-&gt;write_queue, struct pcs_msg, list);<br>
&gt; &gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return msg-&gt;start_time + rio-&gt;send_timeout;<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!list_empty(&amp;rio-&gt;write_queue)) {<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg = list_first_entry(&amp;rio-&gt;write_queue, struct pcs_msg, list);<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return msg-&gt;start_time + rio-&gt;send_timeout;<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &gt; +<br>
&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br>
&gt; &gt;&nbsp; }<br>
&gt; &gt;<br>
&gt; &gt;&nbsp; static int pcs_rdma_sync_send(struct pcs_netio *netio, struct pcs_msg *msg)<br>
&gt; &gt; --<br>
&gt; &gt; 2.39.5 (Apple Git-154)<br>
</div>
</span></font></div>
</body>
</html>