net/mlx4_core: Use tasklet for user-space CQ completion events
Previously, we've fired all our completion callbacks straight from our ISR. Some of those callbacks were lightweight (for example, mlx4_en's and IPoIB napi callbacks), but some of them did more work (for example, the user-space RDMA stack uverbs' completion handler). Besides that, doing more than the minimal work in ISR is generally considered wrong, it could even lead to a hard lockup of the system. Since when a lot of completion events are generated by the hardware, the loop over those events could be so long, that we'll get into a hard lockup by the system watchdog. In order to avoid that, add a new way of invoking completion events callbacks. In the interrupt itself, we add the CQs which receive completion event to a per-EQ list and schedule a tasklet. In the tasklet context we loop over all the CQs in the list and invoke the user callback. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Cette révision appartient à :

révisé par
David S. Miller

Parent
383677da43
révision
3dca0f42c7
@@ -233,7 +233,10 @@ struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, int entries, int vector
|
||||
if (err)
|
||||
goto err_dbmap;
|
||||
|
||||
cq->mcq.comp = mlx4_ib_cq_comp;
|
||||
if (context)
|
||||
cq->mcq.tasklet_ctx.comp = mlx4_ib_cq_comp;
|
||||
else
|
||||
cq->mcq.comp = mlx4_ib_cq_comp;
|
||||
cq->mcq.event = mlx4_ib_cq_event;
|
||||
|
||||
if (context)
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur