From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758764Ab3BKSQb (ORCPT ); Mon, 11 Feb 2013 13:16:31 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:48515 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758621Ab3BKSQa (ORCPT ); Mon, 11 Feb 2013 13:16:30 -0500 Date: Mon, 11 Feb 2013 10:16:27 -0800 From: Greg Kroah-Hartman To: Davidlohr Bueso Cc: linux-kernel@vger.kernel.org, Nitin Gupta Subject: Re: [PATCH 2/2] zram: gather statistics in a unique file Message-ID: <20130211181627.GA21390@kroah.com> References: <1360556946.4204.5.camel@buesod1.americas.hpqcorp.net> <20130211054117.GA31340@kroah.com> <1360606065.4204.10.camel@buesod1.americas.hpqcorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1360606065.4204.10.camel@buesod1.americas.hpqcorp.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2013 at 10:07:45AM -0800, Davidlohr Bueso wrote: > On Sun, 2013-02-10 at 21:41 -0800, Greg Kroah-Hartman wrote: > > On Sun, Feb 10, 2013 at 08:29:06PM -0800, Davidlohr Bueso wrote: > > > Instead of having one sysfs file per zram statistic, group them all > > > in a single, reader-friendly, 'statistics' file. This not only reduces > > > code but is also makes it easier to visualize. The new file looks like: > > > > > > Number of reads: 24 > > > Number of writes: 1055 > > > Invalid IO: 0 > > > Notify free: 0 > > > Zero pages: 1042 > > > Orig data size: 49152 bytes > > > Compressed data: 838 bytes > > > Total memory used: 53248 bytes > > > > > > Signed-off-by: Davidlohr Bueso > > > > No, please, the rule for sysfs is "one value per file", not files with > > lots of data that you need to parse. > > Ok. > > > > > If you want to do something like this, then do it in debugfs, but NEVER > > in sysfs. > > So, you would you be open to having the statistics file in debugfs and > removing the individual files sysfs? If these are merely debugging information, they should go to debugfs. If they are something that all users need/want, they should stay in sysfs as-is. thanks, greg k-h