#
4f05687f |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: introduce struct z_erofs_decompress_backend
Let's introduce struct z_erofs_decompress_backend in order to pass on the decompression backend context between helper functions more easier and av
erofs: introduce struct z_erofs_decompress_backend
Let's introduce struct z_erofs_decompress_backend in order to pass on the decompression backend context between helper functions more easier and avoid too many arguments.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-13-hsiangkao@linux.alibaba.com
show more ...
|
#
e7368187 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: get rid of `z_pagemap_global'
In order to introduce multi-reference pclusters for compressed data deduplication, let's get rid of the global page array for now since it needs to be re-designe
erofs: get rid of `z_pagemap_global'
In order to introduce multi-reference pclusters for compressed data deduplication, let's get rid of the global page array for now since it needs to be re-designed then at least.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-12-hsiangkao@linux.alibaba.com
show more ...
|
#
db166fc2 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: clean up `enum z_erofs_collectmode'
`enum z_erofs_collectmode' is really ambiguous, but I'm not quite sure if there are better naming, basically it's used to judge whether inplace I/O can be
erofs: clean up `enum z_erofs_collectmode'
`enum z_erofs_collectmode' is really ambiguous, but I'm not quite sure if there are better naming, basically it's used to judge whether inplace I/O can be used due to the current status of pclusters in the chain.
Rename it as `enum z_erofs_pclustermode' instead.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-11-hsiangkao@linux.alibaba.com
show more ...
|
#
5b220b20 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: get rid of `enum z_erofs_page_type'
Remove it since pagevec[] is no longer used.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore
erofs: get rid of `enum z_erofs_page_type'
Remove it since pagevec[] is no longer used.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-10-hsiangkao@linux.alibaba.com
show more ...
|
#
67148551 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: rework online page handling
Since all decompressed offsets have been integrated to bvecs[], this patch avoids all sub-indexes so that page->private only includes a part count and an eio flag,
erofs: rework online page handling
Since all decompressed offsets have been integrated to bvecs[], this patch avoids all sub-indexes so that page->private only includes a part count and an eio flag, thus in the future folio->private can have the same meaning.
In addition, PG_error will not be used anymore after this patch and we're heading to use page->private (later folio->private) and page->mapping (later folio->mapping) only.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-9-hsiangkao@linux.alibaba.com
show more ...
|
#
ed722fbc |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: switch compressed_pages[] to bufvec
Convert compressed_pages[] to bufvec in order to avoid using page->private to keep onlinepage_index (decompressed offset) for inplace I/O pages.
In the fu
erofs: switch compressed_pages[] to bufvec
Convert compressed_pages[] to bufvec in order to avoid using page->private to keep onlinepage_index (decompressed offset) for inplace I/O pages.
In the future, we only rely on folio->private to keep a countdown to unlock folios and set folio_uptodate.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-8-hsiangkao@linux.alibaba.com
show more ...
|
#
67139e36 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: introduce `z_erofs_parse_in_bvecs'
`z_erofs_decompress_pcluster()' is too long therefore it'd be better to introduce another helper to parse compressed pages (or laterly, compressed bvecs.)
erofs: introduce `z_erofs_parse_in_bvecs'
`z_erofs_decompress_pcluster()' is too long therefore it'd be better to introduce another helper to parse compressed pages (or laterly, compressed bvecs.)
BTW, since `compressed_bvecs' is too long as a part of the function name, `in_bvecs' is used here instead.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-7-hsiangkao@linux.alibaba.com
show more ...
|
#
387bab87 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: drop the old pagevec approach
Remove the old pagevec approach but keep z_erofs_page_type for now. It will be reworked in the following commits as well.
Also rename Z_EROFS_NR_INLINE_PAGEVECS
erofs: drop the old pagevec approach
Remove the old pagevec approach but keep z_erofs_page_type for now. It will be reworked in the following commits as well.
Also rename Z_EROFS_NR_INLINE_PAGEVECS as Z_EROFS_INLINE_BVECS with the new value 2 since it's actually enough to bootstrap.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-6-hsiangkao@linux.alibaba.com
show more ...
|
#
06a304cd |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: introduce bufvec to store decompressed buffers
For each pcluster, the total compressed buffers are determined in advance, yet the number of decompressed buffers actually vary. Too many decom
erofs: introduce bufvec to store decompressed buffers
For each pcluster, the total compressed buffers are determined in advance, yet the number of decompressed buffers actually vary. Too many decompressed pages can be recorded if one pcluster is highly compressed or its pcluster size is large. That takes extra memory footprints compared to uncompressed filesystems, especially a lot of I/O in flight on low-ended devices.
Therefore, similar to inplace I/O, pagevec was introduced to reuse page cache to store these pointers in the time-sharing way since these pages are actually unused before decompressing.
In order to make it more flexable, a cleaner bufvec is used to replace the old pagevec stuffs so that
- Decompressed offsets can be stored inline, thus it can be used for the upcoming feature like compressed data deduplication. It's calculated by `page_offset(page) - map->m_la';
- Towards supporting large folios for compressed inodes since our final goal is to completely avoid page->private but use folio->private only for all page cache pages.
Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-5-hsiangkao@linux.alibaba.com
show more ...
|
#
42fec235 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: introduce `z_erofs_parse_out_bvecs()'
`z_erofs_decompress_pcluster()' is too long therefore it'd be better to introduce another helper to parse decompressed pages (or laterly, decompressed bv
erofs: introduce `z_erofs_parse_out_bvecs()'
`z_erofs_decompress_pcluster()' is too long therefore it'd be better to introduce another helper to parse decompressed pages (or laterly, decompressed bvecs.)
BTW, since `decompressed_bvecs' is too long as a part of the function name, `out_bvecs' is used instead.
Reviewed-by: Yue Hu <huyue2@coolpad.com> Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-4-hsiangkao@linux.alibaba.com
show more ...
|
#
0d823b42 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: clean up z_erofs_collector_begin()
Rearrange the code and get rid of all gotos.
Reviewed-by: Yue Hu <huyue2@coolpad.com> Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangk
erofs: clean up z_erofs_collector_begin()
Rearrange the code and get rid of all gotos.
Reviewed-by: Yue Hu <huyue2@coolpad.com> Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-3-hsiangkao@linux.alibaba.com
show more ...
|
#
83a386c0 |
| 15-Jul-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: get rid of unneeded `inode', `map' and `sb'
Since commit 5c6dcc57e2e5 ("erofs: get rid of `struct z_erofs_collector'"), these arguments can be dropped as well.
No logic changes.
Reviewed-by
erofs: get rid of unneeded `inode', `map' and `sb'
Since commit 5c6dcc57e2e5 ("erofs: get rid of `struct z_erofs_collector'"), these arguments can be dropped as well.
No logic changes.
Reviewed-by: Yue Hu <huyue2@coolpad.com> Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220715154203.48093-2-hsiangkao@linux.alibaba.com
show more ...
|
Revision tags: v5.15.55, v5.15.54, v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45 |
|
#
4398d3c3 |
| 30-May-2022 |
Weizhao Ouyang <o451686892@gmail.com> |
erofs: fix 'backmost' member of z_erofs_decompress_frontend
Initialize 'backmost' to true in DECOMPRESS_FRONTEND_INIT.
Fixes: 5c6dcc57e2e5 ("erofs: get rid of `struct z_erofs_collector'") Signed-of
erofs: fix 'backmost' member of z_erofs_decompress_frontend
Initialize 'backmost' to true in DECOMPRESS_FRONTEND_INIT.
Fixes: 5c6dcc57e2e5 ("erofs: get rid of `struct z_erofs_collector'") Signed-off-by: Weizhao Ouyang <o451686892@gmail.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Reviewed-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20220530075114.918874-1-o451686892@gmail.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
Revision tags: v5.15.44 |
|
#
aa793b46 |
| 29-May-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: simplify z_erofs_pcluster_readmore()
Get rid of unnecessary label `skip'. No logic changes.
Link: https://lore.kernel.org/r/20220529055425.226363-4-xiang@kernel.org Acked-by: Chao Yu <chao@k
erofs: simplify z_erofs_pcluster_readmore()
Get rid of unnecessary label `skip'. No logic changes.
Link: https://lore.kernel.org/r/20220529055425.226363-4-xiang@kernel.org Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
#
39397a46 |
| 29-May-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: get rid of label `restart_now'
Simplify this part of code. No logic changes.
Link: https://lore.kernel.org/r/20220529055425.226363-3-xiang@kernel.org Acked-by: Chao Yu <chao@kernel.org> Sign
erofs: get rid of label `restart_now'
Simplify this part of code. No logic changes.
Link: https://lore.kernel.org/r/20220529055425.226363-3-xiang@kernel.org Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
#
87ca34a7 |
| 29-May-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: get rid of `struct z_erofs_collection'
It was incompletely introduced for deduplication between different logical extents backed with the same pcluster.
We will have a better in-memory repre
erofs: get rid of `struct z_erofs_collection'
It was incompletely introduced for deduplication between different logical extents backed with the same pcluster.
We will have a better in-memory representation in the next release cycle for this, as well as partial memory folios support. So get rid of it instead.
No logic changes.
Link: https://lore.kernel.org/r/20220529055425.226363-2-xiang@kernel.org Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
Revision tags: v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37 |
|
#
a2e20a25 |
| 29-Apr-2022 |
Matthew Wilcox (Oracle) <willy@infradead.org> |
erofs: Convert erofs zdata to read_folio
This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar w
erofs: Convert erofs zdata to read_folio
This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
show more ...
|
Revision tags: v5.15.36, v5.15.35, v5.15.34, v5.15.33 |
|
#
60b30050 |
| 01-Apr-2022 |
Hongyu Jin <hongyu.jin@unisoc.com> |
erofs: fix use-after-free of on-stack io[]
The root cause is the race as follows: Thread #1 Thread #2(irq ctx)
z_erofs_runqueue() struct z_erofs_decompressqueue io_A[
erofs: fix use-after-free of on-stack io[]
The root cause is the race as follows: Thread #1 Thread #2(irq ctx)
z_erofs_runqueue() struct z_erofs_decompressqueue io_A[]; submit bio A z_erofs_decompress_kickoff(,,1) z_erofs_decompressqueue_endio(bio A) z_erofs_decompress_kickoff(,,-1) spin_lock_irqsave() atomic_add_return() io_wait_event() -> pending_bios is already 0 [end of function] wake_up_locked(io_A[]) // crash
Referenced backtrace in kernel 5.4:
[ 10.129422] Unable to handle kernel paging request at virtual address eb0454a4 [ 10.364157] CPU: 0 PID: 709 Comm: getprop Tainted: G WC O 5.4.147-ab09225 #1 [ 11.556325] [<c01b33b8>] (__wake_up_common) from [<c01b3300>] (__wake_up_locked+0x40/0x48) [ 11.565487] [<c01b3300>] (__wake_up_locked) from [<c044c8d0>] (z_erofs_vle_unzip_kickoff+0x6c/0xc0) [ 11.575438] [<c044c8d0>] (z_erofs_vle_unzip_kickoff) from [<c044c854>] (z_erofs_vle_read_endio+0x16c/0x17c) [ 11.586082] [<c044c854>] (z_erofs_vle_read_endio) from [<c06a80e8>] (clone_endio+0xb4/0x1d0) [ 11.595428] [<c06a80e8>] (clone_endio) from [<c04a1280>] (blk_update_request+0x150/0x4dc) [ 11.604516] [<c04a1280>] (blk_update_request) from [<c06dea28>] (mmc_blk_cqe_complete_rq+0x144/0x15c) [ 11.614640] [<c06dea28>] (mmc_blk_cqe_complete_rq) from [<c04a5d90>] (blk_done_softirq+0xb0/0xcc) [ 11.624419] [<c04a5d90>] (blk_done_softirq) from [<c010242c>] (__do_softirq+0x184/0x56c) [ 11.633419] [<c010242c>] (__do_softirq) from [<c01051e8>] (irq_exit+0xd4/0x138) [ 11.641640] [<c01051e8>] (irq_exit) from [<c010c314>] (__handle_domain_irq+0x94/0xd0) [ 11.650381] [<c010c314>] (__handle_domain_irq) from [<c04fde70>] (gic_handle_irq+0x50/0xd4) [ 11.659641] [<c04fde70>] (gic_handle_irq) from [<c0101b70>] (__irq_svc+0x70/0xb0)
Signed-off-by: Hongyu Jin <hongyu.jin@unisoc.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Reviewed-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20220401115527.4935-1-hongyu.jin.cn@gmail.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
Revision tags: v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28 |
|
#
9f2731d6 |
| 10-Mar-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: refine managed inode stuffs
Set up the correct gfp mask and use it instead of hard coding. Also add comments about .invalidatepage() to show more details.
Link: https://lore.kernel.org/r/202
erofs: refine managed inode stuffs
Set up the correct gfp mask and use it instead of hard coding. Also add comments about .invalidatepage() to show more details.
Link: https://lore.kernel.org/r/20220310182743.102365-2-hsiangkao@linux.alibaba.com Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
Revision tags: v5.15.27, v5.15.26 |
|
#
6f39d1e1 |
| 01-Mar-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: clean up preload_compressed_pages()
Rename preload_compressed_pages() as z_erofs_bind_cache() since we're trying to prepare for adapting folios.
Also, add a comment for the gfp setting. No l
erofs: clean up preload_compressed_pages()
Rename preload_compressed_pages() as z_erofs_bind_cache() since we're trying to prepare for adapting folios.
Also, add a comment for the gfp setting. No logic changes.
Link: https://lore.kernel.org/r/20220301194951.106227-2-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
#
5c6dcc57 |
| 01-Mar-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: get rid of `struct z_erofs_collector'
Avoid `struct z_erofs_collector' since there is another context structure called "struct z_erofs_decompress_frontend".
No logic changes.
Link: https://
erofs: get rid of `struct z_erofs_collector'
Avoid `struct z_erofs_collector' since there is another context structure called "struct z_erofs_decompress_frontend".
No logic changes.
Link: https://lore.kernel.org/r/20220301194951.106227-1-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
Revision tags: v5.15.25, v5.15.24, v5.15.23, v5.15.22, v5.15.21, v5.15.20, v5.15.19, v5.15.18, v5.15.17 |
|
#
07888c66 |
| 24-Jan-2022 |
Christoph Hellwig <hch@lst.de> |
block: pass a block_device and opf to bio_alloc
Pass the block_device and operation that we plan to use this bio for to bio_alloc to optimize the assignment. NULL/0 can be passed, both for the pass
block: pass a block_device and opf to bio_alloc
Pass the block_device and operation that we plan to use this bio for to bio_alloc to optimize the assignment. NULL/0 can be passed, both for the passthrough case on a raw request_queue and to temporarily avoid refactoring some nasty code.
Also move the gfp_mask argument after the nr_vecs argument for a much more logical calling convention matching what most of the kernel does.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220124091107.642561-18-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
7865827c |
| 21-Jan-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: avoid unnecessary z_erofs_decompressqueue_work() declaration
Just code rearrange. No logic changes.
Link: https://lore.kernel.org/r/20220121091412.86086-1-hsiangkao@linux.alibaba.com Reviewe
erofs: avoid unnecessary z_erofs_decompressqueue_work() declaration
Just code rearrange. No logic changes.
Link: https://lore.kernel.org/r/20220121091412.86086-1-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu <huyue2@yulong.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
Revision tags: v5.4.173, v5.15.16, v5.15.15, v5.16 |
|
#
09c54379 |
| 01-Jan-2022 |
Gao Xiang <hsiangkao@linux.alibaba.com> |
erofs: use meta buffers for zmap operations
Get rid of old erofs_get_meta_page() within zmap operations by using on-stack meta buffers in order to prepare subpage and folio features.
Finally, erofs
erofs: use meta buffers for zmap operations
Get rid of old erofs_get_meta_page() within zmap operations by using on-stack meta buffers in order to prepare subpage and folio features.
Finally, erofs_get_meta_page() is useless. Get rid of it!
Link: https://lore.kernel.org/r/20220102040017.51352-6-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu <huyue2@yulong.com> Reviewed-by: Liu Bo <bo.liu@linux.alibaba.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|
#
cecf864d |
| 28-Dec-2021 |
Yue Hu <huyue2@yulong.com> |
erofs: support inline data decompression
Currently, we have already support tail-packing inline for uncompressed file, let's also implement this for compressed files to save I/Os and storage space.
erofs: support inline data decompression
Currently, we have already support tail-packing inline for uncompressed file, let's also implement this for compressed files to save I/Os and storage space.
Different from normal pclusters, compressed data is available in advance because of other metadata I/Os. Therefore, they directly move into the bypass queue without extra I/O submission.
It's the last compression feature before folio/subpage support.
Link: https://lore.kernel.org/r/20211228232919.21413-1-xiang@kernel.org Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Yue Hu <huyue2@yulong.com> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
show more ...
|