tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Generic crc32c support in kernel?



Yeah, a lib would be the best place for this - as well as ext\dfs, iscsi and sctp use crc32c, and there will probably be more users. Would also be good to get this shared with userland via src/common

On 12 August 2016 at 12:24, Jaromír Doleček <jaromir.dolecek%gmail.com@localhost> wrote:
Hi,

I'm working on ext2fs code now, ext3/ext4 uses crc32c almost exclusively to checksum many filesystem structures, so I'll need this soon to write data properly and thus support generally used filesystem options.

We do have crc32 support in libkern, so I was thinking doing something along that.

I noticed we have something in sctp_crc32.c, also there is another implementation in iscsi code. I also found FreeBSD has consolidated and optimized this a bit, they use one shared implementation for both places. Even there, it's just C code - countrary to Linux, which has also code to use the Intel CPU instructions if available. So I've been thinking I could either extract this into some shared code; or just create third fork within kernel specially for ext2fs.

What is general option, is there any interest to have crc32c support consolidated into a lib, should I put some efford into making this shared code? It adds some kernel bloat, so I'm slightly reluctant.

Jaromir



Home | Main Index | Thread Index | Old Index