erofs: introduce multipage per-CPU buffers
authorGao Xiang <hsiangkao@redhat.com>
Fri, 9 Apr 2021 19:06:30 +0000 (03:06 +0800)
committerGao Xiang <hsiangkao@redhat.com>
Fri, 9 Apr 2021 19:19:59 +0000 (03:19 +0800)
commit524887347fcb67faa0a63dd3c4c02ab48d4968d4
tree2a11ca8b2e7c11e74b6f4d1cfb39d2a0c182d7a9
parent54e0b6c873dcbd02b9b479c893f6fba8fcbc6a9c
erofs: introduce multipage per-CPU buffers

To deal the with the cases which inplace decompression is infeasible
for some inplace I/O. Per-CPU buffers was introduced to get rid of page
allocation latency and thrash for low-latency decompression algorithms
such as lz4.

For the big pcluster feature, introduce multipage per-CPU buffers to
keep such inplace I/O pclusters temporarily as well but note that
per-CPU pages are just consecutive virtually.

When a new big pcluster fs is mounted, its max pclustersize will be
read and per-CPU buffers can be growed if needed. Shrinking adjustable
per-CPU buffers is more complex (because we don't know if such size
is still be used), so currently just release them all when unloading.

Link: https://lore.kernel.org/r/20210409190630.19569-1-xiang@kernel.org
Acked-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
fs/erofs/Makefile
fs/erofs/decompressor.c
fs/erofs/internal.h
fs/erofs/pcpubuf.c [new file with mode: 0644]
fs/erofs/super.c
fs/erofs/utils.c