linux/drivers/block
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
f4659d8e62 (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
..
aoe mm: close PageTail race 2014-03-04 07:55:47 -08:00
drbd Merge branch 'for-3.17/drivers' of git://git.kernel.dk/linux-block 2014-08-14 09:10:21 -06:00
mtip32xx blk-mq: pass along blk_mq_alloc_tag_set return values 2014-09-02 15:39:03 -06:00
paride paride/pcd: Fix grammar 2014-08-26 09:35:57 +02:00
rsxx PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
xen-blkback xen-blkback: defer freeing blkif to avoid blocking xenwatch 2014-05-28 14:17:32 -04:00
zram zram: use notify_free to account all free notifications 2014-10-09 22:26:03 -04:00
DAC960.c block: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
DAC960.h
Kconfig zram: promote zram from staging 2014-01-30 16:56:55 -08:00
Makefile zram: promote zram from staging 2014-01-30 16:56:55 -08:00
amiflop.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00
ataflop.c Merge branch 'for-3.16/core' of git://git.kernel.dk/linux-block into next 2014-06-02 09:29:34 -07:00
brd.c brd: add ram disk visibility option 2014-08-21 20:42:01 -05:00
cciss.c block: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
cciss.h
cciss_cmd.h
cciss_scsi.c
cciss_scsi.h
cpqarray.c cpqarray: fix info leak in ida_locked_ioctl() 2013-09-24 17:00:26 -07:00
cpqarray.h
cryptoloop.c
floppy.c Merge branch 'for-jens' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block into for-linus 2014-06-18 10:30:22 -07:00
hd.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00
ida_cmd.h
ida_ioctl.h
loop.c Merge branch 'sched/urgent' into sched/core, to avoid conflicts 2014-05-07 13:15:46 +02:00
loop.h
mg_disk.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00
nbd.c nbd: zero from and len fields in NBD_CMD_DISCONNECT. 2014-06-06 16:08:18 -07:00
null_blk.c blk-mq: pass along blk_mq_alloc_tag_set return values 2014-09-02 15:39:03 -06:00
nvme-core.c Merge git://git.infradead.org/users/willy/linux-nvme 2014-06-15 15:58:03 -10:00
nvme-scsi.c NVMe: Fix START_STOP_UNIT Scsi->NVMe translation. 2014-06-13 13:11:00 -04:00
osdblk.c block: replace strict_strtoul() with kstrtoul() 2013-09-11 15:56:56 -07:00
pktcdvd.c block: add blk_rq_set_block_pc() 2014-06-06 07:57:37 -06:00
ps3disk.c block: Kill bio_segments()/bi_vcnt usage 2013-11-23 22:33:51 -08:00
ps3vram.c block: Convert bio_for_each_segment() to bvec_iter 2013-11-23 22:33:49 -08:00
rbd.c rbd: fix error return code in rbd_dev_device_setup() 2014-09-10 11:59:06 +04:00
rbd_types.h
skd_main.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
skd_s1120.h skd: fix formatting in skd_s1120.h 2013-11-08 09:10:30 -07:00
smart1,2.h
sunvdc.c
swim.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00
swim3.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00
swim_asm.S
sx8.c drivers/block/sx8.c: remove unnecessary pci_set_drvdata() 2014-01-21 20:16:56 -08:00
umem.c block: Convert drivers to immutable biovecs 2013-11-23 22:33:51 -08:00
umem.h
virtio_blk.c block: virtio-blk: support multi virt queues per virtio-blk device 2014-07-01 10:51:03 -06:00
xen-blkfront.c Merge branch 'stable/for-jens-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip into for-3.16/drivers 2014-05-28 12:37:04 -06:00
xsysace.c block: systemace: Remove .owner field for driver 2014-08-21 20:37:54 -05:00
z2ram.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00