From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jerome Marchand <jmarchan@redhat.com>,
Nitin Gupta <ngupta@vflare.org>, Chao Yu <chao2.yu@samsung.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3] zram: use notify_free to account all free notifications
Date: Tue, 16 Sep 2014 08:03:06 +0900 [thread overview]
Message-ID: <20140915230306.GC10912@bbox> (raw)
In-Reply-To: <1410792568-31539-2-git-send-email-sergey.senozhatsky@gmail.com>
On Mon, Sep 15, 2014 at 11:49:28PM +0900, Sergey Senozhatsky wrote:
> `notify_free' device attribute accounts the number of slot free notifications
> and internally represents the number of zram_free_page() calls. Slot free
> notifications are sent only when device is used as a swap device, hence
> `notify_free' is used only for swap devices. Since f4659d8e620d08 (zram:
> support REQ_DISCARD) ZRAM handles yet another one free notification (also
> via zram_free_page() call) -- REQ_DISCARD requests, which are sent by a
> filesystem, whenever some data blocks are discarded. However, there is no
> way to know the number of notifications in the latter case.
>
> Use `notify_free' to account the number of pages freed by zram_bio_discard()
> and zram_slot_free_notify(). Depending on usage scenario `notify_free'
> represents:
> a) the number of pages freed because of slot free notifications, which is
> equal to the number of swap_slot_free_notify() calls, so there is no
> behaviour change
>
> b) the number of pages freed because of REQ_DISCARD notifications
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Thanks a lot!
--
Kind regards,
Minchan Kim
next prev parent reply other threads:[~2014-09-15 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 14:49 [PATCHv3] zram: use notify_free to account all free notifications Sergey Senozhatsky
2014-09-15 14:49 ` Sergey Senozhatsky
2014-09-15 23:03 ` Minchan Kim [this message]
2014-09-17 8:19 ` Jerome Marchand
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=20140915230306.GC10912@bbox \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chao2.yu@samsung.com \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.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).