Re: [f2fs-dev] [RFC PATCH] f2fs: do not use CURSEG_ALL_DATA_ATGC in foreground or urgent GC

2021-03-16 Thread Chao Yu
On 2021/3/17 11:44, Weichao Guo wrote: On 2021/3/17 10:40, Chao Yu wrote: On 2021/3/16 21:15, Weichao Guo via Linux-f2fs-devel wrote: CURSEG_ALL_DATA_ATGC is introduced by age threshold based GC for better hot/cold data seperation and avoiding free segment cost. However, LFS write mode is pref

Re: [f2fs-dev] [RFC PATCH] f2fs: do not use CURSEG_ALL_DATA_ATGC in foreground or urgent GC

2021-03-16 Thread Weichao Guo via Linux-f2fs-devel
On 2021/3/17 10:40, Chao Yu wrote: On 2021/3/16 21:15, Weichao Guo via Linux-f2fs-devel wrote: CURSEG_ALL_DATA_ATGC is introduced by age threshold based GC for better hot/cold data seperation and avoiding free segment cost. However, LFS write mode is preferred in the scenario of foreground or

Re: [f2fs-dev] [RFC PATCH] f2fs: do not use CURSEG_ALL_DATA_ATGC in foreground or urgent GC

2021-03-16 Thread Chao Yu
On 2021/3/16 21:15, Weichao Guo via Linux-f2fs-devel wrote: CURSEG_ALL_DATA_ATGC is introduced by age threshold based GC for better hot/cold data seperation and avoiding free segment cost. However, LFS write mode is preferred in the scenario of foreground or urgent GC, which should be finished AS

[f2fs-dev] [RFC PATCH] f2fs: do not use CURSEG_ALL_DATA_ATGC in foreground or urgent GC

2021-03-16 Thread Weichao Guo via Linux-f2fs-devel
CURSEG_ALL_DATA_ATGC is introduced by age threshold based GC for better hot/cold data seperation and avoiding free segment cost. However, LFS write mode is preferred in the scenario of foreground or urgent GC, which should be finished ASAP. So, let's only use CURSEG_ALL_DATA_ATGC when not urgent in

Re: [f2fs-dev] [PATCH v3] f2fs: allow to change discard policy based on cached discard cmds

2021-03-16 Thread Chao Yu
On 2021/3/16 17:29, Sahitya Tummala wrote: With the default DPOLICY_BG discard thread is ioaware, which prevents the discard thread from issuing the discard commands. On low RAM setups, it is observed that these discard commands in the cache are consuming high memory. This patch aims to relax the

Re: [f2fs-dev] [PATCH] f2fs: fix the discard thread sleep timeout under high utilization

2021-03-16 Thread Sahitya Tummala
Hi Chao, Thanks for the review and suggestions. I think the below code should work and cover all the cases we discussed. Let me test it and then put up a new patchset for review. Thanks, Sahitya. Mon, Mar 15, 2021 at 06:31:00PM +0800, Chao Yu wrote: > Hi Sahitya, > > On 2021/3/15 17:45, Sahity

[f2fs-dev] [PATCH v3] f2fs: allow to change discard policy based on cached discard cmds

2021-03-16 Thread Sahitya Tummala
With the default DPOLICY_BG discard thread is ioaware, which prevents the discard thread from issuing the discard commands. On low RAM setups, it is observed that these discard commands in the cache are consuming high memory. This patch aims to relax the memory pressure on the system due to f2fs pe

Re: [f2fs-dev] [f2fs] ab2dbddfd0: BUG:kernel_NULL_pointer_dereference, address

2021-03-16 Thread Chao Yu
Hi Sahitya, Node manager was initialized after segment manager's initialization, so f2fs_available_free_memory() called from issue_discard_thread() may access invalid nm_i pointer, could you please check and fix this case? On 2021/3/16 12:58, kernel test robot wrote: Greeting, FYI, we notice