mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Nick Terrell <terrelln@fb.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"minchan@kernel.org" <minchan@kernel.org>,
	Yann Collet <cyan@fb.com>
Subject: Re: [PATCH] zram: add zstd to the supported algorithms list
Date: Fri, 25 Aug 2017 11:21:06 +0900	[thread overview]
Message-ID: <20170825022106.GC743@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <08620C31-AD6A-4DDB-ACA6-22243920AE1E@fb.com>

On (08/25/17 02:09), Nick Terrell wrote:
[..]
> > > I think using dictionaries in zram could be very interesting. We could for
> > > example, take a random sample of the RAM and use that as the dictionary
> > > for compression. E.g. take 32 512B samples from RAM and build a 16 KB
> > > dictionary (sizes may vary).
> > > 
> > > I'm not sure how you would pass a dictionary into the crypto compression
> > > API, but I'm sure we can make something work if dictionary compression
> > > proves to be beneficial enough.
> > 
> > a dictionaty pointer can be in `struct zstd_ctx'.
> 
> Sorry I'm not super familiar with the crypto API. How would the user
> initialize the dictionary in the `struct zstd_ctx'? I guess you could
> either expose the struct in some header, or provide a function that
> initializes it, but that isn't generic. Does the crypto library already
> have a standard way to provide extra information?

not really familiar either... I was thinking about having "zstd" and
"zstd_dict" crypto_alg structs - one would be !dict, the other one would
allocate dict and pass it to compress/decompress zstd callbacks. "zstd"
vecrsion would invoke zstd_params() passing zeros as compress and dict
sizes to ZSTD_getParams(), while "zstd_dict" would invoke, lets say,
zstd_params_dict() passing PAGE_SIZE-s. hm... (0, PAGE_SIZE)?  to
ZSTD_getParams(). just a rough idea...

	-ss

  reply	other threads:[~2017-08-25  2:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<20170824014936.4738-1-sergey.senozhatsky@gmail.com>
2017-08-24 21:33 ` Nick Terrell
2017-08-25  0:49   ` Joonsoo Kim
2017-08-25  1:35     ` Nick Terrell
2017-08-25  1:53       ` Sergey Senozhatsky
2017-08-25  2:09         ` Nick Terrell
2017-08-25  2:21           ` Sergey Senozhatsky [this message]
2017-08-25  2:46             ` Nick Terrell
2017-08-25  5:26               ` Sergey Senozhatsky
2017-08-25  2:02       ` Joonsoo Kim
2017-08-25  5:19       ` Minchan Kim
2017-08-25 19:31         ` Nick Terrell
2017-08-28  6:52           ` Minchan Kim
2017-08-25  0:51   ` Sergey Senozhatsky
2017-08-24  1:49 Sergey Senozhatsky
2017-08-24  4:30 ` Minchan Kim
2017-08-24 14:04   ` Sergey Senozhatsky
2017-08-25  4:50     ` Minchan Kim
2017-08-25  5:06       ` Sergey Senozhatsky
2017-08-25  5:27         ` Sergey Senozhatsky
2017-08-25  5:36         ` Minchan Kim
2017-08-25  7:45           ` Sergey Senozhatsky
2017-08-25  8:08             ` Adam Borowski
2017-08-25 18:55       ` Nick Terrell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170825022106.GC743@jagdpanzerIV.localdomain \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=cyan@fb.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=terrelln@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®