diff options
| author | Matan Barak <matanb@mellanox.com> | 2014-12-11 03:57:53 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-12-11 14:47:34 -0500 |
| commit | 3dca0f42c7baaa4e01699629da13d6556f001ebe (patch) | |
| tree | 783a6fd1ba3285481503056ce2e69337fa46ef59 /include/linux | |
| parent | 383677da43fa83b390888cf7d25885166b2a6812 (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/device.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index cf09e65c2901..3951b5368d7e 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -621,6 +621,11 @@ struct mlx4_cq { | |||
| 621 | 621 | ||
| 622 | atomic_t refcount; | 622 | atomic_t refcount; |
| 623 | struct completion free; | 623 | struct completion free; |
| 624 | struct { | ||
| 625 | struct list_head list; | ||
| 626 | void (*comp)(struct mlx4_cq *); | ||
| 627 | void *priv; | ||
| 628 | } tasklet_ctx; | ||
| 624 | }; | 629 | }; |
| 625 | 630 | ||
| 626 | struct mlx4_qp { | 631 | struct mlx4_qp { |
