Re: [f2fs-dev] [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page()

2022-07-16 Thread Christoph Hellwig
On Sat, Jul 16, 2022 at 10:43:53PM +0200, Fabio M. De Francesco wrote: > static inline void f2fs_copy_page(struct page *src, struct page *dst) > { > - char *src_kaddr = kmap(src); > - char *dst_kaddr = kmap(dst); > > - memcpy(dst_kaddr, src_kaddr, PAGE_SIZE); > - kunmap(dst); >

[f2fs-dev] [PATCH v3 2/3] f2fs: use onstack pages instead of pvec

2022-07-16 Thread Fengnan Chang
From: Fengnan Chang Since pvec have 15 pages, it not a multiple of 4, when write compressed pages, write in 64K as a unit, it will call pagevec_lookup_range_tag agagin, sometimes this will take a lot of time. Use onstack pages instead of pvec to mitigate this problem. Signed-off-by: Fengnan Chan

[f2fs-dev] [PATCH v3 3/3] f2fs: support compressed file write/read amplifiction

2022-07-16 Thread Fengnan Chang
From: Fengnan Chang Try to support compressed file write and amplifiction accounting. Signed-off-by: Fengnan Chang --- fs/f2fs/data.c | 26 +- fs/f2fs/debug.c | 7 +-- fs/f2fs/f2fs.h | 34 ++ 3 files changed, 60 insertions(+), 7 de

[f2fs-dev] [PATCH v3 0/3] support compressed file write/read amplifiction

2022-07-16 Thread Fengnan Chang
From: Fengnan Chang Optimise f2fs_write_cache_pages, and support compressed file write/read amplifiction accounting. Fengnan Chang (3): f2fs: intorduce f2fs_all_cluster_page_ready f2fs: use onstack pages instead of pvec f2fs: support compressed file write/read amplifiction fs/f2fs/compre

[f2fs-dev] [PATCH v3 1/3] f2fs: intorduce f2fs_all_cluster_page_ready

2022-07-16 Thread Fengnan Chang
From: Fengnan Chang When write total cluster, all pages is uptodate, there is no need to call f2fs_prepare_compress_overwrite, intorduce f2fs_all_cluster_page_ready to avoid this. Signed-off-by: Fengnan Chang --- fs/f2fs/compress.c | 17 + fs/f2fs/data.c | 8 ++-- fs/f

[f2fs-dev] [Bug 216162] F2FS filesystem with compression broken after kernel version 5.18.1

2022-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216162 Chao Yu (c...@kernel.org) changed: What|Removed |Added CC||c...@kernel.org --- Comment #

Re: [f2fs-dev] [PATCH v2 5/5] Use F2FS_BLKSIZE as the size of struct f2fs_summary_block

2022-07-16 Thread Chao Yu
On 2022/6/24 2:12, Bart Van Assche wrote: Since the size of struct f2fs_summary_block equals F2FS_BLKSIZE, use F2FS_BLKSIZE instead of PAGE_CACHE_SIZE as the size of struct f2fs_summary_block. Signed-off-by: Bart Van Assche Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v2 4/5] Use F2FS_BLKSIZE for dev_read_block() buffers

2022-07-16 Thread Chao Yu
On 2022/6/24 2:12, Bart Van Assche wrote: Use F2FS_BLKSIZE instead of PAGE_SIZE for dev_read_block() buffers since dev_read_block() reads F2FS_BLKSIZE bytes. Signed-off-by: Bart Van Assche Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailin

Re: [f2fs-dev] [PATCH v2 3/5] Improve compile-time type checking for f2fs_report_zone()

2022-07-16 Thread Chao Yu
On 2022/6/24 2:12, Bart Van Assche wrote: Change the type of the third argument of f2fs_report_zone() from void * into struct blk_zone * to enable type checking. Signed-off-by: Bart Van Assche Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel ma

Re: [f2fs-dev] [PATCH v2 2/5] Fix f2fs_report_zone()

2022-07-16 Thread Chao Yu
On 2022/6/24 2:12, Bart Van Assche wrote: The definition of struct blk_zone_report is as follows: struct blk_zone_report { __u64 sector; __u32 nr_zones; __u32 flags; struct blk_zone zones[0];

Re: [f2fs-dev] [PATCH v2 1/5] Fix the struct f2fs_dentry_block definition

2022-07-16 Thread Chao Yu
On 2022/6/24 2:12, Bart Van Assche wrote: Fix the struct f2fs_dentry_block definition on systems for which PAGE_SIZE != 4096. This patch does not change the struct f2fs_dentry_block definition if PAGE_SIZE == 4096. Cc: Peter Collingbourne Reported-by: Peter Collingbourne Signed-off-by: Bart Va

Re: [f2fs-dev] [PATCH 2/2] f2fs: handle decompress only post processing in softirq

2022-07-16 Thread Chao Yu
On 2022/6/22 0:07, Jaegeuk Kim wrote: Can we do like this which has no functional change but refactored some functions? --- fs/f2fs/compress.c | 208 - fs/f2fs/data.c | 52 fs/f2fs/f2fs.h | 17 ++-- 3 files changed, 172 inse

[f2fs-dev] [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page()

2022-07-16 Thread Fabio M. De Francesco
The use of kmap() is being deprecated in favor of kmap_local_page(). Two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it mig