Skip to contentSkip to conversation

zram/zsmalloc promotion

PATCH Superseded Minchan Kim 4 participants 15 messages Oct 29, 2012 – Nov 1, 2012

Subsystems (6)

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Minchan Kim

author maintainer
#0 lore raw

v3 cover zram/zsmalloc promotion

This patchset promotes zram/zsmalloc from staging.
Both are very clean and zram have been used by many embedded product for a long time.
It's time to go out of staging.

Greg, Jens is already OK that zram is located under driver/blocks/. The issue remained is where we put zsmalloc.
The candidate is two under mm/ or under lib/
Konrad and Nitin wanted to put zsmalloc into lib/ instead of mm/.

Quote from Nitin
"
I think mm/ directory should only contain the code which is intended for global use such as the slab allocator, page reclaim code etc. zsmalloc is used by only one (or possibly two) drivers, so lib/ seems to be the right place.
"

Quote from Konrand
"
I like the idea of keeping it in /lib or /mm. Actually 'lib' sounds more appropriate since it is dealing with storing a bunch of pages in a nice layout for great density purposes.
"

In fact, there is some history about that.

Why I put zsmalloc into under mm firstly was that Andrew had a concern about using strut page's some fields freely in zsmalloc so he wanted to maintain it in mm/ if I remember correctly.

So I and Nitin tried to ask the opinion to akpm several times (at least 6 and even I sent such patch a few month ago) but didn't get any reply from him so I guess he doesn't have any concern about that any more.

In point of view that it's an another slab-like allocator, it might be proper under mm but it's not popular as current mm's allocators(/SLUB/SLOB and page allocator).

Frankly speaking, I don't care whether we put it to mm/ or lib/. It seems contributors(ex, Nitin and Konrad) like lib/ and Andrew is still silent. That's why I am biased into lib/ now.

If someone yell we should keep it to mm/ by logical claim, I can change my mind easily. Please raise your hand.

If Andrew doesn't have a concern about that any more, I would like to locate it into /lib.

This patchset is based on next-20121029

Minchan Kim (3):
zsmalloc: promote to lib/
zram: promote zram from staging
zram: select ZSMALLOC when ZRAM is configured

 drivers/block/Kconfig                    |    1 +
 drivers/block/Makefile                   |    1 +
 drivers/block/zram/Kconfig               |   26 +
 drivers/block/zram/Makefile              |    3 +
 drivers/block/zram/zram.txt              |   76 +++
 drivers/block/zram/zram_drv.c            |  793 ++++++++++++++++++++++
 drivers/block/zram/zram_drv.h            |  119 ++++
 drivers/block/zram/zram_sysfs.c          |  225 +++++++
 drivers/staging/Kconfig                  |    4 -
 drivers/staging/Makefile                 |    1 -
 drivers/staging/zcache/zcache-main.c     |    4 +-
 drivers/staging/zram/Kconfig             |   25 -
 drivers/staging/zram/Makefile            |    3 -
 drivers/staging/zram/zram.txt            |   76 ---
 drivers/staging/zram/zram_drv.c          |  793 ----------------------
 drivers/staging/zram/zram_drv.h          |  120 ----
 drivers/staging/zram/zram_sysfs.c        |  225 -------
 drivers/staging/zsmalloc/Kconfig         |   10 -
 drivers/staging/zsmalloc/Makefile        |    3 -
 drivers/staging/zsmalloc/zsmalloc-main.c | 1064 ------------------------------
 drivers/staging/zsmalloc/zsmalloc.h      |   43 --
 include/linux/zsmalloc.h                 |   43 ++
 lib/Kconfig                              |   18 +
 lib/Makefile                             |    1 +
 lib/zsmalloc.c                           | 1064 ++++++++++++++++++++++++++++++
 25 files changed, 2372 insertions(+), 2369 deletions(-)
 create mode 100644 drivers/block/zram/Kconfig
 create mode 100644 drivers/block/zram/Makefile
 create mode 100644 drivers/block/zram/zram.txt
 create mode 100644 drivers/block/zram/zram_drv.c
 create mode 100644 drivers/block/zram/zram_drv.h
 create mode 100644 drivers/block/zram/zram_sysfs.c
 delete mode 100644 drivers/staging/zram/Kconfig
 delete mode 100644 drivers/staging/zram/Makefile
 delete mode 100644 drivers/staging/zram/zram.txt
 delete mode 100644 drivers/staging/zram/zram_drv.c
 delete mode 100644 drivers/staging/zram/zram_drv.h
 delete mode 100644 drivers/staging/zram/zram_sysfs.c
 delete mode 100644 drivers/staging/zsmalloc/Kconfig
 delete mode 100644 drivers/staging/zsmalloc/Makefile
 delete mode 100644 drivers/staging/zsmalloc/zsmalloc-main.c
 delete mode 100644 drivers/staging/zsmalloc/zsmalloc.h
 create mode 100644 include/linux/zsmalloc.h
 create mode 100644 lib/zsmalloc.c
Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author maintainer
#1 lore raw

PATCH v3 1/3 zsmalloc: promote to lib/

This patch promotes the slab-based zsmalloc memory allocator from the staging tree to lib/

zcache/zram depends on this allocator for storing compressed RAM pages in an efficient way under system wide memory pressure where high-order (greater than 0) page allocation are very likely to fail.

For more information on zsmalloc and its internals, read the documentation at the top of the zsmalloc.c file.

---
 drivers/staging/Kconfig                  |    2 -
 drivers/staging/Makefile                 |    1 -
 drivers/staging/zcache/zcache-main.c     |    4 +-
 drivers/staging/zram/zram_drv.h          |    3 +-
 drivers/staging/zsmalloc/Kconfig         |   10 -
 drivers/staging/zsmalloc/Makefile        |    3 -
 drivers/staging/zsmalloc/zsmalloc-main.c | 1064 ------------------------------
 drivers/staging/zsmalloc/zsmalloc.h      |   43 --
 include/linux/zsmalloc.h                 |   43 ++
 lib/Kconfig                              |   18 +
 lib/Makefile                             |    1 +
 lib/zsmalloc.c                           | 1064 ++++++++++++++++++++++++++++++
 12 files changed, 1129 insertions(+), 1127 deletions(-)
 delete mode 100644 drivers/staging/zsmalloc/Kconfig
 delete mode 100644 drivers/staging/zsmalloc/Makefile
 delete mode 100644 drivers/staging/zsmalloc/zsmalloc-main.c
 delete mode 100644 drivers/staging/zsmalloc/zsmalloc.h
 create mode 100644 include/linux/zsmalloc.h
 create mode 100644 lib/zsmalloc.c
drivers/staging/Kconfig +0 -2
index 231a272..d3f4bed 100644
@@ -76,8 +76,6 @@ source "drivers/staging/zram/Kconfig"
 
 source "drivers/staging/zcache/Kconfig"
 
-source "drivers/staging/zsmalloc/Kconfig"
-
 source "drivers/staging/wlags49_h2/Kconfig"
 
 source "drivers/staging/wlags49_h25/Kconfig"
drivers/staging/Makefile +0 -1
index 2b291c0..ff8133d 100644
@@ -33,7 +33,6 @@ obj-$(CONFIG_DX_SEP)            += sep/
 obj-$(CONFIG_IIO)		+= iio/
 obj-$(CONFIG_ZRAM)		+= zram/
 obj-$(CONFIG_ZCACHE)		+= zcache/
-obj-$(CONFIG_ZSMALLOC)		+= zsmalloc/
 obj-$(CONFIG_WLAGS49_H2)	+= wlags49_h2/
 obj-$(CONFIG_WLAGS49_H25)	+= wlags49_h25/
 obj-$(CONFIG_FB_SM7XX)		+= sm7xxfb/
drivers/staging/zcache/zcache-main.c +2 -2
index 52b43b7..34b2c5c 100644
@@ -32,9 +32,9 @@
 #include <linux/crypto.h>
 #include <linux/string.h>
 #include <linux/idr.h>
-#include "tmem.h"
+#include <linux/zsmalloc.h>
 
-#include "../zsmalloc/zsmalloc.h"
+#include "tmem.h"
 
 #ifdef CONFIG_CLEANCACHE
 #include <linux/cleancache.h>
drivers/staging/zram/zram_drv.h +1 -2
index df2eec4..1e72965 100644
@@ -17,8 +17,7 @@
 
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
-
-#include "../zsmalloc/zsmalloc.h"
+#include <linux/zsmalloc.h>
 
 /*
  * Some arbitrary value. This is just to catch
drivers/staging/zsmalloc/Kconfig deleted +0 -10
deleted file mode 100644
index 9084565..0000000
@@ -1,10 +0,0 @@
-config ZSMALLOC
-	tristate "Memory allocator for compressed pages"
-	default n
-	help
-	  zsmalloc is a slab-based memory allocator designed to store
-	  compressed RAM pages.  zsmalloc uses virtual memory mapping
-	  in order to reduce fragmentation.  However, this results in a
-	  non-standard allocator interface where a handle, not a pointer, is
-	  returned by an alloc().  This handle must be mapped in order to
-	  access the allocated space.
drivers/staging/zsmalloc/Makefile deleted +0 -3
deleted file mode 100644
index b134848..0000000
@@ -1,3 +0,0 @@
-zsmalloc-y 		:= zsmalloc-main.o
-
-obj-$(CONFIG_ZSMALLOC)	+= zsmalloc.o
drivers/staging/zsmalloc/zsmalloc-main.c deleted +0 -1064

1,064 lines not on this page · raw message

drivers/staging/zsmalloc/zsmalloc.h deleted +0 -43

43 lines not on this page · raw message

include/linux/zsmalloc.h new file +43 -0

43 lines not on this page · raw message

lib/Kconfig +18 -0
index 4b31a46..9b1db85 100644
@@ -216,6 +216,24 @@ config DECOMPRESS_LZO
 config GENERIC_ALLOCATOR
 	boolean
 
+config ZSMALLOC
+       tristate "Memory allocator for compressed pages"
+       default n
+       help
+         zsmalloc is a slab-based memory allocator designed to store
+         compressed RAM pages.  zsmalloc uses a memory pool that combines
+         single pages into higher order pages by linking them together
+         using the fields of the struct page. Allocations are then
+         mapped through copy buffers or VM mapping, in order to reduce
+         memory pool fragmentation and increase allocation success rate under
+         memory pressure.
+
+         This results in a non-standard allocator interface where
+         a handle, not a pointer, is returned by the allocation function.
+         This handle must be mapped in order to access the allocated space.
+
+         If unsure, say N.
+
 #
 # reed solomon support is select'ed if needed
 #
lib/Makefile +1 -0
index e91b9df..47438f6 100644
@@ -64,6 +64,7 @@ obj-$(CONFIG_CRC7)	+= crc7.o
 obj-$(CONFIG_LIBCRC32C)	+= libcrc32c.o
 obj-$(CONFIG_CRC8)	+= crc8.o
 obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o
+obj-$(CONFIG_ZSMALLOC) += zsmalloc.o
 
 obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
 obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
lib/zsmalloc.c new file +1064 -0

1,064 lines not on this page · raw message

Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author maintainer
#2 lore raw

PATCH v3 2/3 zram: promote zram from staging

In reply to Minchan Kim

It's time to promote zram from staging because zram is in staging for a long time and is improved by many contributors so code is very clean. Most important issue, zram's dependency with x86 is solved by making zsmalloc portable. In addition, many embedded product uses zram in real practive so I think there is no reason to prevent promotion now.

---
 drivers/block/Kconfig             |    1 +
 drivers/block/Makefile            |    1 +
 drivers/block/zram/Kconfig        |   25 ++
 drivers/block/zram/Makefile       |    3 +
 drivers/block/zram/zram.txt       |   76 ++++
 drivers/block/zram/zram_drv.c     |  793 +++++++++++++++++++++++++++++++++++++
 drivers/block/zram/zram_drv.h     |  119 ++++++
 drivers/block/zram/zram_sysfs.c   |  225 +++++++++++
 drivers/staging/Kconfig           |    2 -
 drivers/staging/zram/Kconfig      |   25 --
 drivers/staging/zram/Makefile     |    3 -
 drivers/staging/zram/zram.txt     |   76 ----
 drivers/staging/zram/zram_drv.c   |  793 -------------------------------------
 drivers/staging/zram/zram_drv.h   |  119 ------
 drivers/staging/zram/zram_sysfs.c |  225 -----------
 15 files changed, 1243 insertions(+), 1243 deletions(-)
 create mode 100644 drivers/block/zram/Kconfig
 create mode 100644 drivers/block/zram/Makefile
 create mode 100644 drivers/block/zram/zram.txt
 create mode 100644 drivers/block/zram/zram_drv.c
 create mode 100644 drivers/block/zram/zram_drv.h
 create mode 100644 drivers/block/zram/zram_sysfs.c
 delete mode 100644 drivers/staging/zram/Kconfig
 delete mode 100644 drivers/staging/zram/Makefile
 delete mode 100644 drivers/staging/zram/zram.txt
 delete mode 100644 drivers/staging/zram/zram_drv.c
 delete mode 100644 drivers/staging/zram/zram_drv.h
 delete mode 100644 drivers/staging/zram/zram_sysfs.c
drivers/block/Kconfig +1 -0
index f7de322..3e3087e 100644
@@ -290,6 +290,7 @@ config BLK_DEV_CRYPTOLOOP
 	  cryptoloop device.
 
 source "drivers/block/drbd/Kconfig"
+source "drivers/block/zram/Kconfig"
 
 config BLK_DEV_NBD
 	tristate "Network block device support"
drivers/block/Makefile +1 -0
index 17e82df..7300159 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_BLK_DEV_UMEM)	+= umem.o
 obj-$(CONFIG_BLK_DEV_NBD)	+= nbd.o
 obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
 obj-$(CONFIG_VIRTIO_BLK)	+= virtio_blk.o
+obj-$(CONFIG_ZRAM)		+= zram/
 
 obj-$(CONFIG_VIODASD)		+= viodasd.o
 obj-$(CONFIG_BLK_DEV_SX8)	+= sx8.o
drivers/block/zram/Kconfig new file +25 -0
new file mode 100644
index 0000000..be5abe8
@@ -0,0 +1,25 @@
+config ZRAM
+	tristate "Compressed RAM block device support"
+	depends on BLOCK && SYSFS && ZSMALLOC
+	select LZO_COMPRESS
+	select LZO_DECOMPRESS
+	default n
+	help
+	  Creates virtual block devices called /dev/zramX (X = 0, 1, ...).
+	  Pages written to these disks are compressed and stored in memory
+	  itself. These disks allow very fast I/O and compression provides
+	  good amounts of memory savings.
+
+	  It has several use cases, for example: /tmp storage, use as swap
+	  disks and maybe many more.
+
+	  See zram.txt for more information.
+	  Project home: http://compcache.googlecode.com/
+
+config ZRAM_DEBUG
+	bool "Compressed RAM block device debug support"
+	depends on ZRAM
+	default n
+	help
+	  This option adds additional debugging code to the compressed
+	  RAM block device driver.
drivers/block/zram/Makefile new file +3 -0
new file mode 100644
index 0000000..7f4a301
@@ -0,0 +1,3 @@
+zram-y	:=	zram_drv.o zram_sysfs.o
+
+obj-$(CONFIG_ZRAM)	+=	zram.o
drivers/block/zram/zram.txt new file +76 -0

76 lines not on this page · raw message

drivers/block/zram/zram_drv.c new file +793 -0

793 lines not on this page · raw message

drivers/block/zram/zram_drv.h new file +119 -0

119 lines not on this page · raw message

drivers/block/zram/zram_sysfs.c new file +225 -0

225 lines not on this page · raw message

drivers/staging/Kconfig +0 -2
index d3f4bed..3eb5ef7 100644
@@ -72,8 +72,6 @@ source "drivers/staging/sep/Kconfig"
 
 source "drivers/staging/iio/Kconfig"
 
-source "drivers/staging/zram/Kconfig"
-
 source "drivers/staging/zcache/Kconfig"
 
 source "drivers/staging/wlags49_h2/Kconfig"
drivers/staging/zram/Kconfig deleted +0 -25
deleted file mode 100644
index be5abe8..0000000
@@ -1,25 +0,0 @@
-config ZRAM
-	tristate "Compressed RAM block device support"
-	depends on BLOCK && SYSFS && ZSMALLOC
-	select LZO_COMPRESS
-	select LZO_DECOMPRESS
-	default n
-	help
-	  Creates virtual block devices called /dev/zramX (X = 0, 1, ...).
-	  Pages written to these disks are compressed and stored in memory
-	  itself. These disks allow very fast I/O and compression provides
-	  good amounts of memory savings.
-
-	  It has several use cases, for example: /tmp storage, use as swap
-	  disks and maybe many more.
-
-	  See zram.txt for more information.
-	  Project home: http://compcache.googlecode.com/
-
-config ZRAM_DEBUG
-	bool "Compressed RAM block device debug support"
-	depends on ZRAM
-	default n
-	help
-	  This option adds additional debugging code to the compressed
-	  RAM block device driver.
drivers/staging/zram/Makefile deleted +0 -3
deleted file mode 100644
index 7f4a301..0000000
@@ -1,3 +0,0 @@
-zram-y	:=	zram_drv.o zram_sysfs.o
-
-obj-$(CONFIG_ZRAM)	+=	zram.o
drivers/staging/zram/zram.txt deleted +0 -76

76 lines not on this page · raw message

drivers/staging/zram/zram_drv.c deleted +0 -793

793 lines not on this page · raw message

drivers/staging/zram/zram_drv.h deleted +0 -119

119 lines not on this page · raw message

drivers/staging/zram/zram_sysfs.c deleted +0 -225

225 lines not on this page · raw message

Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author maintainer
#3 lore raw

PATCH v3 3/3 zram: select ZSMALLOC when ZRAM is configured

In reply to Minchan Kim

At the monent, we can configure zram in driver/block once zsmalloc in /lib menu is configured firstly. It's not convenient.

User can configure zram in driver/block regardless of zsmalloc enabling by this patch.

---
 drivers/block/zram/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/block/zram/Kconfig +2 -1
index be5abe8..ee23a86 100644
@@ -1,6 +1,7 @@
 config ZRAM
 	tristate "Compressed RAM block device support"
-	depends on BLOCK && SYSFS && ZSMALLOC
+	depends on BLOCK && SYSFS
+	select ZSMALLOC
 	select LZO_COMPRESS
 	select LZO_DECOMPRESS
 	default n
Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#4 lore raw
In reply to Minchan Kim
Quoted 40 lines

From: Minchan Kim [mailto:[email protected]]
Subject: [PATCH v3 0/3] zram/zsmalloc promotion

The candidate is two under mm/ or under lib/
Konrad and Nitin wanted to put zsmalloc into lib/ instead of mm/.

Quote from Nitin
"
I think mm/ directory should only contain the code which is intended for global use such as the slab allocator, page reclaim code etc. zsmalloc is used by only one (or possibly two) drivers, so lib/ seems to be the right place.
"

Quote from Konrand
"
I like the idea of keeping it in /lib or /mm. Actually 'lib' sounds more appropriate since it is dealing with storing a bunch of pages in a nice layout for great density purposes.
"

In fact, there is some history about that.

Why I put zsmalloc into under mm firstly was that Andrew had a concern about using strut page's some fields freely in zsmalloc so he wanted to maintain it in mm/ if I remember correctly.

So I and Nitin tried to ask the opinion to akpm several times (at least 6 and even I sent such patch a few month ago) but didn't get any reply from him so I guess he doesn't have any concern about that any more.

In point of view that it's an another slab-like allocator, it might be proper under mm but it's not popular as current mm's allocators(/SLUB/SLOB and page allocator).

Frankly speaking, I don't care whether we put it to mm/ or lib/. It seems contributors(ex, Nitin and Konrad) like lib/ and Andrew is still silent. That's why I am biased into lib/ now.

Quoted 5 lines

If someone yell we should keep it to mm/ by logical claim, I can change my mind easily. Please raise your hand.

If Andrew doesn't have a concern about that any more, I would like to locate it into /lib.

FWIW, I would vote for /lib as well.

Dan

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#5 lore raw
In reply to Minchan Kim
Quoted 4 lines · Minchan Kim

This patchset promotes zram/zsmalloc from staging.
Both are very clean and zram have been used by many embedded product for a long time.
It's time to go out of staging.

Agreed!

Quoted 2 lines

Greg, Jens is already OK that zram is located under driver/blocks/. The issue remained is where we put zsmalloc.

Doesn't matter much for me, but seems to be leaning toward /lib, baring an opinion from Andrew that it go in /mm. /lib is fine by me.

Seth

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author maintainer
#6 lore raw
In reply to Minchan Kim

Thanks all,

At last, everybody who contributes to zsmalloc want to put it under /lib.

Greg,
What should I do for promoting this dragging patchset?

Quoted 110 lines · Minchan Kim

This patchset promotes zram/zsmalloc from staging.
Both are very clean and zram have been used by many embedded product for a long time.
It's time to go out of staging.

Greg, Jens is already OK that zram is located under driver/blocks/. The issue remained is where we put zsmalloc.
The candidate is two under mm/ or under lib/
Konrad and Nitin wanted to put zsmalloc into lib/ instead of mm/.

Quote from Nitin
"
I think mm/ directory should only contain the code which is intended for global use such as the slab allocator, page reclaim code etc. zsmalloc is used by only one (or possibly two) drivers, so lib/ seems to be the right place.
"

Quote from Konrand
"
I like the idea of keeping it in /lib or /mm. Actually 'lib' sounds more appropriate since it is dealing with storing a bunch of pages in a nice layout for great density purposes.
"

In fact, there is some history about that.

Why I put zsmalloc into under mm firstly was that Andrew had a concern about using strut page's some fields freely in zsmalloc so he wanted to maintain it in mm/ if I remember correctly.

So I and Nitin tried to ask the opinion to akpm several times (at least 6 and even I sent such patch a few month ago) but didn't get any reply from him so I guess he doesn't have any concern about that any more.

In point of view that it's an another slab-like allocator, it might be proper under mm but it's not popular as current mm's allocators(/SLUB/SLOB and page allocator).

Frankly speaking, I don't care whether we put it to mm/ or lib/. It seems contributors(ex, Nitin and Konrad) like lib/ and Andrew is still silent. That's why I am biased into lib/ now.

If someone yell we should keep it to mm/ by logical claim, I can change my mind easily. Please raise your hand.

If Andrew doesn't have a concern about that any more, I would like to locate it into /lib.

This patchset is based on next-20121029

Minchan Kim (3):
zsmalloc: promote to lib/
zram: promote zram from staging
zram: select ZSMALLOC when ZRAM is configured

 drivers/block/Kconfig                    |    1 +
 drivers/block/Makefile                   |    1 +
 drivers/block/zram/Kconfig               |   26 +
 drivers/block/zram/Makefile              |    3 +
 drivers/block/zram/zram.txt              |   76 +++
 drivers/block/zram/zram_drv.c            |  793 ++++++++++++++++++++++
 drivers/block/zram/zram_drv.h            |  119 ++++
 drivers/block/zram/zram_sysfs.c          |  225 +++++++
 drivers/staging/Kconfig                  |    4 -
 drivers/staging/Makefile                 |    1 -
 drivers/staging/zcache/zcache-main.c     |    4 +-
 drivers/staging/zram/Kconfig             |   25 -
 drivers/staging/zram/Makefile            |    3 -
 drivers/staging/zram/zram.txt            |   76 ---
 drivers/staging/zram/zram_drv.c          |  793 ----------------------
 drivers/staging/zram/zram_drv.h          |  120 ----
 drivers/staging/zram/zram_sysfs.c        |  225 -------
 drivers/staging/zsmalloc/Kconfig         |   10 -
 drivers/staging/zsmalloc/Makefile        |    3 -
 drivers/staging/zsmalloc/zsmalloc-main.c | 1064 ------------------------------
 drivers/staging/zsmalloc/zsmalloc.h      |   43 --
 include/linux/zsmalloc.h                 |   43 ++
 lib/Kconfig                              |   18 +
 lib/Makefile                             |    1 +
 lib/zsmalloc.c                           | 1064 ++++++++++++++++++++++++++++++
 25 files changed, 2372 insertions(+), 2369 deletions(-)
 create mode 100644 drivers/block/zram/Kconfig
 create mode 100644 drivers/block/zram/Makefile
 create mode 100644 drivers/block/zram/zram.txt
 create mode 100644 drivers/block/zram/zram_drv.c
 create mode 100644 drivers/block/zram/zram_drv.h
 create mode 100644 drivers/block/zram/zram_sysfs.c
 delete mode 100644 drivers/staging/zram/Kconfig
 delete mode 100644 drivers/staging/zram/Makefile
 delete mode 100644 drivers/staging/zram/zram.txt
 delete mode 100644 drivers/staging/zram/zram_drv.c
 delete mode 100644 drivers/staging/zram/zram_drv.h
 delete mode 100644 drivers/staging/zram/zram_sysfs.c
 delete mode 100644 drivers/staging/zsmalloc/Kconfig
 delete mode 100644 drivers/staging/zsmalloc/Makefile
 delete mode 100644 drivers/staging/zsmalloc/zsmalloc-main.c
 delete mode 100644 drivers/staging/zsmalloc/zsmalloc.h
 create mode 100644 include/linux/zsmalloc.h
 create mode 100644 lib/zsmalloc.c
Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#7 lore raw
Quoted 6 lines · Minchan Kim

Thanks all,

At last, everybody who contributes to zsmalloc want to put it under /lib.

Greg,
What should I do for promoting this dragging patchset?

You need to get the -mm developers to agree that this is something that is worth accepting. I have yet to see any compeling argument why this even needs to be in the kernel in the first place.

I'm not moving this anywhere until you get their acceptance.

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author maintainer
#8 lore raw

Hi Greg,

Quoted 10 lines · Greg Kroah-Hartman
Quoted 6 lines · Minchan Kim

Thanks all,

At last, everybody who contributes to zsmalloc want to put it under /lib.

Greg,
What should I do for promoting this dragging patchset?

You need to get the -mm developers to agree that this is something that is worth accepting. I have yet to see any compeling argument why this

I'm one of mm developers. :)
Yes. I hope Andrew have a time to take a look.

Quoted 1 line

even needs to be in the kernel in the first place.

Confused. what do you mean "this"? "zsmalloc" or "zram" or "both"? If you mean "zsmalloc", I guess there were some lengthy thread about "why we need a new another allocator". Unfortunately, I didn't follow it at that time. Nitin, Pekka, Could you point out that thread? or summarize the result.

Quoted 2 lines

I'm not moving this anywhere until you get their acceptance.

I understand you.

It's one of problem in current mm mailing list.
As you know, many mm guys works for server, not embedded so they don't have big interest about embedded feature so prioirty of the feature was always low. CMA proved it and next turn is zram. Even new-comer in mm is few so review bandwidth is always low, too. :(

How can I poke them?
The only thing I can do is just (wait, repost) * 5? Sigh. :(

Quoted 7 lines

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 8 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#9 lore raw
Quoted 30 lines · Minchan Kim

Hi Greg,

Quoted 10 lines · Greg Kroah-Hartman
Quoted 6 lines · Minchan Kim

Thanks all,

At last, everybody who contributes to zsmalloc want to put it under /lib.

Greg,
What should I do for promoting this dragging patchset?

You need to get the -mm developers to agree that this is something that is worth accepting. I have yet to see any compeling argument why this

I'm one of mm developers. :)
Yes. I hope Andrew have a time to take a look.

Quoted 1 line

even needs to be in the kernel in the first place.

Confused. what do you mean "this"? "zsmalloc" or "zram" or "both"? If you mean "zsmalloc", I guess there were some lengthy thread about "why we need a new another allocator". Unfortunately, I didn't follow it at that time. Nitin, Pekka, Could you point out that thread? or summarize the result.

Quoted 2 lines

I'm not moving this anywhere until you get their acceptance.

I understand you.

Quoted 7 lines

It's one of problem in current mm mailing list.
As you know, many mm guys works for server, not embedded so they don't have big interest about embedded feature so prioirty of the feature was always low. CMA proved it and next turn is zram. Even new-comer in mm is few so review bandwidth is always low, too. :(

How can I poke them?

You just did. If they ignore this, wait a week, and resend. Persistance is key.

good luck,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author maintainer
#10 lore raw
Quoted 37 lines · Greg Kroah-Hartman
Quoted 36 lines · Minchan Kim

Hi Greg,

Quoted 10 lines · Greg Kroah-Hartman
Quoted 6 lines · Minchan Kim

Thanks all,

At last, everybody who contributes to zsmalloc want to put it under /lib.

Greg,
What should I do for promoting this dragging patchset?

You need to get the -mm developers to agree that this is something that is worth accepting. I have yet to see any compeling argument why this

I'm one of mm developers. :)
Yes. I hope Andrew have a time to take a look.

Quoted 1 line

even needs to be in the kernel in the first place.

Confused. what do you mean "this"? "zsmalloc" or "zram" or "both"? If you mean "zsmalloc", I guess there were some lengthy thread about "why we need a new another allocator". Unfortunately, I didn't follow it at that time. Nitin, Pekka, Could you point out that thread? or summarize the result.

Quoted 2 lines

I'm not moving this anywhere until you get their acceptance.

I understand you.

It's one of problem in current mm mailing list.
As you know, many mm guys works for server, not embedded so they don't have big interest about embedded feature so prioirty of the feature was always low. CMA proved it and next turn is zram. Even new-comer in mm is few so review bandwidth is always low, too. :(

Quoted 6 lines
Quoted 1 line

How can I poke them?

You just did. If they ignore this, wait a week, and resend. Persistance is key.

good luck,

Okay. I will wait.
Greg, what do you think about LTSI?
Is it proper feature to add it? For it, still do I need ACK from mm developers?

Quoted 8 lines

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Signature · 8 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author maintainer
#12 lore raw
Quoted 5 lines · Greg Kroah-Hartman
Quoted 2 lines · Minchan Kim

Greg, what do you think about LTSI?
Is it proper feature to add it? For it, still do I need ACK from mm developers?

It's already in LTSI, as it's in the 3.4 kernel, right?

Right. But as I look, it seems to be based on 3.4.11 which doesn't have recent bug fix and enhances and current 3.4.16 also doesn't include it.

Just out of curiosity.

Is there any rule about update period in long-term kernel? I mean how often you release long-term kernel.

Is there any rule about update period in LTSI kernel based on long-term kernel? If I get the answer on above two quesion, I can expect later what LTSI kernel version include feature I need.

Another question.
For example, There is A feature in mainline and A has no problem but someone invents new wheel "B" which is better than A so it replace A totally in recent mainline. As following stable-kernel rule, it's not a real bug fix so I guess stable kernel will never replace A with B. It means LTSI never get a chance to use new wheel. Right?

Thanks.

Quoted 6 lines

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Signature · 8 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#13 lore raw
Quoted 9 lines · Minchan Kim
Quoted 5 lines · Greg Kroah-Hartman
Quoted 2 lines · Minchan Kim

Greg, what do you think about LTSI?
Is it proper feature to add it? For it, still do I need ACK from mm developers?

It's already in LTSI, as it's in the 3.4 kernel, right?

Right. But as I look, it seems to be based on 3.4.11 which doesn't have recent bug fix and enhances and current 3.4.16 also doesn't include it.

You can ask for those bugfixes to get backported to the stable/longterm kernel tree, see Documentation/stable_kernel_rules.txt for how to do this properly.

Quoted 4 lines

Just out of curiosity.

Is there any rule about update period in long-term kernel? I mean how often you release long-term kernel.

About once a week lately.

Quoted 1 line

Is there any rule about update period in LTSI kernel based on long-term kernel?

No, the LTSI kernel work has been slow due to the lack of time on my part lately.

Quoted 8 lines

If I get the answer on above two quesion, I can expect later what LTSI kernel version include feature I need.

Another question.
For example, There is A feature in mainline and A has no problem but someone invents new wheel "B" which is better than A so it replace A totally in recent mainline. As following stable-kernel rule, it's not a real bug fix so I guess stable kernel will never replace A with B.

That is correct.

Quoted 1 line

It means LTSI never get a chance to use new wheel. Right?

No, you can submit the same patches for the LTSI kernel as well, they will probably be accepted as the rules are much more "loose" for the LTSI tree compared to the normal stable/longterm kernel rules. Which is the primary reason it is around.

Hope this helps,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author maintainer
#14 lore raw
Quoted 40 lines · Greg Kroah-Hartman
Quoted 9 lines · Minchan Kim
Quoted 5 lines · Greg Kroah-Hartman
Quoted 2 lines · Minchan Kim

Greg, what do you think about LTSI?
Is it proper feature to add it? For it, still do I need ACK from mm developers?

It's already in LTSI, as it's in the 3.4 kernel, right?

Right. But as I look, it seems to be based on 3.4.11 which doesn't have recent bug fix and enhances and current 3.4.16 also doesn't include it.

You can ask for those bugfixes to get backported to the stable/longterm kernel tree, see Documentation/stable_kernel_rules.txt for how to do this properly.

Quoted 4 lines

Just out of curiosity.

Is there any rule about update period in long-term kernel? I mean how often you release long-term kernel.

About once a week lately.

Quoted 1 line

Is there any rule about update period in LTSI kernel based on long-term kernel?

No, the LTSI kernel work has been slow due to the lack of time on my part lately.

Quoted 8 lines

If I get the answer on above two quesion, I can expect later what LTSI kernel version include feature I need.

Another question.
For example, There is A feature in mainline and A has no problem but someone invents new wheel "B" which is better than A so it replace A totally in recent mainline. As following stable-kernel rule, it's not a real bug fix so I guess stable kernel will never replace A with B.

That is correct.

Quoted 1 line

It means LTSI never get a chance to use new wheel. Right?

Quoted 8 lines

No, you can submit the same patches for the LTSI kernel as well, they will probably be accepted as the rules are much more "loose" for the LTSI tree compared to the normal stable/longterm kernel rules. Which is the primary reason it is around.

Hope this helps,

greg k-h

Thanks, Greg!

Signature · 8 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>