linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Minchan Kim <minchan@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH v2 6/7] zram: add bd_stat statistics
Date: Wed, 28 Nov 2018 15:30:21 -0800	[thread overview]
Message-ID: <20181128153021.3f125ed82df68a29e25ce428@linux-foundation.org> (raw)
In-Reply-To: <20181127020754.GB237537@google.com>

On Tue, 27 Nov 2018 11:07:54 +0900 Minchan Kim <minchan@kernel.org> wrote:

> On Mon, Nov 26, 2018 at 12:58:33PM -0800, Andrew Morton wrote:
> > On Mon, 26 Nov 2018 17:28:12 +0900 Minchan Kim <minchan@kernel.org> wrote:
> > 
> > > +File /sys/block/zram<id>/bd_stat
> > > +
> > > +The stat file represents device's backing device statistics. It consists of
> > > +a single line of text and contains the following stats separated by whitespace:
> > > + bd_count	size of data written in backing device.
> > > +		Unit: pages
> > > + bd_reads	the number of reads from backing device
> > > +		Unit: pages
> > > + bd_writes	the number of writes to backing device
> > > +		Unit: pages
> > 
> > Using `pages' is a bad choice.  And I assume this means that
> > writeback_limit is in pages as well, which is worse.
> > 
> > Page sizes are not constant!  We want userspace which was developed on
> > 4k pagesize to work the same on 64k pagesize.
> > 
> > Arguably, we could require that well-written userspace remember to use
> > getpagesize().  However we have traditionally tried to avoid that by
> > performing the pagesize normalization within the kernel.
> 
> zram works based on page so I used that term but I agree it's rather
> vague. If there is no objection, I will use (Unit: 4K) instead of
> (Unit: pages).

Is that still true if PAGE_SIZE=64k?

  reply	other threads:[~2018-11-28 23:30 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 [this message]
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

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=20181128153021.3f125ed82df68a29e25ce428@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@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;
as well as URLs for NNTP newsgroup(s).