Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3659967rwb; Tue, 20 Sep 2022 02:53:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM69wJQH+7uRze8VN+fBSyo8rYxlShqhHFFfQ+bpABC2R5RSnqvMXtWs/n4GvcCPfyzMU1Ju X-Received: by 2002:a17:907:a068:b0:773:e2bd:554d with SMTP id ia8-20020a170907a06800b00773e2bd554dmr16503910ejc.743.1663667603330; Tue, 20 Sep 2022 02:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663667603; cv=none; d=google.com; s=arc-20160816; b=PjE7HFKRNT5C/UEv4ClJkAMtsEsqc5RGmtf9RwsS+PQUnDADpyLMBTi5VmhgCuoFEB /2KwmMwTU73VCFhOyoPdWgygyrf6OCwJwIOXKIEv+1/90odmELo1TUGqA5MQ2yUZ74W2 e3/Y4MUPYvC7txsNaCpLbv+t+BV+qaKDxrgTfrn6CYM6vUoe8Zrk1MJtzG9lq5XkPn3b cMdHkRLMLKC//4cXcOEBMUawu/e+ulKEv2nxwm48WlMpP6+BzEbaS9OcZo/xSccx4KwM 2IvOHH9OF8G2A06oOqhw8lwd/gsISR/Z3NzNM5HrliT6l20Jc5GXon+uxmZ6KRpNzJnk sjrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=yJRcXVcO7fiTDVAJa6AI6SACPJYwDOCOYLyNVYFzKdc=; b=JHIDQCxL0htmqgWFN+l8MwaHzDkQ+OrBG44XENN4TCHHCVJFKTdBeLQo2tA70WQlyT U6YLOomHgWCM+PQ0rPImtPn6JpE95vzeWi3/MsKYAQ12oi4IRzjzXWGJFXJIOISgWbV7 dCN6Bm18rDETQAMas5sZZEijlXm5BDq3ja0q/1HU4owqEGQjc/NJSyeLwWjh+gVtLtvj SVqeuGVEdWsl8MGUDB+qMfZevjAzaZVt6jwmfErj9c+82VapSWHHSUA738gakQMd6Ufc daY7z7fNRqVb/gI+xblC61YH4op0rJHSooGbeASxuQNCGpyIMF3KDW0HXRMELUBuF8Q1 DppQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a056402280e00b00453b9f11b8asi1591278ede.610.2022.09.20.02.52.58; Tue, 20 Sep 2022 02:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231615AbiITJGH (ORCPT + 99 others); Tue, 20 Sep 2022 05:06:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230409AbiITJFo (ORCPT ); Tue, 20 Sep 2022 05:05:44 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0FEA6E2DD; Tue, 20 Sep 2022 02:03:20 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VQIg0at_1663664586; Received: from 30.221.128.170(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0VQIg0at_1663664586) by smtp.aliyun-inc.com; Tue, 20 Sep 2022 17:03:07 +0800 Message-ID: <1c65b5c5-51ba-c5fc-a928-6008c55fe67c@linux.alibaba.com> Date: Tue, 20 Sep 2022 17:03:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH net-next 1/2] net/smc: Introduce a specific sysctl for TEST_LINK time To: dust.li@linux.alibaba.com, kgraul@linux.ibm.com, wenjia@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1663641907-15852-1-git-send-email-guwen@linux.alibaba.com> <1663642434-30035-1-git-send-email-guwen@linux.alibaba.com> <20220920045520.GC108825@linux.alibaba.com> <1ad45b33-d88a-54b7-fbfa-831f58fca9d2@linux.alibaba.com> <20220920082153.GD108825@linux.alibaba.com> From: Wen Gu In-Reply-To: <20220920082153.GD108825@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/9/20 16:21, dust.li wrote: > On Tue, Sep 20, 2022 at 02:23:09PM +0800, Wen Gu wrote: >> >> >> On 2022/9/20 12:55, dust.li wrote: >> >>> On Tue, Sep 20, 2022 at 10:53:54AM +0800, Wen Gu wrote: >>>> +++ b/net/smc/smc_llc.h >>>> @@ -19,6 +19,7 @@ >>>> >>>> #define SMC_LLC_WAIT_FIRST_TIME (5 * HZ) >>>> #define SMC_LLC_WAIT_TIME (2 * HZ) >>>> +#define SMC_LLC_TESTLINK_DEFAULT_TIME 30 >>> >>> I'm wondering why we don't follow the upper to macros using (30 * HZ) ? >>> >> Thanks for the reivew. >> >> Because the value of sysctl_smcr_testlink_time is in seconds, and the value >> of llc_testlink_time is jiffies. >> >> I have thought about >> 1) using proc_dointvec_jiffies as sysctl's proc_handler just like TCP does. >> But proc_dointvec_jiffies has no minimum limit, value 0 makes no sense for SMC testlink. > > Maybe 0 means disable the LLC TEST LINK ? > > >> 2) using proc_dointvec_ms_jiffies_minmax as proc_handler. But millisecond interval >> seems expensive for SMC test link. >> >> So, I choose to use proc_dointvec_minmax, make sysctl_smcr_testlink_time in >> seconds, and convert to jiffies when assigning to llc_testlink_time. > > If proc_dointvec_jiffies_minmax is really the problem, maybe you can > write your own proc handler. > Oops, I didn't noticed that value 0 means disabling LLC testlink in smc_llc_link_active(). So no need to set the minimum limit and proc_dointvec_jiffies will be fine. I will send a v2 to improve it. Thanks, Wen Gu