Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-12 Thread Chao Yu
On 2021/7/12 14:53, Michal Hocko wrote: On Sat 10-07-21 16:11:38, Chao Yu wrote: On 2021/7/7 17:57, Mel Gorman wrote: I think it would work but it would be preferable to find out why the tail page has an order set in the first place. I've looked over Agreed. mm/page_alloc.c and mm/compactio

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-11 Thread Michal Hocko via Linux-f2fs-devel
On Sat 10-07-21 16:11:38, Chao Yu wrote: > On 2021/7/7 17:57, Mel Gorman wrote: > > I think it would work but it would be preferable to find out why the > > tail page has an order set in the first place. I've looked over > > Agreed. > > > mm/page_alloc.c and mm/compaction.c a few times and did no

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-10 Thread Chao Yu
On 2021/7/7 17:57, Mel Gorman wrote: I think it would work but it would be preferable to find out why the tail page has an order set in the first place. I've looked over Agreed. mm/page_alloc.c and mm/compaction.c a few times and did not spot where set_private_page(page, 0) is missed when it

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-07 Thread Mel Gorman
On Wed, Jul 07, 2021 at 08:48:28AM +0800, Chao Yu wrote: > On 2021/7/6 17:12, Mel Gorman wrote: > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index d6e94cc8066c..be87c4be481f 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3515,8 +3515,13 @@ void split_page(struct page *page, unsi

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-06 Thread Chao Yu
On 2021/7/6 17:12, Mel Gorman wrote: On Mon, Jul 05, 2021 at 07:45:26PM +0100, Matthew Wilcox wrote: I'm not really familiar with the compaction code. Mel, I see a call to post_alloc_hook() in split_map_pages(). Are there other ways of getting the compaction code to allocate a page which don't

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-06 Thread Mel Gorman
On Mon, Jul 05, 2021 at 07:45:26PM +0100, Matthew Wilcox wrote: > On Mon, Jul 05, 2021 at 11:04:21AM -0700, Jaegeuk Kim wrote: > > On 07/05, Matthew Wilcox wrote: > > > I think freshly allocated pages have a page->private of 0. ie this > > > code in mm/page_alloc.c: > > > > > > pa

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Chao Yu
On 2021/7/6 2:06, Jaegeuk Kim wrote: On 07/06, Chao Yu wrote: On 2021/7/5 19:47, Matthew Wilcox wrote: On Mon, Jul 05, 2021 at 07:33:35PM +0800, Chao Yu wrote: On 2021/7/5 16:56, Jaegeuk Kim wrote: On 07/05, Chao Yu wrote: On 2021/7/5 13:22, Jaegeuk Kim wrote: We need to guarantee it's init

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Matthew Wilcox
On Mon, Jul 05, 2021 at 11:04:21AM -0700, Jaegeuk Kim wrote: > On 07/05, Matthew Wilcox wrote: > > I think freshly allocated pages have a page->private of 0. ie this > > code in mm/page_alloc.c: > > > > page = rmqueue(ac->preferred_zoneref->zone, zone, order, > >

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Jaegeuk Kim
On 07/06, Chao Yu wrote: > On 2021/7/5 19:47, Matthew Wilcox wrote: > > On Mon, Jul 05, 2021 at 07:33:35PM +0800, Chao Yu wrote: > > > On 2021/7/5 16:56, Jaegeuk Kim wrote: > > > > On 07/05, Chao Yu wrote: > > > > > On 2021/7/5 13:22, Jaegeuk Kim wrote: > > > > > > We need to guarantee it's initial

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Jaegeuk Kim
On 07/05, Matthew Wilcox wrote: > On Mon, Jul 05, 2021 at 07:33:35PM +0800, Chao Yu wrote: > > On 2021/7/5 16:56, Jaegeuk Kim wrote: > > > On 07/05, Chao Yu wrote: > > > > On 2021/7/5 13:22, Jaegeuk Kim wrote: > > > > > We need to guarantee it's initially zero. Otherwise, it'll hurt > > > > > enti

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Chao Yu
On 2021/7/5 19:47, Matthew Wilcox wrote: On Mon, Jul 05, 2021 at 07:33:35PM +0800, Chao Yu wrote: On 2021/7/5 16:56, Jaegeuk Kim wrote: On 07/05, Chao Yu wrote: On 2021/7/5 13:22, Jaegeuk Kim wrote: We need to guarantee it's initially zero. Otherwise, it'll hurt entire flag operations. Oops

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Matthew Wilcox
On Mon, Jul 05, 2021 at 07:33:35PM +0800, Chao Yu wrote: > On 2021/7/5 16:56, Jaegeuk Kim wrote: > > On 07/05, Chao Yu wrote: > > > On 2021/7/5 13:22, Jaegeuk Kim wrote: > > > > We need to guarantee it's initially zero. Otherwise, it'll hurt entire > > > > flag > > > > operations. > > > > > > Oop

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Chao Yu
On 2021/7/5 16:56, Jaegeuk Kim wrote: On 07/05, Chao Yu wrote: On 2021/7/5 13:22, Jaegeuk Kim wrote: We need to guarantee it's initially zero. Otherwise, it'll hurt entire flag operations. Oops, I didn't get the point, shouldn't .private be zero after page was just allocated by filesystem? Wh

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-05 Thread Jaegeuk Kim
On 07/05, Chao Yu wrote: > On 2021/7/5 13:22, Jaegeuk Kim wrote: > > We need to guarantee it's initially zero. Otherwise, it'll hurt entire flag > > operations. > > Oops, I didn't get the point, shouldn't .private be zero after page was > just allocated by filesystem? What's the case we will encou

Re: [f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-04 Thread Chao Yu
On 2021/7/5 13:22, Jaegeuk Kim wrote: We need to guarantee it's initially zero. Otherwise, it'll hurt entire flag operations. Oops, I didn't get the point, shouldn't .private be zero after page was just allocated by filesystem? What's the case we will encounter stall private data left in page?

[f2fs-dev] [PATCH] f2fs: initialize page->private when using for our internal use

2021-07-04 Thread Jaegeuk Kim
We need to guarantee it's initially zero. Otherwise, it'll hurt entire flag operations. Fixes: b763f3bedc2d ("f2fs: restructure f2fs page.private layout") Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 ++ fs/f2fs/f2fs.h | 5 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a