Highmem, large folio, and bvec. What is the proper interface to iterate mp bvecs?

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

 



Hi,

Recently I'm trying to add bs > ps support for btrfs.

One thing I noticed is the bvec_* helpers, like bvec_kmap_local()/memzero_bvec()/... are all for single page bio_vecs, meaning bv_len and bv_offset must be inside a page.

This means those helpers will not be able to handle a large folio in one go.

On the other hand we also need to support HIGHMEM, which means we must call kmap/kunmap helpers for each page.


I'm wondering will it be possible to handle multi-page bvecs in fs block size incremental, without falling back to handle sub-blocks using sp bvecs. (Of course, all the folios queued into bios will have proper minimal order to cover at least one fs block)


Bcachefs is doing the separate handling for HIGHMEM (kmap + kunmap, sp bvecs) and regular mp bves in one go for its checksum handling.

Btrfs for now is mixing sp bvecs (checksum verification in block size unit), mp bvec (mostly to calculate bio size, so harmless) and folio iter for filemap.

Can we have a proper mp bvec handlers? Or is there a way to exclude HIGHMEM folios from filemaps completely so that we can just forget HIGHMEM for fses?

Thanks,
Qu






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux