Re: [PATCH] crypto/async_pq: use __free_page() instead of put_page()

2016-03-01 Thread Joonsoo Kim
2016-03-01 3:04 GMT+09:00 Dan Williams : > On Mon, Feb 29, 2016 at 1:33 AM, Arnd Bergmann wrote: >> The addition of tracepoints to the page reference tracking had an >> unfortunate side-effect in at least one driver that calls put_page >> from its exit function, resulting in a link error: >> >> `.

Re: [PATCH] [RFC] mm/page_ref, crypto/async_pq: don't put_page from __exit

2016-02-28 Thread Joonsoo Kim
2016-02-29 6:57 GMT+09:00 Arnd Bergmann : > The addition of tracepoints to the page reference tracking had an > unfortunate side-effect in at least one driver that calls put_page > from its exit function, resulting in a link error: > > `.exit.text' referenced in section `__jump_table' of crypto/bui

Re: [PATCH v2 04/10] crypto/compress: add asynchronous compression support

2016-02-04 Thread Joonsoo Kim
2016-02-04 23:53 GMT+09:00 Herbert Xu : > On Thu, Feb 04, 2016 at 04:17:41PM +0900, Joonsoo Kim wrote: >> >> Do you think not to merge scomp? Please let me know your overall >> plan about this.? > > I'm fine with a driver-side scomp interface. But I'd rather

Re: [PATCH v2 04/10] crypto/compress: add asynchronous compression support

2016-02-03 Thread Joonsoo Kim
2016-02-04 12:28 GMT+09:00 Herbert Xu : > On Thu, Feb 04, 2016 at 11:25:27AM +0800, Li, Weigang wrote: >> >> Please can you advise how to get the acomp patch accepted? > > Can you do a posting of these patches without scomp so we can > evaluate the effects? > Do you think not to merge scomp? Pleas

Re: [PATCH v2 04/10] crypto/compress: add asynchronous compression support

2016-01-31 Thread Joonsoo Kim
On Fri, Jan 29, 2016 at 06:09:01PM +0800, Herbert Xu wrote: > On Thu, Jan 28, 2016 at 12:19:42PM +0900, Joonsoo Kim wrote: > > > > I have tested asynchronous compression APIs in zram and I saw > > regression. Atomic allocation and setting up SG lists are culprit > > fo

Re: [PATCH v2 04/10] crypto/compress: add asynchronous compression support

2016-01-27 Thread Joonsoo Kim
Hello, Herbert. On Wed, Jan 27, 2016 at 04:09:26PM +0800, Herbert Xu wrote: > On Wed, Jan 27, 2016 at 04:03:55PM +0800, Herbert Xu wrote: > > On Wed, Jan 27, 2016 at 03:59:05PM +0800, Li, Weigang wrote: > > > > > > The acomp is also SG-based, while scomp only accepts flat buffer. > > > > Right, b

[PATCH v2 02/10] crypto: add algorithm type specific flag, CRYPTO_ALG_PRIVATE

2016-01-26 Thread Joonsoo Kim
flag, this patch reuses it to reduce complexity. It possibly can be used for other algorithm type. Signed-off-by: Joonsoo Kim --- include/linux/crypto.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/crypto.h b/include/linux/crypto.h index ab2a745..96530a1 100644 --- a/in

[PATCH v2 05/10] crypto/lzo: support new compression APIs

2016-01-26 Thread Joonsoo Kim
Now, new compression APIs are introduced and it has some benefits. Let's support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lzo.c | 95 ++ 2 files changed, 83 insertions(+), 13 deletions(-) diff --git a/c

[PATCH v2 01/10] crypto/compress: remove unused pcomp interface

2016-01-26 Thread Joonsoo Kim
It is unused now, so remove it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 19 -- crypto/Makefile| 2 - crypto/pcompress.c | 115 --- crypto/testmgr.c | 223 -- crypto/testmgr.h

[PATCH v2 03/10] crypto/compress: introduce sychronuous compression API

2016-01-26 Thread Joonsoo Kim
e can achieve maximum parallelism without memory overhead caused by context buffer. Signed-off-by: Joonsoo Kim --- crypto/Kconfig| 5 ++ crypto/Makefile | 1 + crypto/scompress.c| 114 ++ include/crypto/compress.h

[PATCH v2 10/10] crypto/testmgr: add new compression APIs test

2016-01-26 Thread Joonsoo Kim
New compression APIs are supported now so we need test cases. This patch implements it based on previous compression test framework. Almost changes are straight forward. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/testmgr.c | 227

[PATCH v2 08/10] crypto/842: support new compression APIs

2016-01-26 Thread Joonsoo Kim
Now, new compression APIs are introduced and it has some benefits. Let's support it. Signed-off-by: Joonsoo Kim --- crypto/842.c | 85 +++--- crypto/Kconfig | 1 + 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/crypto/

[PATCH v2 04/10] crypto/compress: add asynchronous compression support

2016-01-26 Thread Joonsoo Kim
-by: Weigang Li Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 3 +- crypto/Makefile| 3 +- crypto/acompress.c | 164 crypto/scompress.c | 170 + include/crypto/compress.h

[PATCH v2 09/10] crypto/deflate: support new compression APIs

2016-01-26 Thread Joonsoo Kim
Now, new compression APIs are introduced and it has some benefits. Let's support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/deflate.c | 110 ++- 2 files changed, 101 insertions(+), 10 deletions(-) diff --git a/c

[PATCH v2 07/10] crypto/lz4hc: support new compression APIs

2016-01-26 Thread Joonsoo Kim
Now, new compression APIs are introduced and it has some benefits. Let's support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lz4hc.c | 91 +++--- 2 files changed, 82 insertions(+), 10 deletions(-) diff --git a/c

[PATCH v2 06/10] crypto/lz4: support new compression APIs

2016-01-26 Thread Joonsoo Kim
Now, new compression APIs are introduced and it has some benefits. Let's support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lz4.c | 91 +++--- 2 files changed, 82 insertions(+), 10 deletions(-) diff --git a/c

[PATCH v2 00/10] Introduce new async/sync compression APIs

2016-01-26 Thread Joonsoo Kim
this change, we can decompress without context buffer if algorithm supports it. In this case, we can achieve maximum parallelism without memory overhead caused by context buffer. Please let know if there is a problem. Thanks. [1]: https://lkml.org/lkml/2015/10/14/83 Joonsoo Kim (9): crypto/com

[PATCH RFC 3/7] crypto: add asynchronous compression support

2016-01-03 Thread Joonsoo Kim
Li Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 3 +- crypto/Makefile| 3 +- crypto/acompress.c | 164 + crypto/scompress.c | 169 ++ include/crypto/compress.h

[PATCH RFC 2/7] crypto/compress: introduce sychronuous compression API

2016-01-03 Thread Joonsoo Kim
cture change will make APIs more flexible. Signed-off-by: Joonsoo Kim --- crypto/Kconfig| 5 ++ crypto/Makefile | 1 + crypto/scompress.c| 114 ++ include/crypto/compress.h | 76 +++ include/

[PATCH RFC 1/7] crypto/compress: remove unused pcomp interface

2016-01-03 Thread Joonsoo Kim
It is unused now, so remove it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 19 -- crypto/Makefile| 2 - crypto/pcompress.c | 115 --- crypto/testmgr.c | 223 -- crypto/testmgr.h

[PATCH RFC 4/7] crypto/lzo: support SCOMPRESS alg type

2016-01-03 Thread Joonsoo Kim
For proof of concept, SCOMPRESS alg type is implemented for lzo. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lzo.c | 94 ++ 2 files changed, 82 insertions(+), 13 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig

[PATCH RFC 5/7] crypto: testmgr: add scompress/acompress test

2016-01-03 Thread Joonsoo Kim
Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/testmgr.c | 173 --- 2 files changed, 165 insertions(+), 9 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index b4b485c..f487502 100644 --- a/crypto/Kconfig +++ b

[PATCH RFC 7/7] crypto/lzo: add CRYPTO_ALG_SCOMPRESS_DECOMP_NOCTX cra_flags

2016-01-03 Thread Joonsoo Kim
Signed-off-by: Joonsoo Kim --- crypto/lzo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/lzo.c b/crypto/lzo.c index 47998e9..90afbf9 100644 --- a/crypto/lzo.c +++ b/crypto/lzo.c @@ -142,7 +142,8 @@ static struct scomp_alg scomp = { .base

[PATCH RFC 6/7] crypto/compress: add algorithm type specific flag, DECOMP_NOCTX

2016-01-03 Thread Joonsoo Kim
Signed-off-by: Joonsoo Kim --- crypto/testmgr.c | 2 ++ include/crypto/compress.h | 8 include/linux/crypto.h| 6 ++ 3 files changed, 16 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index bd0c639..acd7428 100644 --- a/crypto/testmgr.c +++ b/crypto

[PATCH RFC 0/7] Introduce new async/sync compression APIs

2016-01-03 Thread Joonsoo Kim
If Herbert confirms that this is what he expect, I will respin the series with proper commit description and adding more algorithm support. Thanks. Joonsoo Kim (6): crypto/compress: remove unused pcomp interface crypto/compress: introduce sychronuous compression API crypto/lzo: support SCO

RE: [PATCH] crypto: add asynchronous compression support

2015-11-19 Thread Joonsoo Kim
Hello, Herbert. > -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Thursday, November 19, 2015 6:43 PM > To: Li, Weigang > Cc: linux-crypto@vger.kernel.org; Struk, Tadeusz; Joonsoo Kim; Sergey > Senozhatsky > Subject: Re: [PATCH] cry

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 11:05:49AM +0900, Sergey Senozhatsky wrote: > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > @@ -352,6 +352,7 @@ static ssize_t comp_algorithm_show(struct device *dev, > > size_t sz; > > struct zram *zram = dev_to_zram(dev); > >

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:38:41AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > Creates virtual block devices called /dev/zramX (X = 0, 1, ...). > > @@ -18,9 +17,8 @@ config ZRAM > > config ZRAM_LZ4_COM

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:29:03AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > static const char * const backends[] = { > > "lzo", > > -#ifdef CONFIG_ZRAM_LZ4_COMPRESS > > "lz4",

[PATCH v4 3/8] crypto/lz4: support contextless compressiona API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/lz4.c | 77 1 file changed, 67 insertions(+), 10

[PATCH v4 2/8] crypto/lzo: support contextless compression API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lzo.c | 81 -- 2 files changed, 69

[PATCH v4 4/8] crypto/deflate: support contextless compression API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/deflate.c | 96 ++-- 1 file changed, 86 insertions(+), 10

[PATCH v4 1/8] crypto/compress: introduce contextless compression and remove unused pcomp

2015-10-14 Thread Joonsoo Kim
zram in following patches. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 17 +- crypto/Makefile| 3 +- crypto/ccompress.c | 95 + crypto/pcompress.c | 115 --- crypto/zlib.c

[PATCH v4 5/8] zram: make stream find and release functions static

2015-10-14 Thread Joonsoo Kim
: Sergey Senozhatsky Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 27 +-- drivers/block/zram/zcomp.h| 8 ++-- drivers/block/zram/zram_drv.c | 6 +++--- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/drivers/block/zram/zcomp.c b

[PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
doesn't support zlib yet. Following patch will change this interface and enable various compression algorithm. Signed-off-by: Joonsoo Kim --- drivers/block/zram/Kconfig| 8 +++--- drivers/block/zram/Makefile | 4 +-- drivers/block/zram/zcomp.c| 63 ---

[PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
this patch is applied, there is no way to know current compression algorithm so it's really bad thing. Please let me know proper solution if someone have better idea. Signed-off-by: Joonsoo Kim --- Documentation/blockdev/zram.txt | 29 +++-- drivers/block/zram/Kc

[PATCH v4 6/8] zram: pass zstrm down to decompression path

2015-10-14 Thread Joonsoo Kim
compression backend require zstrm for decompression or NULL if it does not. Acked-by: Minchan Kim Signed-off-by: Sergey Senozhatsky Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 3 ++- drivers/block/zram/zcomp.h| 3 ++- drivers/block/zram/zram_drv.c | 20

[PATCH v4 0/8] zram: introduce contextless compression API and use it on zram

2015-10-14 Thread Joonsoo Kim
aration, we can save memory in some cases and get the best performance. This patchset solves Sergey's concern perfectly and provides possibility to use various compression algorithm in zram. Thanks. Joonsoo Kim (6): crypto/compress: introduce contextless compression and remove unused

Re: [PATCH v3 9/9] zram: use crypto decompress_noctx API

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 02:29:18PM +0900, Sergey Senozhatsky wrote: > On (09/18/15 14:19), Joonsoo Kim wrote: > > -/* Never return NULL, may sleep */ > > +/* May return NULL, may sleep */ > > struct zcomp_strm *zcomp_decompress_begin(struct zcomp *comp) > > {

Re: [PATCH v3 9/9] zram: use crypto decompress_noctx API

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 04:56:00PM +0900, Sergey Senozhatsky wrote: > On (09/18/15 14:19), Joonsoo Kim wrote: > [..] > > + /* > > +* Prepare to use crypto decompress_noctx API. One tfm is required > > +* to initialize crypto algorithm properly and fetch correspon

Re: [PATCH v3 9/9] zram: use crypto decompress_noctx API

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 12:51:28PM +0900, Minchan Kim wrote: > On Fri, Sep 18, 2015 at 02:19:24PM +0900, Joonsoo Kim wrote: > > Crypto subsystem now supports decompress_noctx API that requires > > special tfm_noctx. This tfm can be shared by multiple concurrent > > decompress

Re: [PATCH v3 8/9] zram: use crypto API for compression

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 12:45:12PM +0900, Minchan Kim wrote: > Hi Joonsoo, > > On Fri, Sep 18, 2015 at 02:19:23PM +0900, Joonsoo Kim wrote: > > Until now, zram uses compression algorithm through direct call > > to core algorithm function, but, it has drawback that we need t

Re: [PATCH v3 1/9] crypto: introduce decompression API that can be called via sharable tfm object

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 02:38:59PM +0900, Sergey Senozhatsky wrote: > On (09/18/15 14:19), Joonsoo Kim wrote: > [..] > > @@ -61,7 +61,8 @@ static struct crypto_alg alg = { > > .cra_module = THIS_MODULE, > > .cra_u = { .compress =

Re: [PATCH v3 8/9] zram: use crypto API for compression

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 02:19:03PM +0900, Sergey Senozhatsky wrote: > On (09/18/15 14:19), Joonsoo Kim wrote: > [..] > > -static struct zcomp_backend *find_backend(const char *compress) > > +static const char *find_backend(const char *compress) > > { > > int i

Re: [PATCH v3 1/9] crypto: introduce decompression API that can be called via sharable tfm object

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 03:18:17PM +0900, Sergey Senozhatsky wrote: > On (09/18/15 14:19), Joonsoo Kim wrote: > [..] > > static int __init lzo_mod_init(void) > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > > index e71cb70..31152b1 100644 > >

Re: [PATCH v3 1/9] crypto: introduce decompression API that can be called via sharable tfm object

2015-09-24 Thread Joonsoo Kim
On Tue, Sep 22, 2015 at 08:43:46PM +0800, Herbert Xu wrote: > On Fri, Sep 18, 2015 at 02:19:16PM +0900, Joonsoo Kim wrote: > > Until now, tfm object embeds (de)compression context in it and > > (de)compression in crypto API requires tfm object to use > > this context

Re: [PATCH v3 0/9] zram: introduce crypto decompress noctx API and use it on zram

2015-09-24 Thread Joonsoo Kim
On Mon, Sep 21, 2015 at 12:58:12PM +0900, Minchan Kim wrote: > On Fri, Sep 18, 2015 at 02:19:15PM +0900, Joonsoo Kim wrote: > > This patchset makes zram to use crypto API in order to support > > more compression algorithm. > > > > The reason we need to support vairou

[PATCH v3 1/9] crypto: introduce decompression API that can be called via sharable tfm object

2015-09-17 Thread Joonsoo Kim
ple tfm if decompression doesn't require any context to operate. Signed-off-by: Joonsoo Kim --- crypto/842.c | 3 ++- crypto/compress.c | 36 crypto/crypto_null.c | 3 ++- crypto/deflate.c | 3 ++- crypto/lz4.c | 3 ++-

[PATCH v3 2/9] crypto/lzo: support decompress_noctx

2015-09-17 Thread Joonsoo Kim
lzo's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/lzo.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v3 3/9] crypyo/lz4: support decompress_noctx

2015-09-17 Thread Joonsoo Kim
lz4's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/lz4.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v3 5/9] crypto/842: support decompress_noctx

2015-09-17 Thread Joonsoo Kim
842's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/842.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v3 7/9] zram: pass zstrm down to decompression path

2015-09-17 Thread Joonsoo Kim
compression backend require zstrm for decompression or NULL if it does not. Signed-off-by: Sergey Senozhatsky Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 3 ++- drivers/block/zram/zcomp.h| 3 ++- drivers/block/zram/zram_drv.c | 20 3 files changed, 20

[PATCH v3 8/9] zram: use crypto API for compression

2015-09-17 Thread Joonsoo Kim
llowing patch support to use crypto decompress_noctx API and would restore the performance as is. Signed-off-by: Joonsoo Kim --- drivers/block/zram/Kconfig | 8 +++ drivers/block/zram/Makefile| 4 +--- drivers/block/zram/zcomp.c | 54 +++---

[PATCH v3 6/9] zram: make stream find and release functions static

2015-09-17 Thread Joonsoo Kim
Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 27 +-- drivers/block/zram/zcomp.h| 8 ++-- drivers/block/zram/zram_drv.c | 6 +++--- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram

[PATCH v3 4/9] crypto/lz4hc: support decompress_noctx

2015-09-17 Thread Joonsoo Kim
lz4hc's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/lz4hc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-

[PATCH v3 9/9] zram: use crypto decompress_noctx API

2015-09-17 Thread Joonsoo Kim
x Read10411701.88 6426911.62 9423894.38 Re-read 10017386.62 6428218.88 11000063.50 Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c | 24 +++- drivers/block/zram/zcomp.h | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git

[PATCH v3 0/9] zram: introduce crypto decompress noctx API and use it on zram

2015-09-17 Thread Joonsoo Kim
/sec zram-base vs zram-crypto vs zram-crypto-noctx Read10411701.88 6426911.62 9423894.38 Re-read 10017386.62 6428218.88 1163.50 Thanks. Joonsoo Kim (7): crypto: introduce decompression API that can be called via sharable tfm object crypto/lzo: s

Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't require tfm object

2015-08-20 Thread Joonsoo Kim
On Thu, Aug 20, 2015 at 03:50:35PM +0800, Herbert Xu wrote: > On Thu, Aug 20, 2015 at 04:52:17PM +0900, Joonsoo Kim wrote: > > > > Hmm... I guess there is no problem. crypto_alg object fetched by > > crypto_get_comp() introduced in this patch could be hardware device > &

Re: [PATCH v2 1/8] crypto: support (de)compression API that doesn't require tfm object

2015-08-20 Thread Joonsoo Kim
On Thu, Aug 20, 2015 at 02:47:28PM +0800, Herbert Xu wrote: > On Thu, Aug 20, 2015 at 03:34:57PM +0900, Joonsoo Kim wrote: > > Until now, tfm object embeds (de)compression context in it and > > (de)compression in crypto API requires tfm object to use > > this context

[PATCH v2 2/8] crypto/lzo: support decompress_noctx

2015-08-19 Thread Joonsoo Kim
lzo's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/lzo.c | 18 +- 1 file changed, 17 insertions(+), 1 de

[PATCH v2 3/8] crypyo/lz4: support decompress_noctx

2015-08-19 Thread Joonsoo Kim
lz4's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/lz4.c | 17 - 1 file changed, 16 insertions(+), 1 de

[PATCH v2 4/8] crypto/lz4hc: support decompress_noctx

2015-08-19 Thread Joonsoo Kim
lz4hc's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/lz4hc.c | 17 - 1 file changed, 16 insertions(+), 1 de

[PATCH v2 5/8] crypto/842: support decompress_noctx

2015-08-19 Thread Joonsoo Kim
842's decompression doesn't requires any scratch buffer so it doesn't need tfm context. Hence, it can support crypto compression noctx API and this patch implements it. Signed-off-by: Joonsoo Kim --- crypto/842.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v2 6/8] zram: change zcomp_compress interface

2015-08-19 Thread Joonsoo Kim
zram regards zstrm's buffer as compression destination buffer, but, it is not intuitive and there is no document about it. Providing destination buffer to zcomp_compress() directly seems more intuitive interface to me so this patch changes zcomp_compress interface. Signed-off-by: Joonso

[PATCH v2 7/8] zram: use crypto API for compression

2015-08-19 Thread Joonsoo Kim
tch support to use crypto noctx API and would restore the performance as is. Signed-off-by: Joonsoo Kim --- drivers/block/zram/Kconfig | 13 +-- drivers/block/zram/Makefile| 4 +- drivers/block/zram/zcomp.c | 84 +-

[PATCH v2 8/8] zram: use decompress_noctx

2015-08-19 Thread Joonsoo Kim
2 9423894.38 Re-read 10017386.62 6428218.88 11000063.50 Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 28 +++- drivers/block/zram/zcomp.h| 9 - drivers/block/zram/zram_drv.c | 9 + 3 files changed, 40 insertions(+), 6

[PATCH v2 1/8] crypto: support (de)compression API that doesn't require tfm object

2015-08-19 Thread Joonsoo Kim
ssion function via crypto_alg, instead of tfm object. crypto_alg is required to get appropriate (de)compression function pointer. This can reduce overhead of maintaining multiple tfm if (de)compression doesn't require any context to operate. Signed-off-by: Joonsoo Kim --- crypto/842.c

[PATCH v2 0/8] zram: introduce crypto compress noctx API and use it on zram

2015-08-19 Thread Joonsoo Kim
/sec zram-base vs zram-crypto vs zram-crypto-noctx Read10411701.88 6426911.62 9423894.38 Re-read 10017386.62 6428218.88 1163.50 Thanks. Joonsoo Kim (8): crypto: support (de)compression API that doesn't require tfm object crypto/l

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 03:29:18PM +0800, Herbert Xu wrote: > On Thu, Aug 13, 2015 at 04:30:31PM +0900, Joonsoo Kim wrote: > > > > How about introducing new functions to search supported algorithm in > > kernel-side? As crypto API is used in more places, this interface > &

Re: [PATCH 2/2] zram: use crypto API to compress the page

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 03:32:33PM +0800, Herbert Xu wrote: > On Thu, Aug 13, 2015 at 04:19:41PM +0900, Joonsoo Kim wrote: > > > > If that optimization is really needed for the case that doesn't need > > tfm except fetching function pointer, we can implement sharable t

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 02:38:23PM +0800, Herbert Xu wrote: > On Thu, Aug 13, 2015 at 03:37:55PM +0900, Joonsoo Kim wrote: > > > > Is there any way to access netlink interface and get the output from > > kernel-side? I'd like to show information through > >

Re: [PATCH 2/2] zram: use crypto API to compress the page

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 12:51:13PM +0900, Sergey Senozhatsky wrote: > On (08/13/15 11:24), Joonsoo Kim wrote: > > Until now, zram uses compression algorithm through direct call > > to core algorithm function, but, it has drawback that we need to add > > compression algorith

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-12 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 11:19:54AM +0800, Herbert Xu wrote: > On Thu, Aug 13, 2015 at 11:24:13AM +0900, Joonsoo Kim wrote: > > Until now, zram uses compression algorithm through direct call > > to core algorithm function, but, it has drawback that we need to add > > compressi

[PATCH 2/2] zram: use crypto API to compress the page

2015-08-12 Thread Joonsoo Kim
patch will help that situation. Signed-off-by: Joonsoo Kim --- drivers/block/zram/Kconfig | 13 +-- drivers/block/zram/Makefile| 4 +- drivers/block/zram/zcomp.c | 87 ++ drivers/block/zram/zcomp.h | 34 + drive

[PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-12 Thread Joonsoo Kim
hm in cryto subsystem. To implement it on zram-side, crypto_alg_list and rwsem should be exported so this patch do it. Signed-off-by: Joonsoo Kim --- crypto/internal.h | 2 -- include/linux/crypto.h | 4 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/internal.h b/c

Re: [PATCH 01/10] workqueue: add wq_numa_tbl_len and wq_numa_possible_cpumask[]

2013-03-20 Thread JoonSoo Kim
2013/3/20 Tejun Heo : > Unbound workqueues are going to be NUMA-affine. Add wq_numa_tbl_len > and wq_numa_possible_cpumask[] in preparation. The former is the > highest NUMA node ID + 1 and the latter is masks of possibles CPUs for > each NUMA node. It is better to move this code to topology.c o