Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp127102imu; Mon, 26 Nov 2018 18:10:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/XWkJGBYKCOUQvvIvA5Kk7N2GliGvzpbFP2VvywlkssY0kryP58gwsBzcm0KrQQ2qZVKklP X-Received: by 2002:a62:8f8c:: with SMTP id n134mr17195329pfd.137.1543284607996; Mon, 26 Nov 2018 18:10:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543284607; cv=none; d=google.com; s=arc-20160816; b=oG+l5weymXGK2It3WWibED6DEDLC//XJ55YxGf9nfDMDpIGPz3OhH5LYtSsqFpeTV6 VaKru8xr10tFc4vRCkmJI7DnTNP8jtvHthjTIZwkBXPBRWoG/L9mI8UZZEqlCAFA7qbf nN+b3gSG4XhGi5gbp7IP+5SdnVR5NgcFWdXlHObcyscWcBNyCF5CX/1goMcPjtMuRhJ6 Xx4xgoh3pYqg6wd3CZHqpKGjA/SkHlIa2w/hpt34QICCB0K1fhFwN/MfAJU/HJWu7CJk Zny0LnQD6oxmDakiuJDhWZKdtVxDAQZZoWG3Sq5DmvvCZoR8m6sD8rkVMznI79B4SAuQ pvBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BlnmJVYVEGZKLMQ25R2Xgla7R6htgSgHhtIQgm4J3Fo=; b=Vlk4F9IhrV3syy0ZQ3RD2EtHaRKqKpy6y02x9+wNpc5z0TcfZ4lnNgkS4Uvh+h9Lyb vbBIuk5cnBBFLA0y1qWyPH9rnDZnK6JhanaRv1vVXhXvlgUVzH11PwJVKA7EB/gGLhOW zRmW7KG+FzDh3u0OI7VQ0m28QjLB2VS5qk+a9ocjrSUn1jhvRA1ZvJ2yI2WAayseNOsW oTCN53cbdsNbhV5+p0RPheIvaYCJxTUNAiIaszBkoZSkQHht8Uyh589/biLFBoxTwsDA 4mWDKMlPF3+hkVr89ztyjuqoHcaYdDGqQ9T9Tclk0OtBOri1Bu6i49bgOV60ZEz6pdd8 YdIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=APF4VPda; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si2056621pgu.525.2018.11.26.18.09.53; Mon, 26 Nov 2018 18:10:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=APF4VPda; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727953AbeK0NEN (ORCPT + 99 others); Tue, 27 Nov 2018 08:04:13 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46133 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727542AbeK0NEN (ORCPT ); Tue, 27 Nov 2018 08:04:13 -0500 Received: by mail-pl1-f194.google.com with SMTP id t13so14790188ply.13 for ; Mon, 26 Nov 2018 18:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BlnmJVYVEGZKLMQ25R2Xgla7R6htgSgHhtIQgm4J3Fo=; b=APF4VPdaH7OltL6Z+YvnAMPArkq4fpl3+fG6NluJSP2gLPCkuCJjwLs5t1TmEvwHTd 7Ollz3z+VWcvt96SuquzClGJCZ0PoMuVTO7vvveAy3ABzHpG+BQWeK4ww+lJZr3XBd/9 CF82Rgb88fpuqk1NWU6cmqE/o1vM1ifTLkUuDAHBtEAbIXcSZp0SKY08o20/dH7F22wO bzk8SG2fenBqmJfDmJSVCgX7Szg1DQZpuVZ+8aXCgIdxR7GkTN3wgvM950B5p3ACJHl9 wFutP8h9O0nsk+MDpFyeYxinY2zzCtZmg/GcUTQzbPWTo2HGrLPQTn28PUMqh3Ke7plH pE4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=BlnmJVYVEGZKLMQ25R2Xgla7R6htgSgHhtIQgm4J3Fo=; b=RNgvgTZPoeqy7ruZtymj7qDQGn2FbE0TeWQp2WLJmAd5VoSOyevZdXKBwD3odhUuk/ Xzgl3s6/9wjb2gMfI/BgPBPzYE8J0gsLtWnH+lrZB/jractECAtEy8AKLo1SBIUL9vHy Xdm2xF5qr4NrbVV1xCjnz8Rn27KyWz5ADwOG60mHK0CzUm6LCuUqIPUwsTLpmwOMpbxT T02DkqLd4ZCnFT/uVFYv67Q4gQEijX2BwvJw6VKfkAXgK4+sRC6xcExb44iJa6NHQBLD aWFIhdyHO9Qv8TcrJJl2ZKb3UmAPpA8wLQaiLrE7zQymWTy2SfQJ60bYvjuV/rg7kCAU yhIg== X-Gm-Message-State: AA+aEWZ5zbgnsq7+CPJ4wSZKIsuEk460B06pc411ADRONAc5QDW3zawx w2jFtCtDtK2G3+n8+7j1GaSfSgh6NQg= X-Received: by 2002:a17:902:e101:: with SMTP id cc1-v6mr30909414plb.165.1543284479554; Mon, 26 Nov 2018 18:07:59 -0800 (PST) Received: from google.com ([2401:fa00:d:0:98f1:8b3d:1f37:3e8]) by smtp.gmail.com with ESMTPSA id 6sm4837512pfv.30.2018.11.26.18.07.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Nov 2018 18:07:58 -0800 (PST) Date: Tue, 27 Nov 2018 11:07:54 +0900 From: Minchan Kim To: Andrew Morton Cc: LKML , Sergey Senozhatsky Subject: Re: [PATCH v2 6/7] zram: add bd_stat statistics Message-ID: <20181127020754.GB237537@google.com> References: <20181126082813.81977-1-minchan@kernel.org> <20181126082813.81977-7-minchan@kernel.org> <20181126125833.e95a21088ae60ccc6fd55022@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181126125833.e95a21088ae60ccc6fd55022@linux-foundation.org> User-Agent: Mutt/1.10.1+60 (6df12dc1) (2018-08-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 26, 2018 at 12:58:33PM -0800, Andrew Morton wrote: > On Mon, 26 Nov 2018 17:28:12 +0900 Minchan Kim wrote: > > > +File /sys/block/zram/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).