作者说这块代码太旧了,别管了。。。
This is a very old kernel.
The function you mention was removed over ten years ago and the way sysctls are registered today is completely different.
try_attach() was removed in
commit 7ec66d06362d ("sysctl: Stop requiring explicit management of sysctl directories") citing performance reasons.
This may be same performance issue you are encountering and maybe you can take inspiration from that commit to avoid it.
Or even better, upgrade to a newer kernel.
【 在 ameng 的大作中提到: 】
: 不知道为啥 attach
: 这个 header 是啥玩意?
: 好像是给一棵树从某个节点一直到根的所有节点所在层都做一下 attach。
: ...................
--
FROM 218.66.32.*