Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, weigang.li@intel.com
Subject: Re: [PATCH v6 2/8] crypto: add driver-side scomp interface
Date: Tue, 28 Jun 2016 08:41:42 +0100	[thread overview]
Message-ID: <20160628074141.GA7321@sivswdev01.ir.intel.com> (raw)
In-Reply-To: <20160624092643.GA18935@gondor.apana.org.au>

On Fri, Jun 24, 2016 at 05:26:43PM +0800, Herbert Xu wrote:
> Hmm, I guess we can still keep scomp and use vmalloc until someone
> spends the effort and optimises each algorithm to make them use acomp
> directly.
Ok.

> So I'd still like to move the allocation down into the algorithm.
> That way IPsec no longer needs to keep around a 64K buffer when
> the average packet size is less than a page.
> 
> What we can do for legacy scomp algorithms is to keep a per-cpu
> cache of 64K scratch buffers allocated using vmalloc.  Obviously
> this means that if the output size exceeds 64K then we will fail
> the operation.  But I don't really see an option besides optimising
> the algorithm to use acomp.
Are you suggesting a different cache of scratch buffers for every
algorithm implementation or a shared cache shared across all legacy
scomp algorithms?

> IOW let's move the memory allocation logic of IPComp into the scomp
> layer.  Before we do that we should also make sure that no other
> users of crypto compress needs output sizes in excess of 64K.
Would it be ok 128K instead?
We are proposing to use the acomp API from BTRFS. Limiting the size
of the source and destination buffers to 64K would not work since
BTRFS usually compresses 128KB. 
Here is the RFC sent by Weigang to the BTFS list:
http://www.spinics.net/lists/linux-btrfs/msg56648.html

Regards,

-- 
Giovanni

  reply	other threads:[~2016-06-28  7:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  8:16 [PATCH v6 0/8] crypto: asynchronous compression api Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 1/8] crypto: add " Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 2/8] crypto: add driver-side scomp interface Giovanni Cabiddu
2016-06-13  8:56   ` Herbert Xu
2016-06-22 15:53     ` Giovanni Cabiddu
2016-06-23 10:50       ` Herbert Xu
2016-06-24  8:37         ` Giovanni Cabiddu
2016-06-24  9:26           ` Herbert Xu
2016-06-28  7:41             ` Giovanni Cabiddu [this message]
2016-06-28  7:51               ` Herbert Xu
2016-06-08  8:16 ` [PATCH v6 3/8] crypto: acomp - add support for lzo via scomp Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 4/8] crypto: acomp - add support for lz4 " Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 5/8] crypto: acomp - add support for lz4hc " Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 6/8] crypto: acomp - add support for 842 " Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 7/8] crypto: acomp - add support for deflate " Giovanni Cabiddu
2016-06-08  8:16 ` [PATCH v6 8/8] crypto: acomp - update testmgr with support for acomp Giovanni Cabiddu

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=20160628074141.GA7321@sivswdev01.ir.intel.com \
    --to=giovanni.cabiddu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=weigang.li@intel.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