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:
Thanks for the reivew.+++ 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) ?
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.