<head></head><body style="line-height: 1.5; font-size: 14px; color: rgba(38, 42, 51, 0.9); font-family: Source Han Sans;">
<div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      ">Hi Philipp,<span data-mce-type="bookmark" id="mce_1_start" data-mce-style="overflow:hidden;line-height:0px" style="overflow: hidden; line-height: 0px;"></span></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      "><br data-mce-bogus="1"></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      ">Thanks for reply.&nbsp; I will run checkpatch.pl next time.<span data-mce-type="bookmark" id="mce_2_start" data-mce-style="overflow:hidden;line-height:0px" style="overflow: hidden; line-height: 0px;"></span><br data-mce-bogus="1"></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      "><br></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      ">Best regards,<span data-mce-type="bookmark" id="mce_3_start" data-mce-style="overflow:hidden;line-height:0px" style="overflow: hidden; line-height: 0px;"></span><br></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      ">&nbsp; &nbsp;Zhengbing<span data-mce-type="bookmark" id="mce_4_start" data-mce-style="overflow:hidden;line-height:0px" style="overflow: hidden; line-height: 0px;"></span></div><div class="mail-signature">     <div class="lingxi-signature-container" style="font-family: PingFang,Source Han Sans,sans-serif;">          <!-- 样式一,完整版 -->          <table style="border-collapse: collapse;width: 100%;text-size-adjust:none !important;table-layout: fixed;" class="mce-item-table">               <tbody style="text-size-adjust:none !important;word-wrap:break-word; word-break:break-all;">                                   </tbody>          </table>          <!-- 样式二,无头像 -->          <div id="lingxi-signature-v2-block" style="width: 100%;text-decoration: none;text-underline: none;">               <div id="lingxi-signature-v2-content" itemid="id" style="max-width: 95%;font-size: 14px;line-height: 16px;color: #7A8599;padding: 16px 16px 4px 0px;margin-left: 0px;" itemprop="5317106">                    <div style="color: #232D47;border: none;margin-bottom:4px;font-size: 16px;line-height: 20px;text-underline: none;font-weight: bolder;" itemid="name"><br></div>                                                            <div style="border: none;margin-bottom:8px;text-underline: none;">zhengbing.huang@easystack.cn</div>                                                                           </div>          </div>          <!--办公品牌-->               </div></div><div></div><div class="pre-mail-content"><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      "><br></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      "><br></div><div style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      " data-mce-style="font-family:Source Han Sans;font-size:14px;line-height:1.5;
      "><br></div><div id="isReplyContent" style="margin: 0;"><div style="color: #7d8085">Original:</div><ul style="color: #7d8085; font-size:12px; padding-left: 20px"><li>From:Philipp Reisner &lt;<a href="mailto:philipp.reisner@linbit.com">philipp.reisner@linbit.com</a>&gt;</li><li>Date:2025-07-30 22:19:20(中国 (GMT+08:00))</li><li>To:zhengbing.huang&lt;<a href="mailto:zhengbing.huang@easystack.cn">zhengbing.huang@easystack.cn</a>&gt;</li><li>Cc:drbd-dev&lt;<a href="mailto:drbd-dev@lists.linbit.com">drbd-dev@lists.linbit.com</a>&gt;</li><li>Subject:Re: [PATCH 2/3] rdma: ratelimit error log</li></ul><div dir="ltr">Hi Zhengbing,<br><br>Thanks. This patch contains a coding style error. Or <a href="http://checkpatch.pl">checkpatch.pl</a> error. There should be a space between the if and the opening bracket. Please run a <a href="http://checkpatch.pl">checkpatch.pl</a> on your end before sending patches.<br><br>I fixed it and applied it.<br><br>Best regards,<br>&nbsp;Philipp</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jul 8, 2025 at 12:19 PM zhengbing.huang &lt;<a href="mailto:zhengbing.huang@easystack.cn">zhengbing.huang@easystack.cn</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Have a crash call trace as follow:<br>
&nbsp; ? bit_clear+0x120/0x120<br>
&nbsp; fbcon_putcs+0xe7/0x100<br>
&nbsp; fbcon_redraw.isra.20+0xfd/0x1e0<br>
&nbsp; fbcon_scroll+0x8c9/0xde0<br>
&nbsp; con_scroll+0x20b/0x220<br>
&nbsp; ? bit_clear+0x120/0x120<br>
&nbsp; lf+0xa0/0xb0<br>
&nbsp; vt_console_print+0x310/0x400<br>
&nbsp; console_unlock+0x35f/0x4a0<br>
&nbsp; vprintk_emit+0x14d/0x250<br>
&nbsp; printk+0x58/0x6f<br>
&nbsp; dtr_tx_cq_event_handler+0x895/0x8a0 [drbd_transport_rdma]<br>
&nbsp; ? sched_clock+0x5/0x10<br>
&nbsp; ? do_IRQ+0x7f/0xd0<br>
&nbsp; mlx5_eq_comp_int+0xb0/0x1d0 [mlx5_core]<br>
&nbsp; notifier_call_chain+0x47/0x70<br>
&nbsp; atomic_notifier_call_chain+0x16/0x20<br>
&nbsp; irq_int_handler+0x11/0x20 [mlx5_core]<br>
<br>
and the code is:<br>
(gdb) l *dtr_tx_cq_event_handler+0x894<br>
0x3404 is in dtr_tx_cq_event_handler (.../drbd_transport_rdma.c:1935).<br>
1930&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (stream_nr != ST_FLOW_CTRL) {<br>
1931&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; err = dtr_repost_tx_desc(cm, tx_desc);<br>
1932&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!err)<br>
1933&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tx_desc = NULL; /* it is in the air again! Fly! */<br>
1934&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br>
1935&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tr_warn(transport, "repost of tx_desc failed! %d\n", err);<br>
1936&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
<br>
This problem is that too many logs print in irq, cause the kernel crash.<br>
<br>
So, we ratelimit error log<br>
<br>
Signed-off-by: zhengbing.huang &lt;<a href="mailto:zhengbing.huang@easystack.cn" target="_blank">zhengbing.huang@easystack.cn</a>&gt;<br>
---<br>
&nbsp;drbd/drbd_transport_rdma.c | 2 +-<br>
&nbsp;1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drbd/drbd_transport_rdma.c b/drbd/drbd_transport_rdma.c<br>
index 5270e503a..30edfaf96 100644<br>
--- a/drbd/drbd_transport_rdma.c<br>
+++ b/drbd/drbd_transport_rdma.c<br>
@@ -1920,7 +1920,7 @@ static int dtr_handle_tx_cq_event(struct ib_cq *cq, struct dtr_cm *cm)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; err = dtr_repost_tx_desc(cm, tx_desc);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!err)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tx_desc = NULL; /* it is in the air again! Fly! */<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if(__ratelimit(&amp;rdma_transport-&gt;rate_limit))<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tr_warn(transport, "repost of tx_desc failed! %d\n", err);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; &nbsp; }<br>
-- <br>
2.43.0<br>
<br>
</blockquote></div>
</div></div>
<br></body>