mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wen Gu <guwen@linux.alibaba.com>
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
Subject: Re: [PATCH net-next 1/2] net/smc: Introduce a specific sysctl for TEST_LINK time
Date: Tue, 20 Sep 2022 17:03:05 +0800	[thread overview]
Message-ID: <1c65b5c5-51ba-c5fc-a928-6008c55fe67c@linux.alibaba.com> (raw)
In-Reply-To: <20220920082153.GD108825@linux.alibaba.com>



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

  reply	other threads:[~2022-09-20  9:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  2:45 [PATCH net-next 0/2] Separate SMC parameter settings from TCP sysctls Wen Gu
2022-09-20  2:53 ` [PATCH net-next 1/2] net/smc: Introduce a specific sysctl for TEST_LINK time Wen Gu
2022-09-20  2:57   ` Tony Lu
2022-09-20  4:55   ` dust.li
2022-09-20  6:23     ` Wen Gu
2022-09-20  8:21       ` dust.li
2022-09-20  9:03         ` Wen Gu [this message]
2022-09-20  2:54 ` [PATCH net-next 2/2] net/smc: Unbind r/w buffer size from clcsock and make them tunable Wen Gu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c65b5c5-51ba-c5fc-a928-6008c55fe67c@linux.alibaba.com \
    --to=guwen@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wenjia@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®