From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751804AbeB0WKG (ORCPT ); Tue, 27 Feb 2018 17:10:06 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37481 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbeB0WKD (ORCPT ); Tue, 27 Feb 2018 17:10:03 -0500 X-Google-Smtp-Source: AG47ELsOEp655tyz1mp0lvXxJxHx6lA7oJdzxD1pOhNeoSMr/YtfvH+X4KNYia5wmvRl6TODcAUifQ== Date: Tue, 27 Feb 2018 15:09:58 -0700 From: Jason Gunthorpe To: Sagi Grimberg Cc: Max Gurtovoy , Chuck Lever , Bart Van Assche , "arnd@arndb.de" , "dledford@redhat.com" , "linux-kernel@vger.kernel.org" , "leonro@mellanox.com" , "linux-rdma@vger.kernel.org" Subject: Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant Message-ID: <20180227220958.GA21714@ziepe.ca> References: <20180220205924.2035765-1-arnd@arndb.de> <1519161268.3737.12.camel@wdc.com> <0f90134c-3d40-1d24-711f-e4ab32802bd8@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 05:39:09PM +0200, Sagi Grimberg wrote: > > >>The only reason why I added this array on-stack was to allow consumers > >>that did not use ib_alloc_cq api to call it, but that seems like a > >>wrong decision when thinking it over again (as probably these users > >>did not set the wr_cqe correctly). > >> > >>How about we make ib_process_cq_direct use the cq wc array and add > >>a WARN_ON statement (and fail it gracefully) if the caller used this > >>API without calling ib_alloc_cq? > > > >but we tried to avoid cuncurrent access to cq->wc. > > Not sure its a valid use-case. But if there is a compelling > reason to keep it as is, then we can do smaller on-stack > array. Did we come to a conclusion what to do here? Jason