lkml.org 
[lkml]   [2008]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Using Intel CRC32 instruction to accelerate CRC32c algorithm by new crypto API.
From
Date
On Mon, 2008-08-04 at 23:42 +0800, Herbert Xu wrote:
> Chris Mason <chris.mason@oracle.com> wrote:
> >
> >>From a performance point of view I'm probably reading the crypto API
> > code wrong, but it looks like my choices are to either have a long
> > standing context and use locking around the digest/hash calls to protect
> > internal crypto state, or create a new context every time and take a
> > perf hit while crypto looks up the right module.
>
> You're looking at the old hash interface. New users should use the
> ahash interface which was only recently added to the kernel. It
> lets you store the state in the request object which you pass to
> the algorithm on every call. This means that you only need one
> tfm in the entire system for crc32c.
>

Great to hear, that solves my main concern then. There is still the
embedded argument against needing all of crypto api just for libcrc32c.

It does make sense to me to have a libcrc32c that does the HW detection
and uses HW assist when present, and just have the cypto api call that.

-chris




\
 
 \ /
  Last update: 2008-08-04 18:19    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site