Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:34048 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbeBWAEv (ORCPT ); Thu, 22 Feb 2018 19:04:51 -0500 Subject: Re: [for-next 7/7] IB/mlx5: Implement fragmented completion queue (CQ) To: Saeed Mahameed , "David S. Miller" , Doug Ledford Cc: Leon Romanovsky , Jason Gunthorpe , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Yonatan Cohen , Leon Romanovsky References: <20180221201354.8802-1-saeedm@mellanox.com> <20180221201354.8802-8-saeedm@mellanox.com> From: Santosh Shilimkar Message-ID: <223b6be9-4876-d509-492a-dcef92be13de@oracle.com> Date: Thu, 22 Feb 2018 16:04:37 -0800 MIME-Version: 1.0 In-Reply-To: <20180221201354.8802-8-saeedm@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: Hi Saeed On 2/21/2018 12:13 PM, Saeed Mahameed wrote: > From: Yonatan Cohen > > 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 > Reviewed-by: Tariq Toukan > Signed-off-by: Leon Romanovsky > Signed-off-by: Saeed Mahameed > --- Jason mentioned about this patch to me off-list. We were seeing similar issue with SRQs & QPs. So wondering whether you have any plans to do similar change for other resouces too so that they don't rely on higher order page allocation for icm tables. Regards, Santosh