From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00601C64EC4 for ; Wed, 1 Mar 2023 01:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbjCABot (ORCPT ); Tue, 28 Feb 2023 20:44:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjCABot (ORCPT ); Tue, 28 Feb 2023 20:44:49 -0500 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B42CC18AB5; Tue, 28 Feb 2023 17:44:46 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R521e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=kaishen@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0Vcl6C0o_1677635083; Received: from 30.221.113.18(mailfrom:KaiShen@linux.alibaba.com fp:SMTPD_---0Vcl6C0o_1677635083) by smtp.aliyun-inc.com; Wed, 01 Mar 2023 09:44:44 +0800 Message-ID: Date: Wed, 1 Mar 2023 09:44:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH net-next v2] net/smc: Use percpu ref for wr tx reference Content-Language: en-US To: Wenjia Zhang , Guangguan Wang , kgraul@linux.ibm.com, jaka@linux.ibm.com Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org, linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org References: <20230227121616.448-1-KaiShen@linux.alibaba.com> From: Kai In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On 2023/2/28 8:52 下午, Wenjia Zhang wrote: > > > On 28.02.23 13:15, Guangguan Wang wrote: >> >> On 2023/2/28 19:34, Kai wrote: >>> >>> >>> On 2023/2/28 6:55 下午, Wenjia Zhang wrote: >>> >>>> @Kai, the performance improvement seems not so giant, but the method >>>> looks good, indeed. However, to keep the consistency of the code, >>>> I'm wondering why you only use the perf_ref for wr_tx_wait, but not >>>> for wr_reg_refcnt? >>> Didn't check the similar refcnt, my bad. >>> On the other hand, Our work is inspired by performance analysis, it >>> seems wr_reg_refcnt is not on the IO path. It may not contribute to >>> performance improvement. >>> And inspired by your comment, it seems we can also make the refcnt >>> cdc_pend_tx_wr a perfcpu one. I will look into this. >>> >>> Thanks >> >> cdc_pend_tx_wr needs to be zero value tested every time it decreases >> in smc_cdc_tx_handler. >> I don't think this is the right scenario for percpu_ref. > > I agree, that's why I didn't mention it;) > > But could you please check about wr_reg_refcnt? Because we do need to > find the right balance between the code consistency and improvement Will do