Commit 12fba722 authored by Tang Yizhou's avatar Tang Yizhou Committed by Yang Yingliang
Browse files

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: default avatarTang Yizhou <tangyizhou@huawei.com>
Reviewed-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 925b5be0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment