* crc32c implementation on x86 with SSE4.2... CONFIG_BTRFS_HW_SUM
@ 2008-10-16 13:40 Miguel Sousa Filipe
2008-10-16 13:49 ` Chris Mason
0 siblings, 1 reply; 3+ messages in thread
From: Miguel Sousa Filipe @ 2008-10-16 13:40 UTC (permalink / raw)
To: linux-btrfs
Hi there,
I noticed that btrfs, in the git tree, has its own implementation of
crc32c for x86 with SSE4.2 that implement a crc32 instruction.. it
appears.
Its protected by a ifdef CONFIG_BTRFS_HW_SUM, and if we're executing
on the right cpu, that will bypass the kernel implementation of
crc32c.
please see: http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-unstable.git;a=blob_plain;f=fs/btrfs/crc32c.h;hb=HEAD
Based on this understanding, should this be a implementation detail of
crc32c, and be correctly implemented (and therefore patched) in the
mainline kernel implementation of crc32c ?
I know that checksumming is cpu expensive, and btrfs wants the best
impl. possible. but that shouldn't be a btrfs issue, that should be
crc32c issue, and its the crc32c implementation that should be fixed,
instead of having our own special crc32c in case we're executing in
the right cpu.
Should I post a patch with this for the vanilla crc32c implementation?
kind regards,
--
Miguel Sousa Filipe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: crc32c implementation on x86 with SSE4.2... CONFIG_BTRFS_HW_SUM
2008-10-16 13:40 crc32c implementation on x86 with SSE4.2... CONFIG_BTRFS_HW_SUM Miguel Sousa Filipe
@ 2008-10-16 13:49 ` Chris Mason
2008-10-17 6:37 ` Tomasz Torcz
0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2008-10-16 13:49 UTC (permalink / raw)
To: Miguel Sousa Filipe; +Cc: linux-btrfs
On Thu, 2008-10-16 at 14:40 +0100, Miguel Sousa Filipe wrote:
> Hi there,
>
> I noticed that btrfs, in the git tree, has its own implementation of
> crc32c for x86 with SSE4.2 that implement a crc32 instruction.. it
> appears.
> Its protected by a ifdef CONFIG_BTRFS_HW_SUM, and if we're executing
> on the right cpu, that will bypass the kernel implementation of
> crc32c.
>
The Btrfs support for intel's faster crc32c came from a patch intel
posted to linux-kernel. I just hacked it up a bit at the time because I
didn't want to wait for mainline to include the work.
I don't see intel's patches in mainline yet, but I know there was a plan
to get them there.
-chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: crc32c implementation on x86 with SSE4.2... CONFIG_BTRFS_HW_SUM
2008-10-16 13:49 ` Chris Mason
@ 2008-10-17 6:37 ` Tomasz Torcz
0 siblings, 0 replies; 3+ messages in thread
From: Tomasz Torcz @ 2008-10-17 6:37 UTC (permalink / raw)
To: linux-btrfs
Dnia 2008-10-16, czw o godzinie 09:49 -0400, Chris Mason pisze:
> On Thu, 2008-10-16 at 14:40 +0100, Miguel Sousa Filipe wrote:
> > Hi there,
> >
> > I noticed that btrfs, in the git tree, has its own implementation of
> > crc32c for x86 with SSE4.2 that implement a crc32 instruction.. it
> > appears.
> I don't see intel's patches in mainline yet, but I know there was a
plan
> to get them there.
It seems to be merged:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8cb51ba8e06570a5fff674b3744d12a1b089f2d0
Using generic, replaceable by arch version is surely better. This way
you can avoid implementing crc32 for each architecture (like, for
example UltraSPARC T2, which computes crc at healthy 48 GB/s).
--
Tomasz Torcz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-17 6:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16 13:40 crc32c implementation on x86 with SSE4.2... CONFIG_BTRFS_HW_SUM Miguel Sousa Filipe
2008-10-16 13:49 ` Chris Mason
2008-10-17 6:37 ` Tomasz Torcz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox