Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758393AbYHDOy4 (ORCPT ); Mon, 4 Aug 2008 10:54:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755224AbYHDOyW (ORCPT ); Mon, 4 Aug 2008 10:54:22 -0400 Received: from rhun.apana.org.au ([64.62.148.172]:43127 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756970AbYHDOyV (ORCPT ); Mon, 4 Aug 2008 10:54:21 -0400 Date: Mon, 4 Aug 2008 22:54:11 +0800 From: Herbert Xu To: David Woodhouse Cc: Arjan van de Ven , Austin Zhang , davem@davemloft.net, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH] Using Intel CRC32 instruction to accelerate CRC32c algorithm by new crypto API. Message-ID: <20080804145411.GA11889@gondor.apana.org.au> References: <1217842507.20845.18.camel@localhost.localdomain> <1217844725.3454.580.camel@pmac.infradead.org> <1217846139.20845.25.camel@localhost.localdomain> <1217846726.3454.589.camel@pmac.infradead.org> <20080804140435.GA11227@gondor.apana.org.au> <20080804072015.0fcd23e7@infradead.org> <1217861341.3454.641.camel@pmac.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1217861341.3454.641.camel@pmac.infradead.org> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 26 On Mon, Aug 04, 2008 at 03:49:01PM +0100, David Woodhouse wrote: > > And even for people who don't care about that, it doesn't look > particularly good. It looks like btrfs would need either to keep setting > up a crypto context and then tearing it down, or have a pool of > long-standing contexts and do some kind of locking on them -- neither of > which seem particularly optimal compared with just calling into > libcrc32c. No you don't have to set things up every time you use crc32c. The crypto interface lets you have a single tfm that can be used by multiple users simultaneously. For ahash algorithms all the state is stored in the request which can stay on the stack. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/