From: Jerome Marchand <jmarchan@redhat.com>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] zram: rework reported to end-user zram statistics
Date: Tue, 14 Jan 2014 14:43:45 +0100 [thread overview]
Message-ID: <52D53F11.3090005@redhat.com> (raw)
In-Reply-To: <20140114111012.GC2180@swordfish.minsk.epam.com>
On 01/14/2014 12:10 PM, Sergey Senozhatsky wrote:
> On (01/14/14 11:38), Jerome Marchand wrote:
>> On 01/14/2014 10:37 AM, Sergey Senozhatsky wrote:
>>> 1) Introduce ZRAM_ATTR_RO macro to generate zram atomic64_t stats
>>> `show' functions and reduce code duplication.
>>>
>>> 2) Account and report back to user numbers of failed READ and WRITE
>>> operations.
>>>
>>> 3) Remove `good' and `bad' compressed sub-requests stats. RW request may
>>> cause a number of RW sub-requests. zram used to account `good' compressed
>>> sub-queries (with compressed size less than 50% of original size), `bad'
>>> compressed sub-queries (with compressed size greater that 75% of original
>>> size), leaving sub-requests with compression size between 50% and 75% of
>>> original size not accounted and not reported.
>>
>> 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.
> -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()
>>>
>>> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
next prev parent reply other threads:[~2014-01-14 13:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 9:37 [PATCH 0/3] zram stats rework and code cleanup Sergey Senozhatsky
2014-01-14 9:37 ` [PATCH 1/3] zram: drop `init_done' struct zram member Sergey Senozhatsky
2014-01-14 11:03 ` Jerome Marchand
2014-01-15 1:52 ` Minchan Kim
2014-01-14 9:37 ` [PATCH 2/3] zram: do not pass rw argument to __zram_make_request() Sergey Senozhatsky
2014-01-14 11:02 ` Jerome Marchand
2014-01-14 11:13 ` Sergey Senozhatsky
2014-01-14 12:27 ` Jerome Marchand
2014-01-14 11:27 ` [PATCHv2 " Sergey Senozhatsky
2014-01-15 2:10 ` Minchan Kim
2014-01-14 9:37 ` [PATCH 3/3] zram: rework reported to end-user zram statistics Sergey Senozhatsky
2014-01-14 10:38 ` Jerome Marchand
2014-01-14 10:57 ` Sergey Senozhatsky
2014-01-14 12:15 ` Jerome Marchand
2014-01-14 12:30 ` Sergey Senozhatsky
2014-01-14 11:10 ` Sergey Senozhatsky
2014-01-14 13:43 ` Jerome Marchand [this message]
2014-01-14 13:53 ` Sergey Senozhatsky
2014-01-14 14:02 ` Jerome Marchand
2014-01-14 14:09 ` Sergey Senozhatsky
2014-01-14 14:20 ` Jerome Marchand
2014-01-15 4:24 ` Minchan Kim
2014-01-15 9:10 ` Sergey Senozhatsky
2014-01-14 9:42 ` [PATCH 0/3] zram stats rework and code cleanup Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D53F11.3090005@redhat.com \
--to=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).