diff options
author | Chao Yu <[email protected]> | 2020-04-08 19:56:05 +0800 |
---|---|---|
committer | Jaegeuk Kim <[email protected]> | 2020-05-11 20:35:51 -0700 |
commit | 5e6bbde95982300d66d78fb282d4ee39df78fc33 (patch) | |
tree | 6f8840f358d86936f736cbf2141ca77b49ecebf8 /lib/mpi/mpi-mul.c | |
parent | c1c633878662341eb0c502b3cab6e8c5cc83f44c (diff) |
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 <[email protected]>
Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Ma Feng <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions