From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/6] zram: support idle page writeback
Date: Thu, 22 Nov 2018 14:04:37 +0900 [thread overview]
Message-ID: <20181122050437.GA182024@google.com> (raw)
In-Reply-To: <20181122021442.GB3441@jagdpanzerIV>
On Thu, Nov 22, 2018 at 11:14:43AM +0900, Sergey Senozhatsky wrote:
> On (11/21/18 05:34), Minchan Kim wrote:
> > >
> > > Just a thought,
> > >
> > > I wonder if it will make sense (and if it will be possible) to writeback
> > > idle _compressed_ objects. Right now we decompress, say, a perfectly
> > > fine 400-byte compressed object to a PAGE_SIZE-d object and then push
> > > it to the WB device. In this particular case it has a x10 bigger IO
> > > pressure on flash. If we can write/read compressed object then we
> > > will write and read 400-bytes, instead of PAGE_SIZE.
> >
> > Although it has pros/cons, that's the my final goal although it would
> > add much complicated stuffs. Sometime, we should have the feature.
>
> So you plan to switch to "compressed objects" writeback?
No switch. I want both finally. There are pros and cons.
Compressible write would be good for wearout of flash device(that's I want
to have it) but it has several read of a block(since the block has several
zpage) and decompression latency as well as complicated logic of management
of block. That's the unnecessary thing If backing device or system doesn't
have wearout concern.
>
> > However, I want to go simple one first which is very valuable, too.
>
> Flash wearout is a serious problem; maybe less of a problem on smart
> phones, but much bigger on TVs and on other embedded devices that have
> lifespans of 5+ years. With "writeback idle compressed" we can remove
Yub, It's a serious. That's why my patchset has writeback limitation,
stats as well as idle marking to help the system design.
> the existing "writeback incompressible pages" and writeback only
> "idle, compressed" pages.
>
> The existing incompressible writeback is way too aggressive, and,
Do not agree. It depends on the system design.
Think idle page writeback. Once a day, you write out idle pages.
As a inital stage, you could write every idle pages into the storage.
it could be several hundred MB and next day? there is few MB write
because every idle pages were stored yesterday.
Even, we have a write_limit. You could estimate how per-day write
can demage your system. Your daemon can see one a day and decide
further write or not.
> additionally, it's too simple. It writes-back pages which can be
> swapped in immediately; which basically means that we do pointless
> PAGE_SIZE writes to a device which doesn't really like pointless
> writes.
This patchset aims for *IDLE page* writeback and you can define
what is IDLE page by yourself. It doesn't do pointless writeback.
>
> It's a whole different story with idle, compressible pages writeback.
I don't understand your point.
>
> -ss
next prev parent reply other threads:[~2018-11-22 5:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 7:20 [PATCH 0/6] zram idle page writeback Minchan Kim
2018-11-16 7:20 ` [PATCH 1/6] zram: fix lockdep warning of free block handling Minchan Kim
2018-11-16 7:20 ` [PATCH 2/6] zram: refactoring flags and writeback stuff Minchan Kim
2018-11-16 7:20 ` [PATCH 3/6] zram: introduce ZRAM_IDLE flag Minchan Kim
2018-11-20 2:46 ` Sergey Senozhatsky
2018-11-22 5:11 ` Minchan Kim
2018-11-22 5:45 ` Sergey Senozhatsky
2018-11-16 7:20 ` [PATCH 4/6] zram: support idle page writeback Minchan Kim
2018-11-21 4:55 ` Sergey Senozhatsky
2018-11-21 13:34 ` Minchan Kim
2018-11-22 2:14 ` Sergey Senozhatsky
2018-11-22 5:04 ` Minchan Kim [this message]
2018-11-22 5:40 ` Sergey Senozhatsky
2018-11-22 6:15 ` Minchan Kim
2018-11-22 6:31 ` Minchan Kim
2018-11-22 6:59 ` Sergey Senozhatsky
2018-11-23 6:23 ` Minchan Kim
2018-11-16 7:20 ` [PATCH 5/6] zram: add bd_stat statistics Minchan Kim
2018-11-16 7:20 ` [PATCH 6/6] zram: writeback throttle Minchan Kim
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=20181122050437.GA182024@google.com \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sergey.senozhatsky.work@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