Re: [PATCH net-next 1/2] net/smc: Introduce a specific sysctl for TEST_LINK time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux