Re: [PATCH 1/6] IB/core: add support for draining Shared receive queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 19/06/2024 12:14, Sagi Grimberg wrote:


On 18/06/2024 19:07, Bart Van Assche wrote:
On 6/17/24 5:10 PM, Max Gurtovoy wrote:
+    if (wait_for_completion_timeout(&qp->srq_completion, 10 * HZ) > 0) {

I think this warrants a comment to why you stop after consuming cq->cqe completions
(i.e. shared completions).

There is a full explanation in the function documentation.


+        while (polled != cq->cqe) {
+            n = ib_process_cq_direct(cq, cq->cqe - polled);
+            if (!n)
+                return;
+            polled += n;
+        }
+    }

Why a hardcoded timeout (10 * HZ) instead of waiting forever?

Agreed. Is there a scenario where the IB event is missed or something?

I can change it to (60 * HZ) instead.

I prefer not waiting forever and getting a stuck kernel if the underlying device is defected.





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux