share_pool: Optimize compact procedure
ascend inclusion category: perf bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA ------------------------------------------------- We did an compaction experiment on Hi1951. First creating external fragmentation, then echo 1 > /proc/sys/vm/compact_memory. Fragmentation size | 0G | 2G | 4G | 8G Compaction time(s) | 0.07 | 0.85 | 1.7 | 3.4 Obviously, sysctl_compaction_handler has a big performance impact. We optimize share pool compact procedure as follows: 1. At most one compact daemon is allowed. 2. Creating a compact daemon is only allowed when the last one is finished at least *sysctl_sp_compact_interval* seconds ago. Signed-off-by: NTang Yizhou <tangyizhou@huawei.com> Reviewed-by: NDing Tianhong <dingtianhong@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录