public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH v2 7/7] zram: writeback throttle
Date: Tue, 27 Nov 2018 11:08:32 +0900	[thread overview]
Message-ID: <20181127020832.GC237537@google.com> (raw)
In-Reply-To: <20181126125446.562aca37cc7c0dd8456c3a25@linux-foundation.org>

On Mon, Nov 26, 2018 at 12:54:46PM -0800, Andrew Morton wrote:
> On Mon, 26 Nov 2018 17:28:13 +0900 Minchan Kim <minchan@kernel.org> wrote:
> 
> > On small memory system, there are lots of write IO so if we use
> > flash device as swap, there would be serious flash wearout.
> > To overcome the problem, system developers need to design write
> > limitation strategy to guarantee flash health for entire product life.
> > 
> > This patch creates a new konb "writeback_limit" on zram. With that,
> > if current writeback IO count(/sys/block/zramX/io_stat) excceds
> > the limitation, zram stops further writeback until admin can reset
> > the limit.
> > 
> > +++ b/Documentation/ABI/testing/sysfs-block-zram
> > @@ -121,3 +121,12 @@ Contact:	Minchan Kim <minchan@kernel.org>
> >  		The bd_stat file is read-only and represents backing device's
> >  		statistics (bd_count, bd_reads, bd_writes) in a format
> >  		similar to block layer statistics file format.
> > +
> > +What:		/sys/block/zram<id>/writeback_limit
> > +Date:		November 2018
> > +Contact:	Minchan Kim <minchan@kernel.org>
> > +Description:
> > +		The writeback_limit file is read-write and specifies the maximum
> > +		amount of writeback ZRAM can do. The limit could be changed
> > +		in run time and "0" means disable the limit.
> > +		No limit is the initial state.
> > diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt
> > index 550bca77d322..41748d52712d 100644
> > --- a/Documentation/blockdev/zram.txt
> > +++ b/Documentation/blockdev/zram.txt
> > @@ -164,6 +164,8 @@ reset             WO    trigger device reset
> >  mem_used_max      WO    reset the `mem_used_max' counter (see later)
> >  mem_limit         WO    specifies the maximum amount of memory ZRAM can use
> >                          to store the compressed data
> > +writeback_limit	  WO	specifies the maximum amount of write IO zram can
> > +			write out to backing device
> 
> Neither the changelog nor the Documentation specify the units of
> writeback_limit.  Bytes?  Pages?  Blocks?
> 
> This gets so confusing that in many /proc/sys/vm files we actually put
> the units into the filenames.
> 

I will use unit as 4K.

Thanks.

      reply	other threads:[~2018-11-27  2:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  8:28 [PATCH v2 0/7] zram idle page writeback Minchan Kim
2018-11-26  8:28 ` [PATCH v2 1/7] zram: fix lockdep warning of free block handling Minchan Kim
2018-11-26 20:49   ` Andrew Morton
2018-11-27  2:05     ` Minchan Kim
2018-11-26  8:28 ` [PATCH v2 2/7] zram: fix double free backing device Minchan Kim
2018-11-26  8:28 ` [PATCH v2 3/7] zram: refactoring flags and writeback stuff Minchan Kim
2018-11-26  8:28 ` [PATCH v2 4/7] zram: introduce ZRAM_IDLE flag Minchan Kim
2018-11-26  8:28 ` [PATCH v2 5/7] zram: support idle/huge page writeback Minchan Kim
2018-11-26  9:47   ` Joey Pabalinas
2018-11-26 13:44     ` Joey Pabalinas
2018-11-27  2:13     ` Minchan Kim
2018-11-27  2:53       ` Joey Pabalinas
2018-11-26  8:28 ` [PATCH v2 6/7] zram: add bd_stat statistics Minchan Kim
2018-11-26 20:58   ` Andrew Morton
2018-11-27  2:07     ` Minchan Kim
2018-11-28 23:30       ` Andrew Morton
2018-11-29  1:45         ` Minchan Kim
2018-11-26  8:28 ` [PATCH v2 7/7] zram: writeback throttle Minchan Kim
2018-11-26 20:54   ` Andrew Morton
2018-11-27  2:08     ` 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=20181127020832.GC237537@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