Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1795588imu; Wed, 28 Nov 2018 15:31:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/VG1p91bNj7sdKYN9PoOaIw/TCdwgZINpkPhf0R7ZhBzJtVii3ndT9pfzhNrtAhTfkVFOkm X-Received: by 2002:a63:c0f:: with SMTP id b15mr35357286pgl.314.1543447878289; Wed, 28 Nov 2018 15:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543447878; cv=none; d=google.com; s=arc-20160816; b=tlCy1Li8yxNqwpi3RzUk3BaQJdTBj2MgQmLl6ZU0UvUcLIPfXuJuelKsZ7UEAVg1Sl M612GzeWkc3GOeXIF0UU2NrDoHKPXZUS08GYbwnUyn6nlKVQHIWyfGlLYq5PHmjv/0Vk owf18PVJWJ48CIRajyxHhnQm4vU6lB4tCFms9nVze8fT7+H+qIFJtFAb6++quIb/RuOa EB+5Osnxsj47kWgnUyoAL58tB8kfKtIBqysIDNr6hNx2TvDjUK1oKu6vt7+71rygiYk2 j055QYpCH/JPW4NR1xRJU9yc4+Chw//BfSjXRY33EZE/aUPBQdd8bWIiV/Elo3PDO1+R IscQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=tHtei0xbriyNuApFbtypRvZiau3Mj+L/YIQT7xWTsFw=; b=ghSwcG/thxn91K00cHxUTnryoEsWUy53BJtq5a4Y9iM4Stjl2FZIwniJ5mCOANokTr qgHNPDoFXqOHGMDeDMqZDuLvZBdhqvxgqtqY9z7qqPeXTkp94Pf5OlQ3TNYX/3ebyZGs Crpo5pPVVf7sZ83lpH3SJ0s2o7T9QMIvABScpTY0wK1J7XNrsuvb3YIsjrxA9TvfyZ6R 6AW5unN/xtVdo85wdw/VOiMMX9TsClvYWfN/niBdj7v49gH4XI3GUTvqF+9MrdqR4FyH fhjgTy/09K9OJnn7NK2YgGrne0JlHdeiKOafkVkKZtzZV7j9db3+fKPrdf/lWjw6iaCv 7Few== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si20887pgb.298.2018.11.28.15.31.01; Wed, 28 Nov 2018 15:31:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726879AbeK2Kdl (ORCPT + 99 others); Thu, 29 Nov 2018 05:33:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39106 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbeK2Kdk (ORCPT ); Thu, 29 Nov 2018 05:33:40 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 54D73A92; Wed, 28 Nov 2018 23:30:22 +0000 (UTC) Date: Wed, 28 Nov 2018 15:30:21 -0800 From: Andrew Morton To: Minchan Kim Cc: LKML , Sergey Senozhatsky Subject: Re: [PATCH v2 6/7] zram: add bd_stat statistics Message-Id: <20181128153021.3f125ed82df68a29e25ce428@linux-foundation.org> In-Reply-To: <20181127020754.GB237537@google.com> References: <20181126082813.81977-1-minchan@kernel.org> <20181126082813.81977-7-minchan@kernel.org> <20181126125833.e95a21088ae60ccc6fd55022@linux-foundation.org> <20181127020754.GB237537@google.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Nov 2018 11:07:54 +0900 Minchan Kim 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 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). Is that still true if PAGE_SIZE=64k?