Skip to content

Commit cd67e10

Browse files
minchanktorvalds
authored andcommitted
zram: promote zram from staging
Zram has lived in staging for a LONG LONG time and have been fixed/improved by many contributors so code is clean and stable now. Of course, there are lots of product using zram in real practice. The major TV companys have used zram as swap since two years ago and recently our production team released android smart phone with zram which is used as swap, too and recently Android Kitkat start to use zram for small memory smart phone. And there was a report Google released their ChromeOS with zram, too and cyanogenmod have been used zram long time ago. And I heard some disto have used zram block device for tmpfs. In addition, I saw many report from many other peoples. For example, Lubuntu start to use it. The benefit of zram is very clear. With my experience, one of the benefit was to remove jitter of video application with backgroud memory pressure. It would be effect of efficient memory usage by compression but more issue is whether swap is there or not in the system. Recent mobile platforms have used JAVA so there are many anonymous pages. But embedded system normally are reluctant to use eMMC or SDCard as swap because there is wear-leveling and latency issues so if we do not use swap, it means we can't reclaim anoymous pages and at last, we could encounter OOM kill. :( Although we have real storage as swap, it was a problem, too. Because it sometime ends up making system very unresponsible caused by slow swap storage performance. Quote from Luigi on Google "Since Chrome OS was mentioned: the main reason why we don't use swap to a disk (rotating or SSD) is because it doesn't degrade gracefully and leads to a bad interactive experience. Generally we prefer to manage RAM at a higher level, by transparently killing and restarting processes. But we noticed that zram is fast enough to be competitive with the latter, and it lets us make more efficient use of the available RAM. " and he announced. http://www.spinics.net/lists/linux-mm/msg57717.html Other uses case is to use zram for block device. Zram is block device so anyone can format the block device and mount on it so some guys on the internet start zram as /var/tmp. http://forums.gentoo.org/viewtopic-t-838198-start-0.html Let's promote zram and enhance/maintain it instead of removing. Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Nitin Gupta <ngupta@vflare.org> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Bob Liu <bob.liu@oracle.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hugh Dickins <hughd@google.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Luigi Semenzato <semenzato@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Cc: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bcf1647 commit cd67e10

9 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/block/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ source "drivers/block/paride/Kconfig"
108108

109109
source "drivers/block/mtip32xx/Kconfig"
110110

111+
source "drivers/block/zram/Kconfig"
112+
111113
config BLK_CPQ_DA
112114
tristate "Compaq SMART2 support"
113115
depends on PCI && VIRT_TO_BUS && 0

‎drivers/block/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ obj-$(CONFIG_BLK_DEV_PCIESSD_MTIP32XX) += mtip32xx/
4242

4343
obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
4444
obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk.o
45+
obj-$(CONFIG_ZRAM) += zram/
4546

4647
nvme-y := nvme-core.o nvme-scsi.o
4748
skd-y := skd_main.o

‎drivers/staging/Kconfig‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ source "drivers/staging/sep/Kconfig"
7676

7777
source "drivers/staging/iio/Kconfig"
7878

79-
source "drivers/staging/zram/Kconfig"
80-
8179
source "drivers/staging/wlags49_h2/Kconfig"
8280

8381
source "drivers/staging/wlags49_h25/Kconfig"

‎drivers/staging/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ obj-$(CONFIG_VT6656) += vt6656/
3232
obj-$(CONFIG_VME_BUS) += vme/
3333
obj-$(CONFIG_DX_SEP) += sep/
3434
obj-$(CONFIG_IIO) += iio/
35-
obj-$(CONFIG_ZRAM) += zram/
3635
obj-$(CONFIG_WLAGS49_H2) += wlags49_h2/
3736
obj-$(CONFIG_WLAGS49_H25) += wlags49_h25/
3837
obj-$(CONFIG_FB_SM7XX) += sm7xxfb/

0 commit comments

Comments
 (0)