Received: by 10.223.185.116 with SMTP id b49csp5579096wrg; Tue, 27 Feb 2018 16:22:20 -0800 (PST) X-Google-Smtp-Source: AG47ELu1g0iWFsyV+INmoobURbAkYdpyauNNaWvba4ombRmmdOpnWejfT0ZTsZWeAh5AI683OHF6 X-Received: by 2002:a17:902:be14:: with SMTP id r20-v6mr10642272pls.172.1519777340544; Tue, 27 Feb 2018 16:22:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777340; cv=none; d=google.com; s=arc-20160816; b=P9ihPqVBz8ThRUZKa/7akUMomuX9rkr9bpp3SuL25Cx0ESif6BfSAGDu0D0f9nGice H1nqnVkhR+6lhLDw7n03fk1D6S7QCT0FlZRqnWFiljLVWS6834Q/8zz/jVjoNAkdFvhg rqXKDSDEO8rRtjZSrOWRjY7B94G13pm9IWG6gK12v7UOx4eDR1J1WX5CzyjN+UPThygx rSIYo6Yx/5ukOAMC79TenBzAszQWStco6lX4jEK9ABIpwV/NtFKhwWQkeAVDuuqI070S z2Q8xROk+I1vO2xyb6WqFOQpidJ3BKaI12sdebJ/TxAsWYaIbgu7VLgDVIhL/RaVK1Q7 uMFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=XRS9Il5vjEgRURPlKctZY4uHhd5e1ypcQ7q1XwPyoUs=; b=OG5aKjnN473Imwzht60nHPfP1N0tDOwztR0cumWApslZhTfFz0rtyAhJmd/DdI2i0m 5NqNZJhrNVk77hzyPg6Zu8r0QoCoslPzjeOdwG1ZLbsAPMSJMzeFsr2/aq2QCQ+UUFK+ DjeJQEKV23ZLm64o9HE1vjLZueuONv63ZOsiChx1CoUrLmisACJWZ2f9ojRLfD0qyeMV v3jIFZ4z2B2pWdYrru1+M5t0EZX+oZLCCRu+cKpjA3h8wPB7BwcdkyDvevYdWp/pIL9G s1jbJBYoPnN08l6NL/uA6cUcYpEnhDmEtbHMA0lzStZmg8jSW6Uy8vknei5RM+97WG4/ v4jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=PMSBp8hY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p29-v6si271412pli.731.2018.02.27.16.22.06; Tue, 27 Feb 2018 16:22:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=PMSBp8hY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751844AbeB1AVH (ORCPT + 99 others); Tue, 27 Feb 2018 19:21:07 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:61211 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304AbeB1AVF (ORCPT ); Tue, 27 Feb 2018 19:21:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1519777844; x=1551313844; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=zELXJctm9KVheEg2cOumpAau6kllh6CcfBwBu2sIxNw=; b=PMSBp8hYFr5xKpVpn97nbGbYVZrSf2kPMF11vPnftfWJyMSudDaK+M/F r4ONPpuCUTgKnoxQXB5TZrOgX14skAUW83ck4cxibAqELCfOC0J2kuHnT gZKA69/pFK4coF3ElH6Ud1M+8G7+HLKkK/G/dXV0zF8LfJcd/fD/wgbFs 5d6949sL2OcqbZ+p/ahw/5owQ+2DTQ2CDnC1PVnbIp+OUGfnQyTn+Ea/5 KQx05/iO6BZvBotee1/uhmYct+hhViPkyXTcu100nQlLbgh0Y8qAD2wcQ yVvxPL1tFYXsbv0jyvaYtL0sa2XCFp9w8rQw0WqxWG4UihBzgJNTQyC0k g==; X-IronPort-AV: E=Sophos;i="5.47,403,1515427200"; d="scan'208";a="168917285" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Feb 2018 08:30:43 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 27 Feb 2018 16:15:12 -0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO [10.11.46.240]) ([10.11.46.240]) by uls-op-cesaip02.wdc.com with ESMTP; 27 Feb 2018 16:21:05 -0800 Subject: Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant To: Max Gurtovoy , Jason Gunthorpe , Sagi Grimberg Cc: Chuck Lever , "arnd@arndb.de" , "dledford@redhat.com" , "linux-kernel@vger.kernel.org" , "leonro@mellanox.com" , "linux-rdma@vger.kernel.org" References: <20180220205924.2035765-1-arnd@arndb.de> <1519161268.3737.12.camel@wdc.com> <0f90134c-3d40-1d24-711f-e4ab32802bd8@mellanox.com> <20180227220958.GA21714@ziepe.ca> <193aaf91-c9d1-38b1-a89f-45f129ca5798@mellanox.com> From: Bart Van Assche Message-ID: Date: Tue, 27 Feb 2018 16:21:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <193aaf91-c9d1-38b1-a89f-45f129ca5798@mellanox.com> Content-Type: text/plain; charset=windows-1255; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/27/18 14:15, Max Gurtovoy wrote: > -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc > *poll_wc) > +static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc > *poll_wc, > +????????????????????????? int batch) > ?{ > -?????? int i, n, completed = 0; > -?????? struct ib_wc *wcs = poll_wc ? : cq->wc; > + int i, n, ib_poll_batch, completed = 0; > + struct ib_wc *wcs; > + > + if (poll_wc) { > + wcs = poll_wc; > + ib_poll_batch = batch; > + } else { > + wcs = cq->wc; > + ib_poll_batch = IB_POLL_BATCH; > + } Since this code has to be touched I think that we can use this opportunity to get rid of the "poll_wc ? : cq->wc" conditional and instead use what the caller passes. That will require to update all __ib_process_cq(..., ..., NULL) calls. I also propose to let the caller pass ib_poll_batch instead of figuring it out in this function. Otherwise the approach of this patch looks fine to me. Thanks, Bart.