3 ms·
> On the other hand, it is possible to build a buffer-head-free kernel that supports Btrfs and XFS. So if I build a system that only uses XFS/BTRFS, do I get a
by yjftsjthsd-h 4y ago
> On the other hand, it is possible to build a buffer-head-free kernel that supports Btrfs and XFS.
So if I build a system that only uses XFS/BTRFS, do I get anything by explicitly disabling it, or are those filesystems already getting the performance benefit just by not using it themselves? Is BUFFER_HEAD just a goal to show kernel devs what's left, or does it have practical value to end users?
- rwmj 4y agoAll that the proposed new CONFIG_BUFFER_HEAD option does (https://lwn.net/ml/linux-kernel/20230424054926.26927-18-hch@lst.de/ https://lwn.net/ml/linux-kernel/20230424054926.26927-18-hch@...) is to enable/disable the struct code, and for each filesystem that still requires it, add: config EXFAT_FS tristate "exFAT filesystem support" + select BUFFER_HEAD select NLS select LEGACY_DIRECT_IO help which means that if CONFIG_BUFFER_HEAD is disabled then all those filesystems get disabled too (or if you pick a filesystem to enable that still needs struct buffer_head then the CONFIG_BUFFER_HEAD option is enabled). So basically it's only to show the kernel devs what is left. You already got the performance benefit for XFS etc as it just isn't used by those filesystems.
- dezgeg 4y agoIt's not quite just disabling compilation of code, but also disables some runtime checks (eg. "else if (iomap_use_buffer_heads(srcmap))" branches will be false at compile time and optimized out). But the difference is probably unmeasurably small.