linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Yue Hu <zbestahu@gmail.com>
Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com,
	linux-kernel@vger.kernel.org, huyue2@yulong.com
Subject: Re: [PATCH] zram: do not set ZRAM_IDLE bit for idlepage writeback in writeback_store()
Date: Thu, 23 Jan 2020 15:25:21 -0800	[thread overview]
Message-ID: <20200123232521.GA175683@google.com> (raw)
In-Reply-To: <20200123103936.000044ba.zbestahu@gmail.com>

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@kernel.org> wrote:
> 
> > On Tue, Jan 21, 2020 at 07:35:57PM +0800, Yue Hu wrote:
> > > From: Yue Hu <huyue2@yulong.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.

      reply	other threads:[~2020-01-23 23:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 11:35 [PATCH] zram: do not set ZRAM_IDLE bit for idlepage writeback in writeback_store() Yue Hu
2020-01-23  2:23 ` Minchan Kim
2020-01-23  2:39   ` Yue Hu
2020-01-23 23:25     ` Minchan Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200123232521.GA175683@google.com \
    --to=minchan@kernel.org \
    --cc=huyue2@yulong.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=zbestahu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).