IB/mlx5: Fire the CQ completion handler from tasklet
authorMatan Barak <matanb@mellanox.com>
Sun, 17 Apr 2016 14:08:41 +0000 (17:08 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 18 May 2016 14:45:49 +0000 (10:45 -0400)
Previously, mlx5_ib_cq_comp was executed from interrupt context.
Under heavy load, this could cause the CPU core to be in an interrupt
context too long.
Instead of executing the handler from the interrupt context we
execute it from a much friendly tasklet context.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/cq.c

index a00ba4418de9ba79875c5b17ce9192c3fff6ba9f..dabcc65bd65e3b6a93adb47b9b53bbd67d08e15c 100644 (file)
@@ -879,7 +879,10 @@ struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev,
 
        mlx5_ib_dbg(dev, "cqn 0x%x\n", cq->mcq.cqn);
        cq->mcq.irqn = irqn;
-       cq->mcq.comp  = mlx5_ib_cq_comp;
+       if (context)
+               cq->mcq.tasklet_ctx.comp = mlx5_ib_cq_comp;
+       else
+               cq->mcq.comp  = mlx5_ib_cq_comp;
        cq->mcq.event = mlx5_ib_cq_event;
 
        INIT_LIST_HEAD(&cq->wc_list);