lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181129014502.GB77327@google.com>
Date:   Thu, 29 Nov 2018 10:45:02 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH v2 6/7] zram: add bd_stat statistics

On Wed, Nov 28, 2018 at 03:30:21PM -0800, Andrew Morton wrote:
> On Tue, 27 Nov 2018 11:07:54 +0900 Minchan Kim <minchan@...nel.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@...nel.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?

Oops, it will fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ