Re: [f2fs-dev] [PATCH v2] f2fs: fix to use WHINT_MODE

2021-10-11 Thread Keoseong Park
Hi Chao, >On 2021/9/30 8:59, Keoseong Park wrote: >> Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6), >> it cannot be set to NR_CURSEG_TYPE(8). >> That is, whint_mode is always off. >> >> Therefore, the condition is changed from NR_CURSEG_TYPE to >> NR_CURSEG_PERSIST_TYPE. >>

Re: [f2fs-dev] [PATCH] f2fs: include non-compressed blocks in compr_written_block

2021-10-11 Thread Daeho Jeong
> > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c > > index c1bf9ad4c220..9b663eaf4805 100644 > > --- a/fs/f2fs/compress.c > > +++ b/fs/f2fs/compress.c > > @@ -1530,6 +1530,7 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, > > if (cluster_may_compress(cc)) { > > er

Re: [f2fs-dev] [PATCH] f2fs: compress: fix overwrite may reduce compress ratio unproperly

2021-10-11 Thread 常凤楠 via Linux-f2fs-devel
This patch may will make random write bench score reduce a lot. In my test, use fio test randwrite, config as below: [global] direct=1 numjobs=1 time_based runtime=60 ioengine=sync iodepth=16 filename=fio-test buffer_pattern=0x00 [file5] name=fio-rand-write rw=randwrite bs=4K size=128M w/o pa

[f2fs-dev] [PATCH] f2fs: compress: fix overwrite may reduce compress ratio unproperly

2021-10-11 Thread Fengnan Chang via Linux-f2fs-devel
when overwrite only first block of cluster, since cluster is not full, it will call f2fs_write_raw_pages when f2fs_write_multi_pages, and cause the whole cluster become uncompressed eventhough data can be compressed. this may will make random write bench score reduce a lot. root# dd if=/dev/zero o