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
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
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
Makefile
amiflop.c
ataflop.c
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.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
ida_cmd.h
ida_ioctl.h
loop.c
loop.h
mg_disk.c
nbd.c
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
pktcdvd.c
ps3disk.c
ps3vram.c
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
smart1,2.h
sunvdc.c
swim.c
swim3.c
swim_asm.S
sx8.c
umem.c
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
xsysace.c block: systemace: Remove .owner field for driver 2014-08-21 20:37:54 -05:00
z2ram.c