android_kernel_msm-6.1_noth.../include/linux/mlx5
Yonatan Cohen 388ca8be00 IB/mlx5: Implement fragmented completion queue (CQ)
The current implementation of create CQ requires contiguous
memory, such requirement is problematic once the memory is
fragmented or the system is low in memory, it causes for
failures in dma_zalloc_coherent().

This patch implements new scheme of fragmented CQ to overcome
this issue by introducing new type: 'struct mlx5_frag_buf_ctrl'
to allocate fragmented buffers, rather than contiguous ones.

Base the Completion Queues (CQs) on this new fragmented buffer.

It fixes following crashes:
kworker/29:0: page allocation failure: order:6, mode:0x80d0
CPU: 29 PID: 8374 Comm: kworker/29:0 Tainted: G OE 3.10.0
Workqueue: ib_cm cm_work_handler [ib_cm]
Call Trace:
[<>] dump_stack+0x19/0x1b
[<>] warn_alloc_failed+0x110/0x180
[<>] __alloc_pages_slowpath+0x6b7/0x725
[<>] __alloc_pages_nodemask+0x405/0x420
[<>] dma_generic_alloc_coherent+0x8f/0x140
[<>] x86_swiotlb_alloc_coherent+0x21/0x50
[<>] mlx5_dma_zalloc_coherent_node+0xad/0x110 [mlx5_core]
[<>] ? mlx5_db_alloc_node+0x69/0x1b0 [mlx5_core]
[<>] mlx5_buf_alloc_node+0x3e/0xa0 [mlx5_core]
[<>] mlx5_buf_alloc+0x14/0x20 [mlx5_core]
[<>] create_cq_kernel+0x90/0x1f0 [mlx5_ib]
[<>] mlx5_ib_create_cq+0x3b0/0x4e0 [mlx5_ib]

Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-02-15 00:30:03 -08:00
..
cmd.h
cq.h net/mlx5: CQ hold/put API 2018-02-15 00:30:01 -08:00
device.h net/mlx5: Set software owner ID during init HCA 2018-01-08 11:42:20 -07:00
doorbell.h IB/mlx5: Use blue flame register allocator in mlx5_ib 2017-01-09 20:25:08 +02:00
driver.h IB/mlx5: Implement fragmented completion queue (CQ) 2018-02-15 00:30:03 -08:00
fs.h net/mlx5: Separate ingress/egress namespaces for each vport 2017-12-29 00:43:52 +02:00
mlx5_ifc.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-01-31 14:31:10 -08:00
mlx5_ifc_fpga.h net/mlx5: Accel, Add IPSec acceleration interface 2017-06-27 16:36:47 +03:00
port.h net/mlx5: QPTS and QPDPM register firmware command support 2017-11-04 21:26:21 -07:00
qp.h net/mlx5: Add DCT command interface 2018-01-08 11:38:49 -07:00
srq.h net/mlx5: Add XRQ support 2017-08-29 08:30:20 -04:00
transobj.h net/mlx5: Enable setting hairpin queue size 2018-01-19 22:41:32 +02:00
vport.h {net, IB}/mlx5: Manage port association for multiport RoCE 2018-01-08 11:42:22 -07:00