Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Minchan Kim
On Tue, Apr 10, 2018 at 05:05:28AM -0700, Matthew Wilcox wrote: > On Tue, Apr 10, 2018 at 10:26:43AM +0200, Michal Hocko wrote: > > On Mon 09-04-18 12:40:44, Matthew Wilcox wrote: > > > The problem is that the mapping gfp flags are used not only for allocating > > > pages, but also for allocating

Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Johannes Weiner
On Tue, Apr 10, 2018 at 05:05:28AM -0700, Matthew Wilcox wrote: > On Tue, Apr 10, 2018 at 10:26:43AM +0200, Michal Hocko wrote: > > On Mon 09-04-18 12:40:44, Matthew Wilcox wrote: > > > The problem is that the mapping gfp flags are used not only for allocating > > > pages, but also for allocating

Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Michal Hocko
On Tue 10-04-18 05:05:28, Matthew Wilcox wrote: > On Tue, Apr 10, 2018 at 10:26:43AM +0200, Michal Hocko wrote: > > On Mon 09-04-18 12:40:44, Matthew Wilcox wrote: > > > The problem is that the mapping gfp flags are used not only for allocating > > > pages, but also for allocating the page cache

Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Matthew Wilcox
On Tue, Apr 10, 2018 at 10:26:43AM +0200, Michal Hocko wrote: > On Mon 09-04-18 12:40:44, Matthew Wilcox wrote: > > The problem is that the mapping gfp flags are used not only for allocating > > pages, but also for allocating the page cache data structures that hold > > the pages. F2FS is the

Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Matthew Wilcox
On Tue, Apr 10, 2018 at 11:59:03AM +0900, Minchan Kim wrote: > Okay, I hope this version clear current concerns. It doesn't. The right place to warn about GFP_ZERO used with a constructor is _slab_, like the patch I already sent. We have no idea what other places might have the same bug, and

Re: [f2fs-dev] [PATCH] fsck.f2fs: recover nat bits feature default by fsck

2018-04-10 Thread heyunlei
>-Original Message- >From: Jaegeuk Kim [mailto:jaeg...@kernel.org] >Sent: Tuesday, April 10, 2018 12:01 PM >To: heyunlei >Cc: Yuchao (T); linux-f2fs-devel@lists.sourceforge.net; Wangbintian; >Zhangdianfang (Euler) >Subject: Re: [f2fs-dev][PATCH] fsck.f2fs: recover nat bits feature

Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Jan Kara
On Tue 10-04-18 11:59:03, Minchan Kim wrote: > On Mon, Apr 09, 2018 at 07:41:52PM -0700, Matthew Wilcox wrote: > > On Tue, Apr 10, 2018 at 11:33:39AM +0900, Minchan Kim wrote: > > > @@ -522,7 +532,7 @@ EXPORT_SYMBOL(radix_tree_preload); > > > */ > > > int radix_tree_maybe_preload(gfp_t

Re: [f2fs-dev] [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-10 Thread Michal Hocko
On Mon 09-04-18 12:40:44, Matthew Wilcox wrote: > On Mon, Apr 09, 2018 at 11:38:27AM -0700, Jaegeuk Kim wrote: > > On 04/09, Minchan Kim wrote: > > > On Mon, Apr 09, 2018 at 04:14:03AM -0700, Matthew Wilcox wrote: > > > > On Mon, Apr 09, 2018 at 12:09:30PM +0900, Minchan Kim wrote: > > > > > On

[f2fs-dev] [PATCH v2] f2fs: turn down IO priority of discard from background

2018-04-10 Thread Chao Yu
In order to avoid interfering normal r/w IO, let's turn down IO priority of discard issued from background. Signed-off-by: Chao Yu --- v2: - correct commit message. fs/f2fs/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c

Re: [f2fs-dev] [PATCH] f2fs: set deadline to drop expired inmem pages

2018-04-10 Thread Chao Yu
Hi Jaegeuk, On 2018/4/8 16:13, Chao Yu wrote: > f2fs doesn't allow abuse on atomic write class interface, so except > limiting in-mem pages' total memory usage capacity, we need to limit > start-commit time as well, otherwise we may run into infinite loop > during foreground GC because target

Re: [f2fs-dev] [PATCH v3] f2fs: don't use GFP_ZERO for page caches

2018-04-10 Thread Chao Yu
On 2018/4/10 14:40, Jaegeuk Kim wrote: > On 04/10, Chao Yu wrote: >> On 2018/4/10 11:29, Jaegeuk Kim wrote: >>> Change log from v2: >>> - consider IO error case when dealing with metapage >>> - memset by fill_node_footer >>> >>> Change log from v1: >>> - don't memset for recovered page >>>

[f2fs-dev] [PATCH] f2fs: turn down IO priority of discard from background

2018-04-10 Thread Chao Yu
In order to interfere normal r/w IO, let's turn down IO priority of discard issued from background. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index aabe0d6b8307..5e708debeb9c 100644

[f2fs-dev] [PATCH v5] f2fs: introduce a method to make nat journal more fresh

2018-04-10 Thread Yunlei He
This patch introduce a method to make nat journal more fresh: i. sort set list using dirty entry number and cp version average value. ii. if meet with cache hit, update average version valus with current cp version. With this patch, newly modified nat set will flush to journal, and flush

Re: [f2fs-dev] [PATCH] f2fs: enlarge block plug coverage

2018-04-10 Thread Chao Yu
On 2018/4/10 12:10, Jaegeuk Kim wrote: > On 04/10, Chao Yu wrote: >> On 2018/4/10 2:02, Jaegeuk Kim wrote: >>> On 04/08, Chao Yu wrote: On 2018/4/5 11:51, Jaegeuk Kim wrote: > On 04/04, Chao Yu wrote: >> This patch enlarges block plug coverage in __issue_discard_cmd, in >> order

Re: [f2fs-dev] [PATCH v3] f2fs: don't use GFP_ZERO for page caches

2018-04-10 Thread Jaegeuk Kim
On 04/10, Chao Yu wrote: > On 2018/4/10 11:29, Jaegeuk Kim wrote: > > Change log from v2: > > - consider IO error case when dealing with metapage > > - memset by fill_node_footer > > > > Change log from v1: > > - don't memset for recovered page > > > > Related to

Re: [f2fs-dev] [PATCH v4] f2fs: stop issue discard if something wrong with f2fs

2018-04-10 Thread Chao Yu
On 2018/4/10 12:01, Yunlei He wrote: > This patch stop async thread and umount process to issue discard > if something wrong with f2fs, which is similar to fstrim. > > Signed-off-by: Yunlei He Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v2] f2fs: use cur_map instead of ckpt_map

2018-04-10 Thread Chao Yu
On 2018/4/10 10:50, Yunlei He wrote: > In flush_sit_entries::add_discard_addrs path, cur_map and ckpt_map > are the same, but in exist_trim_candidates::add_discard_addrs, > cur_map is updated one, and newer than ckpt_map, so we need to use > cur_map to check whether there are discard candidates. >

Re: [f2fs-dev] [PATCH] f2fs: don't use GFP_ZERO for page caches

2018-04-10 Thread Chao Yu
On 2018/4/10 11:50, Jaegeuk Kim wrote: > Actually, we don't need to do this, since fill_node_footer(true) will reset > the > page. Yes, confirmed. Thanks, -- Check out the vibrant tech community on one of the world's

Re: [f2fs-dev] [PATCH 2/2] f2fs-tools: remove duplicated declaration of f2fs_configuration c

2018-04-10 Thread Chao Yu
On 2018/4/10 11:28, Sheng Yong wrote: > The variable `c' is declared twice in f2fs_fs.h. This patch removes > the second declaration. > > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v2 1/2] f2fs-tools: introduce new option V to show version

2018-04-10 Thread Chao Yu
On 2018/4/10 11:28, Sheng Yong wrote: > This patch introduces a new option -V to show the version of f2fs tools > and exit after that. > > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v3] f2fs: don't use GFP_ZERO for page caches

2018-04-10 Thread Chao Yu
On 2018/4/10 11:29, Jaegeuk Kim wrote: > Change log from v2: > - consider IO error case when dealing with metapage > - memset by fill_node_footer > > Change log from v1: > - don't memset for recovered page > > Related to https://lkml.org/lkml/2018/4/8/661 > > Sometimes, we need to write