]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
zram: promote zram from staging
authorMinchan Kim <minchan@kernel.org>
Wed, 15 Jan 2014 05:56:08 +0000 (16:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 05:54:01 +0000 (16:54 +1100)
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>
Documentation/blockdev/zram.txt [moved from drivers/staging/zram/zram.txt with 100% similarity]
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/zram/Kconfig [moved from drivers/staging/zram/Kconfig with 100% similarity]
drivers/block/zram/Makefile [moved from drivers/staging/zram/Makefile with 100% similarity]
drivers/block/zram/zram_drv.c [moved from drivers/staging/zram/zram_drv.c with 100% similarity]
drivers/block/zram/zram_drv.h [moved from drivers/staging/zram/zram_drv.h with 100% similarity]
drivers/staging/Kconfig
drivers/staging/Makefile

index 9ffa90c6201c3860779f4a3e7e162a368b766874..014a1cfc41c51fe5d69f0d76a31607d1834ba953 100644 (file)
@@ -108,6 +108,8 @@ source "drivers/block/paride/Kconfig"
 
 source "drivers/block/mtip32xx/Kconfig"
 
+source "drivers/block/zram/Kconfig"
+
 config BLK_CPQ_DA
        tristate "Compaq SMART2 support"
        depends on PCI && VIRT_TO_BUS && 0
index 816d979c32667f9549b7ef313f38f386b8790705..02b688d1438d95b6ad4f64cac713dacf77023c40 100644 (file)
@@ -42,6 +42,7 @@ obj-$(CONFIG_BLK_DEV_PCIESSD_MTIP32XX)        += mtip32xx/
 
 obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
 obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk.o
+obj-$(CONFIG_ZRAM) += zram/
 
 nvme-y         := nvme-core.o nvme-scsi.o
 skd-y          := skd_main.o
index 120d2fa9e531cd86de5b58dbac9eb3baf9822a74..040a51525b42e70a6bf99ac03efd23e9dbe805d3 100644 (file)
@@ -76,8 +76,6 @@ source "drivers/staging/sep/Kconfig"
 
 source "drivers/staging/iio/Kconfig"
 
-source "drivers/staging/zram/Kconfig"
-
 source "drivers/staging/wlags49_h2/Kconfig"
 
 source "drivers/staging/wlags49_h25/Kconfig"
index cb19d0afa0da1d9cca0201f68798871ac2721446..dea056bf7ff249ef05385d997e880c8e64dc4f70 100644 (file)
@@ -32,7 +32,6 @@ obj-$(CONFIG_VT6656)          += vt6656/
 obj-$(CONFIG_VME_BUS)          += vme/
 obj-$(CONFIG_DX_SEP)            += sep/
 obj-$(CONFIG_IIO)              += iio/
-obj-$(CONFIG_ZRAM)             += zram/
 obj-$(CONFIG_WLAGS49_H2)       += wlags49_h2/
 obj-$(CONFIG_WLAGS49_H25)      += wlags49_h25/
 obj-$(CONFIG_FB_SM7XX)         += sm7xxfb/