[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180822062016.GA10356@infradead.org>
Date: Tue, 21 Aug 2018 23:20:16 -0700
From: Christoph Hellwig <hch@...radead.org>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Jeff Lien <jeff.lien@....com>, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-block@...r.kernel.org,
linux-scsi@...r.kernel.org, herbert@...dor.apana.org.au,
tim.c.chen@...ux.intel.com, david.darrington@....com,
jeff.furlong@....com
Subject: Re: [PATCH] Performance Improvement in CRC16 Calculations.
On Tue, Aug 21, 2018 at 09:40:34PM -0400, Martin K. Petersen wrote:
> When crc-t10dif is initialized, the crypto infrastructure will pick the
> algorithm with the highest priority currently registered. Both block and
> SCSI will cause crc-t10dif to be compiled as a built-in so this
> selection happens very early.
Ouch. This might actually happen in a lot of other users of the crypto
functionality as well.
> However, it seems like a bit of a deficiency in crypto that there is no
> way to upgrade existing transformations if higher priority algorithms
> become available. btrfs and a few others work around this issue by not
> using the generic lib/ CRC functions (which defeats the purpose of
> having these in the first place). Instead they are registering their own
> transformation at a later time where any accelerator modules are more
> likely to be loaded.
If we can't fix this in crypto (which doesn't seem that easy), we
should at least clearly document the issue somewhere, and fix this in
the t10pi code by initializing crct10dif_tfm in a lazy fashion only
once the fist block device starts using it.
Powered by blists - more mailing lists