linux/drivers
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
..
accessibility
acpi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-10-07 21:26:52 -04:00
amba
ata ARM: SoC non-critical bug fixes for 3.18 2014-10-08 17:03:09 -04:00
atm
auxdisplay
base CMA: document cma=0 2014-10-09 22:26:02 -04:00
bcma bcma: use chipcommon node from DT for SoC GPIO chip 2014-09-30 13:17:14 -04:00
block zram: use notify_free to account all free notifications 2014-10-09 22:26:03 -04:00
bluetooth Bluetooth: btusb: remove redundant lock variable 2014-09-30 14:13:29 +02:00
bus ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
cdrom
char Char/Misc driver patches for 3.18-rc1 2014-10-08 06:55:41 -04:00
clk ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-09 06:35:05 -04:00
connector
cpufreq ARM: SoC non-critical bug fixes for 3.18 2014-10-08 17:03:09 -04:00
cpuidle ARM: SoC platform changes for 3.18 2014-10-08 17:13:04 -04:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-10-08 06:44:48 -04:00
dca
devfreq
dio
dma dmaengine-3.17 2014-10-07 20:39:25 -04:00
dma-buf
edac ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
eisa
extcon extcon: gpio: Fix code cleanup 2014-09-22 16:48:47 +09:00
firewire
firmware drivers/firmware/memmap.c: don't create memmap sysfs of same firmware_map_entry 2014-10-09 22:26:00 -04:00
fmc
gpio ACPI and power management fixes for 3.17-rc7 2014-09-25 15:25:52 -07:00
gpu Staging patches for 3.18-rc1 2014-10-08 06:50:18 -04:00
hid Merge branches 'for-3.18/always-poll-quirk', 'for-3.18/logitech', 'for-3.18/picolcd', 'for-3.18/rmi', 'for-3.18/sony', 'for-3.18/uhid', 'for-3.18/upstream' and 'for-3.18/wacom' into for-linus 2014-10-06 23:34:40 +02:00
hsi
hv Drivers: hv: vmbus: Enable interrupt driven flow control 2014-09-23 23:31:22 -07:00
hwmon hwmon: (tmp103) Fix resource leak bug in tmp103 temperature sensor driver 2014-09-22 11:11:48 -07:00
hwspinlock
i2c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
ide
idle
iio staging: iio: fix up merge error 2014-09-22 07:54:10 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
input Merge branch 'next' into for-linus 2014-10-03 11:24:46 -07:00
iommu Fixes and features for 3.18. 2014-10-08 05:27:39 -04:00
ipack ipoctal: clear break interrupt as soon as it occurs 2014-09-23 23:26:42 -07:00
irqchip Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-09 06:42:04 -04:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
leds ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
lguest
macintosh
mailbox mailbox/omap: add support for parsing dt devices 2014-09-11 11:39:14 -07:00
mcb
md md/raid5: disable 'DISCARD' by default due to safety concerns. 2014-10-02 13:45:00 +10:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
memory
memstick
message SCSI for-linus on 20141007 2014-10-07 21:29:18 -04:00
mfd Immutable branch between MFD and some ARM sub-arch maintainers. 2014-09-16 10:24:16 +08:00
misc ARM: SoC cleanups for 3.18 2014-10-08 17:06:53 -04:00
mmc
mtd Two trivial MTD updates for 3.17-rc4: 2014-09-06 12:12:09 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
nfc Merge tag 'master-2014-10-02' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2014-10-05 21:34:39 -04:00
ntb ntb: Add alignment check to meet hardware requirement 2014-09-14 00:10:38 -04:00
nubus
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
oprofile
parisc parisc: Fix serial console for machines with serial port on superio chip 2014-10-01 22:12:50 +02:00
parport parport: parport_pc: Implement architecture and device check to cut off false-positives 2014-09-23 23:14:28 -07:00
pci PCI updates for v3.17: 2014-09-24 09:46:29 -07:00
pcmcia
phy phy: remove .owner field for drivers using module_platform_driver 2014-09-24 15:18:34 +05:30
pinctrl This is the bulk of pin control changes for the v3.18 2014-10-07 20:56:28 -04:00
platform Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
pnp
power power: reset: driver for the Versatile syscon reboot 2014-09-26 00:25:59 +02:00
powercap powercap / RAPL: change domain detection message 2014-09-03 01:29:00 +02:00
pps
ps3
ptp
pwm Second batch of AT91 cleanup for 3.18: 2014-09-09 17:03:17 +02:00
rapidio
ras
regulator Merge remote-tracking branches 'regulator/topic/tps65217', 'regulator/topic/tps65910' and 'regulator/topic/voltage-ev' into regulator-next 2014-09-30 13:50:31 +01:00
remoteproc
reset
rpmsg
rtc ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
s390 net: better IFF_XMIT_DST_RELEASE support 2014-10-07 13:22:11 -04:00
sbus
scsi SCSI for-linus on 20141007 2014-10-07 21:29:18 -04:00
sfi
sh
sn
soc ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
spi Merge remote-tracking branch 'spi/topic/xilinx' into spi-next 2014-10-03 16:33:44 +01:00
spmi
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
target iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure 2014-09-17 13:44:01 -07:00
tc
thermal thermal: Remove ARCH_KIRKWOOD dependency 2014-09-09 14:39:21 +00:00
thunderbolt
tty TTY/Serial driver patches for 3.18-rc1 2014-10-08 06:52:11 -04:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
uwb uwb: add an ASIE sysfs attribute to uwb_rc devices 2014-09-23 22:05:26 -07:00
vfio
vhost
video Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
virt
virtio mm/balloon_compaction: add vmstat counters and kpageflags bit 2014-10-09 22:26:01 -04:00
vlynq
vme
w1
watchdog watchdog: Remove ARCH_KIRKWOOD dependency 2014-09-09 14:40:17 +00:00
xen xen: bug fixes for 3.17-rc4 2014-09-11 16:52:29 -07:00
zorro
Kconfig soc: ti: add Keystone Navigator QMSS driver 2014-09-24 09:49:14 -04:00
Makefile