alistair23-linux/drivers/staging/erofs
Gao Xiang 92e6efd566 staging: erofs: refine compressed pages preload flow
Currently, there are two kinds of compressed pages in erofs:
  1) file pages for the in-place decompression and
  2) managed pages for cached decompression.
Both are all stored in grp->compressed_pages[].

For managed pages, they could already exist or could be preloaded
in this round, including the following cases in detail:
  1) Already valid (loaded in some previous round);
  2) PAGE_UNALLOCATED, should be allocated at the time of submission;
  3) Just found in the managed cache, and with an extra page ref.
Currently, 1) and 3) can be distinguishable by lock_page and
checking its PG_private, which is guaranteed by the reclaim path,
but it's better to do a double check by using an extra tag.

This patch reworks the preload flow by introducing such the tag
by using tagged pointer, too many #ifdefs are removed as well.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-07 17:10:48 +01:00
..
include staging: erofs: add trace points for reading zipped data 2018-09-18 16:35:03 +02:00
data.c staging: erofs: Modify conditional checks 2018-11-07 12:21:20 +01:00
dir.c staging: erofs: {dir,inode,super}.c: rectify BUG_ONs 2018-12-06 16:08:56 +01:00
erofs_fs.h staging: erofs: rearrange vle clustertype definitions 2018-08-27 19:46:13 +02:00
inode.c staging: erofs: {dir,inode,super}.c: rectify BUG_ONs 2018-12-06 16:08:56 +01:00
internal.h staging: erofs: localize UNALLOCATED_CACHED_PAGE placeholder 2018-12-07 17:10:48 +01:00
Kconfig staging: erofs: fix undefined LZ4_decompress_safe_partial() 2018-11-09 08:34:39 -08:00
Makefile staging: erofs: use the new LZ4_decompress_safe_partial() 2018-11-08 03:59:46 -08:00
namei.c Staging/IIO patches for 4.20-rc1 2018-10-29 10:38:10 -07:00
super.c staging: erofs: {dir,inode,super}.c: rectify BUG_ONs 2018-12-06 16:08:56 +01:00
TODO staging: erofs: update erofs-utils information in TODO 2018-12-06 16:08:56 +01:00
unzip_pagevec.h staging: erofs: introduce pagevec for unzip subsystem 2018-07-27 17:24:08 +02:00
unzip_vle.c staging: erofs: refine compressed pages preload flow 2018-12-07 17:10:48 +01:00
unzip_vle.h staging: erofs: drop multiref support temporarily 2018-09-20 12:25:36 +02:00
unzip_vle_lz4.c staging: erofs: use the new LZ4_decompress_safe_partial() 2018-11-08 03:59:46 -08:00
utils.c staging: erofs: fix race when the managed cache is enabled 2018-11-23 10:53:07 +01:00
xattr.c staging: erofs: simplify return value of `xattr_foreach' 2018-09-20 12:25:36 +02:00
xattr.h staging: erofs: introduce xattr & acl support 2018-07-27 17:24:08 +02:00