[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1c65b5c5-51ba-c5fc-a928-6008c55fe67c@linux.alibaba.com>
Date: Tue, 20 Sep 2022 17:03:05 +0800
From: Wen Gu <guwen@...ux.alibaba.com>
To: dust.li@...ux.alibaba.com, kgraul@...ux.ibm.com,
wenjia@...ux.ibm.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com
Cc: linux-s390@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net/smc: Introduce a specific sysctl for
TEST_LINK time
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
Powered by blists - more mailing lists