[问题描述]: An23.2 6.6.25-2.2_rc1.an23.x86_64内核兼容性评估kparams部分fanotify、inotify监视器的最大数量有差异 需帮忙判断是否符合预期 具体差异项 key 6.6.25-2.1 6.6.25-2.2_rc1 /proc/sys/fs/inotify/max_user_watches 121908 121905 /proc/sys/fs/fanotify/max_user_marks 129723 129719 /proc/sys/user/max_fanotify_marks 129723 129719 /proc/sys/user/max_inotify_watches 121908 121905 [环境信息]: 数据采集评估机器类型:ECS [内核信息]: - 基准内核: 6.6.25-2.1.an23.x86_64 - 评估内核: 6.6.25-2.2_rc1.an23.x86_64 [操作系统信息]: [root@localhost ~]# cat /etc/os-release NAME="Anolis OS" VERSION="23.1" ID="anolis" VERSION_ID="23.1" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23.1" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [期望结果]: 需根据实际情况判断是否为内核问题 [实际结果]: 存在部分差异项
Created attachment 1220 [details] x86_kparams-all数据
上传附件x86环境kparams全量评估数据 result为same,无需关注 result为diff的有差异,部分项已经根据之前回复备注出,评估有差异属于正常。
- max_user_watches: 参考内核文档: Documentation/admin-guide/sysctl/fs.rst 中的介绍 ''' max_user_watches ---------------- Every epoll file descriptor can store a number of files to be monitored for event readiness. Each one of these monitored files constitutes a "watch". This configuration option sets the maximum number of "watches" that are allowed for each user. Each "watch" costs roughly 90 bytes on a 32-bit kernel, and roughly 160 bytes on a 64-bit one. The current default value for ``max_user_watches`` is 4% of the available low memory, divided by the "watch" cost in bytes. ''' 该值是动态的,根据当前可用的low memory 进行计算的。 - max_user_marks 参考内核代码: ''' /* * fanotify_user_setup - Our initialization function. Note that we cannot return * error because we have compiled-in VFS hooks. So an (unlikely) failure here * must result in panic(). */ static int __init fanotify_user_setup(void) { ... /* * Allow up to 1% of addressable memory to be accounted for per user * marks limited to the range [8192, 1048576]. mount and sb marks are * a lot cheaper than inode marks, but there is no reason for a user * to have many of those, so calculate by the cost of inode marks. */ max_marks = (((si.totalram - si.totalhigh) / 100) << PAGE_SHIFT) / INODE_MARK_COST; max_marks = clamp(max_marks, FANOTIFY_OLD_DEFAULT_MAX_MARKS, FANOTIFY_DEFAULT_MAX_USER_MARKS); ... init_user_ns.ucount_max[UCOUNT_FANOTIFY_MARKS] = max_marks; ... } device_initcall(fanotify_user_setup); ''' 该值也是动态计算的。 请将该结论记录到基线白名单中,后续遇到相关参数变化时默认认为参数变化符合预期。