]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/mlx5_core: Use tasklet for user-space CQ completion events
authorMatan Barak <matanb@mellanox.com>
Sun, 17 Apr 2016 14:08:40 +0000 (17:08 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 18 May 2016 14:45:49 +0000 (10:45 -0400)
commit94c6825e0ff75829207af6246782811b7c7af2c0
tree695b147b15bbecbb234cbb06c6bd1fdab63c0abe
parente3b6d8cf8de6d07af9a27c86861edfa5b3290cb6
net/mlx5_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, mlx5 Ethernet
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: Doug Ledford <dledford@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/cq.c
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
include/linux/mlx5/cq.h
include/linux/mlx5/driver.h