Re: [f2fs-dev] Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread John Paul Adrian Glaubitz
Hi! On 1/17/23 21:05, Geert Uytterhoeven wrote: Isn't this supposed to be caught by this check: a, __same_type(a, NULL) ? Yeah, but gcc thinks it is smarter than us... Probably it drops the test, assuming UB cannot happen. Hmm, sounds like a GGC bug to me then. Not sure how to fix

Re: [f2fs-dev] Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread Geert Uytterhoeven
Hi Adrian, On Tue, Jan 17, 2023 at 6:06 PM John Paul Adrian Glaubitz wrote: > On 1/17/23 18:01, Geert Uytterhoeven wrote: > > The issue is that some of the parameters are not arrays, but > > NULL. E.g.: > > > > arch/sh/kernel/cpu/sh2/setup-sh7619.c:static > > DECLARE_INTC_DESC(intc_desc, "sh7619"

Re: [f2fs-dev] Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread John Paul Adrian Glaubitz
Hi! On 1/17/23 18:01, Geert Uytterhoeven wrote: The issue is that some of the parameters are not arrays, but NULL. E.g.: arch/sh/kernel/cpu/sh2/setup-sh7619.c:static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, arch/sh/kernel/cpu/sh2/setup-sh7619.c- NULL, prio_registe

Re: [f2fs-dev] Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread Geert Uytterhoeven
Hi Adrian, On Tue, Jan 17, 2023 at 5:42 PM John Paul Adrian Glaubitz wrote: > On 1/6/23 16:17, Geert Uytterhoeven wrote: > >> I'm not seeing this one, but I am getting this one instead: > >> > >> In file included from ./arch/sh/include/asm/hw_irq.h:6, > >>from ./include/linux/

[f2fs-dev] Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1

2023-01-17 Thread John Paul Adrian Glaubitz
Hi Geert! On 1/6/23 16:17, Geert Uytterhoeven wrote: I'm not seeing this one, but I am getting this one instead: In file included from ./arch/sh/include/asm/hw_irq.h:6, from ./include/linux/irq.h:596, from ./include/asm-generic/hardirq.h:17,

Re: [f2fs-dev] f2fs: set *_data_age_threshold according to user_block_count

2023-01-17 Thread Yangtao Li via Linux-f2fs-devel
Hi qixiaoyu, > The block age here refers to total data blocks allocated of filesystem > between two consecutive updates. Yes, you are right. > So, it has nothing to do with storage size. But I think that the total data blocks allocated of filesystem between two consecutive updates has somethi

[f2fs-dev] [PATCH v2] f2fs: fix to check warm_data_age_threshold

2023-01-17 Thread Yangtao Li via Linux-f2fs-devel
hot_data_age_threshold is a non-zero positive number, and condition 2 includes condition 1, so there is no need to additionally judge whether t is 0. And let's remove it. Signed-off-by: Yangtao Li --- fs/f2fs/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/sys

[f2fs-dev] [PATCH] f2fs: export compress_percent and compress_watermark entries

2023-01-17 Thread Yangtao Li via Linux-f2fs-devel
This patch export below sysfs entries for better control cached compress page count. /sys/fs/f2fs//compress_watermark /sys/fs/f2fs//compress_percent Signed-off-by: Yangtao Li --- Documentation/ABI/testing/sysfs-fs-f2fs | 17 + fs/f2fs/sysfs.c | 18 +++

Re: [f2fs-dev] [PATCH] f2fs: set *_data_age_threshold according to user_block_count

2023-01-17 Thread qixiaoyu
On Tue, Jan 17, 2023 at 06:30:42PM +0800, Yangtao Li via Linux-f2fs-devel wrote: > Commit 71644dff4811 ("f2fs: add block_age-based extent cache") > introduce age extent cache, which experimental data is based on > a 128G storage device, and hot and warm data age threshold are > set to 1G and 10G re

[f2fs-dev] [PATCH] f2fs: set *_data_age_threshold according to user_block_count

2023-01-17 Thread Yangtao Li via Linux-f2fs-devel
Commit 71644dff4811 ("f2fs: add block_age-based extent cache") introduce age extent cache, which experimental data is based on a 128G storage device, and hot and warm data age threshold are set to 1G and 10G respectively. But it is unreasonable to set this value to 1G or 10G by default, which varie

[f2fs-dev] [PATCH] f2fs: fix to check warm_data_age_threshold

2023-01-17 Thread Yangtao Li via Linux-f2fs-devel
hot_data_age_threshold is a non-zero positive number, and condition 2 includes condition 1, so there is no need to additionally judge whether t is 0. And we need to judge whether hot_data_age_threshold exceeds the number of available blocks. Fixes: 71644dff4811 ("f2fs: add block_age-based extent c