diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-04-08 13:56:05 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-05-12 05:35:51 +0200 |
commit | 5e6bbde95982300d66d78fb282d4ee39df78fc33 (patch) | |
tree | 6f8840f358d86936f736cbf2141ca77b49ecebf8 /net/ipv6/mcast.c | |
parent | f2fs: introduce f2fs_bmap_compress() (diff) | |
download | linux-5e6bbde95982300d66d78fb282d4ee39df78fc33.tar.xz linux-5e6bbde95982300d66d78fb282d4ee39df78fc33.zip |
f2fs: introduce mempool for {,de}compress intermediate page allocation
If compression feature is on, in scenario of no enough free memory,
page refault ratio is higher than before, the root cause is:
- {,de}compression flow needs to allocate intermediate pages to store
compressed data in cluster, so during their allocation, vm may reclaim
mmaped pages.
- if above reclaimed pages belong to compressed cluster, during its
refault, it may cause more intermediate pages allocation, result in
reclaiming more mmaped pages.
So this patch introduces a mempool for intermediate page allocation,
in order to avoid high refault ratio, by default, number of
preallocated page in pool is 512, user can change the number by
assigning 'num_compress_pages' parameter during module initialization.
Ma Feng found warnings in the original patch and fixed like below.
Fix the following sparse warning:
fs/f2fs/compress.c:501:5: warning: symbol 'num_compress_pages' was not declared.
Should it be static?
fs/f2fs/compress.c:530:6: warning: symbol 'f2fs_compress_free_page' was not
declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'net/ipv6/mcast.c')
0 files changed, 0 insertions, 0 deletions