lkml.org 
[lkml]   [2018]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/7] zram: add bd_stat statistics
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.


\
 
 \ /
  Last update: 2018-11-26 21:58    [W:0.131 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site