mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
erofs: remove useless cache strategy of DELAYEDALLOC
After commit 1825c8d7ce
("erofs: force inplace I/O under low
memory scenario") and TRYALLOC is widely used, DELAYEDALLOC won't
be used anymore. Remove related dead code. Also, remove the blank
line at the end of zdata.h.
Link: https://lore.kernel.org/r/20211106082315.25781-1-huyue2@yulong.com
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Yue Hu <huyue2@yulong.com>
Signed-off-by: Gao Xiang <xiang@kernel.org>
This commit is contained in:
parent
86432a6dca
commit
4c7e42552b
@ -96,16 +96,9 @@ static void z_erofs_free_pcluster(struct z_erofs_pcluster *pcl)
|
|||||||
DBG_BUGON(1);
|
DBG_BUGON(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* a compressed_pages[] placeholder in order to avoid
|
|
||||||
* being filled with file pages for in-place decompression.
|
|
||||||
*/
|
|
||||||
#define PAGE_UNALLOCATED ((void *)0x5F0E4B1D)
|
|
||||||
|
|
||||||
/* how to allocate cached pages for a pcluster */
|
/* how to allocate cached pages for a pcluster */
|
||||||
enum z_erofs_cache_alloctype {
|
enum z_erofs_cache_alloctype {
|
||||||
DONTALLOC, /* don't allocate any cached pages */
|
DONTALLOC, /* don't allocate any cached pages */
|
||||||
DELAYEDALLOC, /* delayed allocation (at the time of submitting io) */
|
|
||||||
/*
|
/*
|
||||||
* try to use cached I/O if page allocation succeeds or fallback
|
* try to use cached I/O if page allocation succeeds or fallback
|
||||||
* to in-place I/O instead to avoid any direct reclaim.
|
* to in-place I/O instead to avoid any direct reclaim.
|
||||||
@ -267,10 +260,6 @@ static void preload_compressed_pages(struct z_erofs_collector *clt,
|
|||||||
/* I/O is needed, no possible to decompress directly */
|
/* I/O is needed, no possible to decompress directly */
|
||||||
standalone = false;
|
standalone = false;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DELAYEDALLOC:
|
|
||||||
t = tagptr_init(compressed_page_t,
|
|
||||||
PAGE_UNALLOCATED);
|
|
||||||
break;
|
|
||||||
case TRYALLOC:
|
case TRYALLOC:
|
||||||
newpage = erofs_allocpage(pagepool, gfp);
|
newpage = erofs_allocpage(pagepool, gfp);
|
||||||
if (!newpage)
|
if (!newpage)
|
||||||
@ -1092,15 +1081,6 @@ repeat:
|
|||||||
if (!page)
|
if (!page)
|
||||||
goto out_allocpage;
|
goto out_allocpage;
|
||||||
|
|
||||||
/*
|
|
||||||
* the cached page has not been allocated and
|
|
||||||
* an placeholder is out there, prepare it now.
|
|
||||||
*/
|
|
||||||
if (page == PAGE_UNALLOCATED) {
|
|
||||||
tocache = true;
|
|
||||||
goto out_allocpage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* process the target tagged pointer */
|
/* process the target tagged pointer */
|
||||||
t = tagptr_init(compressed_page_t, page);
|
t = tagptr_init(compressed_page_t, page);
|
||||||
justfound = tagptr_unfold_tags(t);
|
justfound = tagptr_unfold_tags(t);
|
||||||
|
@ -186,4 +186,3 @@ static inline void z_erofs_onlinepage_endio(struct page *page)
|
|||||||
#define Z_EROFS_VMAP_GLOBAL_PAGES 2048
|
#define Z_EROFS_VMAP_GLOBAL_PAGES 2048
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user