From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbaANOV5 (ORCPT ); Tue, 14 Jan 2014 09:21:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25147 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751859AbaANOVx (ORCPT ); Tue, 14 Jan 2014 09:21:53 -0500 Message-ID: <52D547C7.2000706@redhat.com> Date: Tue, 14 Jan 2014 15:20:55 +0100 From: Jerome Marchand User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Sergey Senozhatsky CC: Minchan Kim , Nitin Gupta , linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] zram: rework reported to end-user zram statistics References: <1389692260-4421-1-git-send-email-sergey.senozhatsky@gmail.com> <1389692260-4421-4-git-send-email-sergey.senozhatsky@gmail.com> <52D513BD.7000800@redhat.com> <20140114111012.GC2180@swordfish.minsk.epam.com> <52D53F11.3090005@redhat.com> <20140114135355.GC2226@swordfish.minsk.epam.com> <52D54375.8070706@redhat.com> <20140114140923.GD2226@swordfish.minsk.epam.com> In-Reply-To: <20140114140923.GD2226@swordfish.minsk.epam.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/14/2014 03:09 PM, Sergey Senozhatsky wrote: > On (01/14/14 15:02), Jerome Marchand wrote: >> On 01/14/2014 02:53 PM, Sergey Senozhatsky wrote: >>> On (01/14/14 14:43), Jerome Marchand wrote: >>> [..] >>>>>> >>>>>> That's weird: good/bad_compress are accounted, but it seems to me that >>>>>> they are to never used in any way. If so, there is indeed no reason to >>>>>> keep them. >>>>>> >>>>>> >>>>>>> Account each sub-request >>>>>>> compression size so we can calculate real device compression ratio. >>>>>> >>>>>> Your patch doesn't change the way pages_stored and compr[essed]_size >>>>>> are accounted. What does your patch change that allow us to calculate >>>>>> the "real" compression ratio? >>>>>> >>>>>>> >>>>>>> 4) reported zram stats: >>>>>>> - num_writes -- number of writes >>>>>>> - num_reads -- number of reads >>>>>>> - pages_stored -- number of pages currently stored >>>>>>> - compressed_size -- compressed size of pages stored >>>>>> >>>>>> Wouldn't it be more practical to report the original and compressed >>>>>> data sizes using the same units as it is currently done? >>>>>> >>>>> >>>>> hm, do we really need pages_stored stats? what kind of unseful information it >>>>> shows to end user?.. perhaps, it's better to replace it with accounted passed >>>>> bvec->bv_len (as uncompressed_size). >>>>> >>>> >>>> That's really going to complicates things. We would need to keep track >>>> of which sectors of a particular page has been written to. It's much >>>> easier to keep current page granularity and consider any partial I/O >>>> as an whole page I/O. >>>> >>> >>> fair enough. thank you. >>> >>> 2/3 and 3/3 were changed according to your comments: >>> - 2/3 drop READA check >>> - 3/3 update commit message. >>> >>> ready to re-publish. may I add your ACK to all 3 patches or just to 1/3? >> >> The READA thing was my only concern for 2/3, so yes for this one. >> Concerning the third patch, I'd like to see what other people think >> about which stats we want to report. >> > > good. so I hold on for a bit to minimize the traffic and see what other > people think. thank you. > > -ss > >>>>> >>>>>> Jerome >>>>>> >>>>>>> - pages_zero -- number of zero filled pages >>>>>>> - failed_read -- number of failed reads >>>>>>> - failed_writes -- can happen when memory is too low >>>>>>> - invalid_io -- non-page-aligned I/O requests >>>>>>> - notify_free -- number of swap slot free notifications >>>>>>> - memory_used -- zs pool zs_get_total_size_bytes() I also wonder if we should add size of meta-data to memory_used, especially the table size which is probably not always negligible. Jerome >>>>>>> >>>>>>> Signed-off-by: Sergey Senozhatsky >>>> >>>> >>