[PATCH 3/4] zstd: move params structure to global variable to reduce stack usage

2019-06-03 Thread Maninder Singh
As params structure remains same for lifetime, just initialise it at init time and make it global variable. Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang --- crypto/zstd.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/zstd.c b/crypto/zstd.c

[PATCH 0/4] zstd: reduce stack usage

2019-06-03 Thread Maninder Singh
[] (shrink_zone+0x53c/0x7c0) (shrink_zone) from [] (try_to_free_pages+0x2fc/0x7cc) (try_to_free_pages) from [] (__alloc_pages_nodemask+0x534/0x91c) (__alloc_pages_nodemask) from [] (pagecache_get_page+0xe0/0x1d8) Maninder Singh, Vaneet Narang (4): zstd: pass pointer rathen than structure to

[PATCH 4/4] zstd: change structure variable from int to char

2019-06-03 Thread Maninder Singh
Elements of ZSTD_frameParameters structure are used as flag, so just declare them as char. ZSTD_frameParameters structure is used by ZSTD_parameters. Before: == sizeof(ZSTD_parameters) $1 = 40 After: = sizeof(ZSTD_parameters) $1 = 32 Signed-off-by: Maninder Singh Signed-off-by: Vaneet

[PATCH 1/4] zstd: pass pointer rathen than structure to functions

2019-06-03 Thread Maninder Singh
(ZSTD_compressCCtx) -> 192 -> 64 (zstd_compress) -> 144 -> 96 (crypto_compress) -> 32 (zcomp_compress) -> 32 Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang Fixing, Line 2

[PATCH 2/4] zstd: use U16 data type for rankPos

2019-06-03 Thread Maninder Singh
e24ddc01sub sp, sp, #256; 0x100 changed: e92ddbf0push{r4, r5, r6, r7, r8, r9, fp, ip, lr, pc} e24cb004sub fp, ip, #4 e24dd080sub sp, sp, #128; 0x80 Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang --- lib/zstd/huf_compress.c | 4

Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-04-16 Thread Maninder Singh
me >> memcpy 4918 MB/s 5108 MB/s 32768 100.00 data/data32k >> lz4 1.8.0 276 MB/s 1045 MB/s 14492 44.23 data/data32k >> >> LZO1x with 32K data (Default Compressor for ZRAM): >> sh-3.2# ./lzbench -elzo1x,1 data/data32k >> lzbench 1.7.3 (32-bit Linux) Assembled by P.Skibinski >> Compressor name Compress. Decompress. Compr. size Ratio Filename >> memcpy 5273 MB/s 5320 MB/s 32768 100.00 data/data32k >> lzo1x 2.09 -1 283 MB/s 465 MB/s 14292 43.62 data/data32k Thanks, Maninder Singh  

Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-04-01 Thread Maninder Singh
tension of LZ4 so there is no backward compatibility. Consider this as a different algorithm adapted from LZ4 for better compression ratio. Thanks Maninder Singh

Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

2018-04-01 Thread Maninder Singh
Hi, >> diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c >> index 4ed0a78..5bc5aab 100644 >> --- a/drivers/block/zram/zcomp.c >> +++ b/drivers/block/zram/zcomp.c >> @@ -17,11 +17,15 @@ >> #include >> >> #include "zcomp.h" >> +#define KB(1 << 10) >> >> static cons

Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-03-29 Thread Maninder Singh
Hello Nick/Sergey,   Any suggestion or comments, so that we can change code and resend the patch?   > Hi Nick / Sergey, >  >  > We have compared LZ4 Dyn with Original LZ4 using some samples of realtime  >application data(4Kb) > compressed/decompressed by ZRAM. For comparison we have used lzbench 

Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

2018-03-21 Thread Maninder Singh
CC: Vaneet Narang.   On (03/21/18 10:10), Maninder Singh wrote: > diff --git a/lib/lz4/lz4_compress.c b/lib/lz4/lz4_compress.c > index cc7b6d4..185c358 100644 > --- a/lib/lz4/lz4_compress.c > +++ b/lib/lz4/lz4_compress.c > @@ -183,7 +183,8 @@ static FORCE_INLINE int LZ4_c

[PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-03-20 Thread Maninder Singh
347866 seconds elapsed18.621296174 18.354183020 seconds elapsed22.366502860 22.357632546 seconds elapsed24.362417439 24.363003009 Maninder Singh, Vaneet Narang (1): lz4: Implement lz4 with dynamic offset (lz4_dyn). crypto/lz4.c

[PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

2018-03-20 Thread Maninder Singh
mem_used_total: 17117184 LZ4 orig_data_size: 78917632 compr_data_size: 16310717 mem_used_total: 17592320 LZ4_DYN === orig_data_size: 78917632 compr_data_size: 15520506 mem_used_total: 16748544 Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang --- crypto/lz4.c | 64