Skip to contentSkip to conversation

staging: zcache: add crypto API support

PATCH Superseded Seth Jennings 3 participants 4 messages Dec 28, 2011 – Jan 3, 2012 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: zcache: add crypto API support

This patch allow zcache to use the crypto API for page compression. It replaces the direct LZO compress/decompress calls with calls into the crypto compression API. The compressor to be used is specified in the kernel boot line with the zcache parameter like:
zcache=lzo or zcache=deflate. If the specified compressor can't be loaded, zcache uses lzo as the default compressor.

---
 drivers/staging/zcache/Kconfig       |    7 +-
 drivers/staging/zcache/zcache-main.c |  189 +++++++++++++++++++++++++++++-----
 2 files changed, 165 insertions(+), 31 deletions(-)
drivers/staging/zcache/Kconfig +3 -4
index 7fabcb2..1b7bba7 100644
@@ -1,13 +1,12 @@
 config ZCACHE
 	tristate "Dynamic compression of swap pages and clean pagecache pages"
-	depends on CLEANCACHE || FRONTSWAP
+	depends on (CLEANCACHE || FRONTSWAP) && CRYPTO
 	select XVMALLOC
-	select LZO_COMPRESS
-	select LZO_DECOMPRESS
+	select CRYPTO_LZO
 	default n
 	help
 	  Zcache doubles RAM efficiency while providing a significant
-	  performance boosts on many workloads.  Zcache uses lzo1x
+	  performance boosts on many workloads.  Zcache uses
 	  compression and an in-kernel implementation of transcendent
 	  memory to store clean page cache pages and swap in RAM,
 	  providing a noticeable reduction in disk I/O.
drivers/staging/zcache/zcache-main.c +162 -27

292 lines not on this page · raw message

Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines

From: Seth Jennings [mailto:[email protected]]
Sent: Wednesday, December 28, 2011 7:22 AM
To: Greg Kroah-Hartman
Cc: Seth Jennings; Dan Magenheimer; Nitin Gupta; Dave Hansen; [email protected]; linux- [email protected]; Thadeu Lima de Souza Cascardo; Brian King; Robert Jennings
Subject: [PATCH] staging: zcache: add crypto API support

Quoted 8 lines

This patch allow zcache to use the crypto API for page compression. It replaces the direct LZO compress/decompress calls with calls into the crypto compression API. The compressor to be used is specified in the kernel boot line with the zcache parameter like:
zcache=lzo or zcache=deflate. If the specified compressor can't be loaded, zcache uses lzo as the default compressor.

Acked-by on v1 1/1
#2 lore raw
In reply to Seth Jennings
Quoted 8 lines · Seth Jennings

This patch allow zcache to use the crypto API for page compression. It replaces the direct LZO compress/decompress calls with calls into the crypto compression API. The compressor to be used is specified in the kernel boot line with the zcache parameter like:
zcache=lzo or zcache=deflate. If the specified compressor can't be loaded, zcache uses lzo as the default compressor.

Thanks,
Nitin

#3 lore raw
In reply to Seth Jennings

Greg,

Hold off on this one. I just found a bug in the 32-bit build.

Should have it figured out by the end of the day.

--
Seth

Quoted 12 lines · Seth Jennings

This patch allow zcache to use the crypto API for page compression. It replaces the direct LZO compress/decompress calls with calls into the crypto compression API. The compressor to be used is specified in the kernel boot line with the zcache parameter like:
zcache=lzo or zcache=deflate. If the specified compressor can't be loaded, zcache uses lzo as the default compressor.

---
 drivers/staging/zcache/Kconfig       |    7 +-
 drivers/staging/zcache/zcache-main.c |  189 +++++++++++++++++++++++++++++-----
 2 files changed, 165 insertions(+), 31 deletions(-)