On Sat, Dec 30, 2017 at 12:56:58PM +0100, J. Fahrner wrote: > Some recent CPUs (Intel and SPARC) provide a hardware accelerated CRC32c > implementation. For best performance you should ensure that these > modules load before any ext4 filesystems with checksums. > > doing a lsmod on my system, I see: > > $ lsmod|fgrep crc > crct10dif_pclmul 16384 0 > crc32_pclmul 16384 0 > crc16 16384 2 bluetooth,ext4 > crc32c_generic 16384 0 > crc32c_intel 24576 2 > > crc16 is used by ext4. Does that mean I am not using hardware > accelerated crc32c?
Loading module dependencies on demand is error-prone, and you really don't want your / filesystem to fail at runtime for such a reason. Thus, these modules get loaded unconditionally. Also, if I understand correctly, ext4 can't switch crc implementations after it's initialized, which is a yet another reason to load them all. > If not, what can I do to use hardware accelerated crc32c? It's loaded automatically, and used if your hardware supports acceleration. I don't see ext4 being chatty wrt what it uses, you can load the btrfs module, which I believe uses the same code, and which says: on Braswell: Btrfs loaded, crc32c=crc32c-intel on Phenom II: Btrfs loaded, crc32c=crc32c-generic on Allwinner A64: Btrfs loaded, crc32c=crc32c-generic on Exynos 4412: Btrfs loaded, crc32c=crc32c-generic > Is it possible to turn an existing ext4fs into one with crc32c? You need "resize2fs -b" to switch to the so-called "64 bit" format, as the old format did not have enough unused space. Then you do the switch, then "fsck.ext4 -D" to rewrite all directories to the new format. > How can I load module crc32c_intel before filesystems get mounted? I believe you would need extra steps to _not_ load it when appropriate. Meow! -- // If you believe in so-called "intellectual property", please immediately // cease using counterfeit alphabets. Instead, contact the nearest temple // of Amon, whose priests will provide you with scribal services for all // your writing needs, for Reasonable And Non-Discriminatory prices. _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng