linux/Documentation
Sergey Senozhatsky 015254daf1 zram: use notify_free to account all free notifications
`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>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-09 22:26:03 -04:00
..
2014-10-08 17:22:23 -04:00
2014-08-28 14:47:22 +02:00
2014-10-09 22:26:02 -04:00
2014-10-08 06:47:31 -04:00
2014-05-05 15:32:05 +02:00
2014-02-28 15:12:08 -08:00
2014-08-25 03:28:09 -05:00
2014-08-04 07:01:38 -07:00
2014-02-10 16:01:40 -08:00
2014-08-06 23:36:12 -07:00
2014-06-11 08:35:34 -07:00
2014-08-27 22:04:36 +01:00
2014-07-28 15:23:15 +02:00
2013-10-16 13:35:02 -07:00
2014-06-19 17:45:14 -07:00
2014-04-18 14:20:48 +02:00
2014-05-12 17:08:33 -07:00
2014-08-26 09:35:54 +02:00
2014-05-05 15:32:05 +02:00
2013-11-14 11:04:40 -08:00
2014-03-21 13:16:58 +01:00
2013-12-02 14:48:28 +01:00
2014-10-09 22:26:02 -04:00
2014-03-21 13:16:58 +01:00
2013-12-02 14:45:19 +01:00
2014-08-08 15:57:24 -07:00
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-09-23 23:44:16 -07:00