[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200123232521.GA175683@google.com>
Date: Thu, 23 Jan 2020 15:25:21 -0800
From: Minchan Kim <minchan@...nel.org>
To: Yue Hu <zbestahu@...il.com>
Cc: ngupta@...are.org, sergey.senozhatsky.work@...il.com,
linux-kernel@...r.kernel.org, huyue2@...ong.com
Subject: Re: [PATCH] zram: do not set ZRAM_IDLE bit for idlepage writeback in
writeback_store()
On Thu, Jan 23, 2020 at 10:39:36AM +0800, Yue Hu wrote:
> On Wed, 22 Jan 2020 18:23:05 -0800
> Minchan Kim <minchan@...nel.org> wrote:
>
> > On Tue, Jan 21, 2020 at 07:35:57PM +0800, Yue Hu wrote:
> > > From: Yue Hu <huyue2@...ong.com>
> > >
> > > Currently, we will call zram_set_flag() to set ZRAM_IDLE bit even for
> > > idlepage writeback. That is pointless. Let's set it only for hugepage mode.
> >
> > Could you be more specific? What do you see the problem with that?
>
> If current writeback mode is idle, ZRAM_IDLE bit will be check firstly for this
> slot. Then go to call zram_set_flag(, , ZRAM_IDLE) if it's marked as ZRAM_IDLE.
> So, it's duplicated setting, am i right?
As I wrote down in the description, it aims for the race with hugepage writeback.
Without it, there is no way to detect the slot is reallocated and marked
with huge again but it's new data so zram could free the page
unintentionally.
Powered by blists - more mailing lists