net/smc: add sysctl for smc_limit_hs
Subsystems (5)
D. Wythe
maintainerPATCH 1/1 net/smc: add sysctl for smc_limit_hs
From: "D. Wythe" <[email protected]>
In commit 48b6190a0042 ("net/smc: Limit SMC visits when handshake workqueue congested"), we introduce a mechanism to put constraint on SMC connections visit according to the pressure of SMC handshake process.
At that time, we believed that controlling the feature through netlink was sufficient. However, most people have realized now that netlink is not convenient in container scenarios, and sysctl is a more suitable approach.
In addition, since commit 462791bbfa35 ("net/smc: add sysctl interface for SMC") had introcuded smc_sysctl_net_init(), it is reasonable for us to initialize limit_smc_hs in it instead of initializing it in smc_pnet_net_int().
--- net/smc/smc_pnet.c | 3 --- net/smc/smc_sysctl.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-)
net/smc/smc_pnet.c +0 -3
@@ -887,9 +887,6 @@ int smc_pnet_net_init(struct net *net)smc_pnet_create_pnetids_list (net); -/* disable handshake limitation by default */ - net->smc.limit_smc_hs =0 ; -return 0 ; }
net/smc/smc_sysctl.c +11 -0
@@ -90,6 +90,15 @@ .extra1 = &conns_per_lgr_min, .extra2 = &conns_per_lgr_max, }, + { + .procname = "limit_smc_hs", + .data = &init_net.smc.limit_smc_hs, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ONE, + }, };int __net_init smc_sysctl_net_init (struct net *net)
@@ -121,6 +130,8 @@ int __net_init smc_sysctl_net_init(struct net *net)WRITE_ONCE (net->smc.sysctl_rmem, net_smc_rmem_init); net->smc.sysctl_max_links_per_lgr =SMC_LINKS_PER_LGR_MAX_PREFER ; net->smc.sysctl_max_conns_per_lgr =SMC_CONN_PER_LGR_PREFER ; +/* disable handshake limitation by default */ + net->smc.limit_smc_hs =0 ;return 0 ;
Signature · 1 line
1.8.3.1
Paolo Abeni
maintainerQuoted 10 lines · D. Wythe
From: "D. Wythe" <[email protected]>
In commit
48b6190a0042("net/smc: Limit SMC visits when handshake workqueue congested"), we introduce a mechanism to put constraint on SMC connections visit according to the pressure of SMC handshake process.At that time, we believed that controlling the feature through netlink was sufficient. However, most people have realized now that netlink is not convenient in container scenarios, and sysctl is a more suitable approach.
Not blocking this patch, but could you please describe why/how NL is less convenient? is possibly just a matter of lack of command line tool to operate on NL? yaml to the rescue ;)
Cheers,
Paolo
D. Wythe
maintainerQuoted 12 lines · Paolo Abeni
Quoted 10 lines · D. Wythe
From: "D. Wythe" <[email protected]>
In commit
48b6190a0042("net/smc: Limit SMC visits when handshake workqueue congested"), we introduce a mechanism to put constraint on SMC connections visit according to the pressure of SMC handshake process.At that time, we believed that controlling the feature through netlink was sufficient. However, most people have realized now that netlink is not convenient in container scenarios, and sysctl is a more suitable approach.
Quoted 5 lines
Not blocking this patch, but could you please describe why/how NL is less convenient? is possibly just a matter of lack of command line tool to operate on NL? yaml to the rescue ;)
Cheers,
Paolo
Hi Paolo,
Based on the information I've gathered, there are several aspects:
1. There is a lack of support for YAML on NL in popular products.
2. The infrastructure related to NLwas not yet sound enough. For example, how to disable settings for certain NL in container, while we can do it within sysctls. Also, regular synchronization. NL may be able to implement it (maybe via Yaml ), but it still be waiting
for support in popular products.
Best wishes,
D. Wythe
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 6 lines · On Fri, 6 Sep 2024 10:35:35 +0800 you wrote:
From: "D. Wythe" <[email protected]>
In commit
48b6190a0042("net/smc: Limit SMC visits when handshake workqueue congested"), we introduce a mechanism to put constraint on SMC connections visit according to the pressure of SMC handshake process.
Quoted 6 lines
At that time, we believed that controlling the feature through netlink was sufficient. However, most people have realized now that netlink is not convenient in container scenarios, and sysctl is a more suitable approach.
[...]
Here is the summary with links:
- [net-next] net/smc: add sysctl for smc_limit_hs
https://git.kernel.org/netdev/net-next/c/f8406a2fd279
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html