[ofa-general] [Bug 508] IPoIB CM multicast is hogging interrupts
Pradeep Satyanarayana
pradeep at us.ibm.com
Mon Apr 30 11:45:17 PDT 2007
> I think this trick I just came up with is a simpe way to prevent
> IPoIB TX from hogging interrupts, even without NAPI. And it might be a
better
> way to solve the problem for IPoIB CM TX than using a common cq
> as my previous patch did.
>
> This seems to hurt top bandwidth a bit in my testing, so this needs some
more
> work. Meanwhile, Scott, could you please check whether the following
> patch helps in your test-case?
>
> Roland, I think something similiar is a good idea for SRP, too.
> What do you think?
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index 2b242a4..3ed1536 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -573,14 +573,15 @@ static void ipoib_cm_handle_tx_wc(struct
> net_device *dev, struct ipoib_cm_tx *tx
> static void ipoib_cm_tx_completion(struct ib_cq *cq, void *tx_ptr)
> {
> struct ipoib_cm_tx *tx = tx_ptr;
> - int n, i;
> + int n, i, cnt = 0;
>
> ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
> do {
> n = ib_poll_cq(cq, IPOIB_NUM_WC, tx->ibwc);
> + cnt += n;
> for (i = 0; i < n; ++i)
> ipoib_cm_handle_tx_wc(tx->dev, tx, tx->ibwc + i);
> - } while (n == IPOIB_NUM_WC);
> + } while (n == IPOIB_NUM_WC && cnt < ipoib_sendq_size);
> }
This change might exit tx_completion sooner -how does that prevent
hogging interrupts (without NAPI)? I am not clear about that.
When NAPI is merged, would this be equivalent of running out of budget
and treated accordingly? Otherwise, one might continue to be in polling
mode
for a longer period and maybe starving other interfaces.
Pradeep
pradeep at us.ibm.com
More information about the general
mailing list