RFC add support for blocksize > PAGE_SIZE
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest8 patches 13 repliesIn review
- v1 RFC8 patches 11 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | page_flags: add is_folio_hwpoison()include/ | +7 | 2 replies | |
| 2/8 | shmem: convert to use is_folio_hwpoison()mm/ | +3 | 3 replies | |
| 3/8 | shmem: account for high order foliosmm/ | +20 | 0 replies | |
| 4/8 | shmem: add helpers to get block sizeinclude/ mm/ | +34 | 0 replies | |
| 5/8 | shmem: account for larger blocks sizes for shmem_default_max_blocks()mm/ | +6 | 0 replies | |
| 6/8 | shmem: consider block size in shmem_default_max_inodes()mm/ | +7 | 0 replies | |
| 7/8 | shmem: add high order page supportmm/ | +7 | 0 replies | |
| 8/8 | shmem: add support to customize block size ordermm/ | +39 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [RFC v2 0/8] add support for blocksize > PAGE_SIZE
This is an initial attempt to add support for block size > PAGE_SIZE for tmpfs. Why would you want this? It helps us experiment with higher order folio uses with fs APIS and helps us test out corner cases which would likely need to be accounted for sooner or later if and when filesystems enable support for this. Better review early and burn early than continue on in the wrong direction so looking for early feedback.
I have other patches to convert shmem_file_read_iter() to folios too but that is not yet working. In the swap world the next thing to look at would be to convert swap_cluster_readahead() to folios.
As mentioned at LSFMM, if folks want to experiment with anything related to Large Block Sizes (LBS) I've been trying to stash related patches in a tree which tries to carry as many nuggets we have and can collect into a dedicated lage-block tree. Many of this is obviously work in progress so don't try it unless you want to your systems to blow up. But in case you do, you can use my large-block-20230525 branch [0]. Similarly you can also use kdevops with CONFIG_QEMU_ENABLE_EXTRA_DRIVE_LARGEIO support to get everything with just as that branch is used for that:
make
make bringup
make linux
Changes on this v2:
o the block size has been modified to block order after Matthew Wilcox's suggestion. This truly makes a huge difference in making this code much more easier to read and maintain.
o At Pankaj Raghav's suggestion I've put together a helper for poison flags and so this now introduces that as is_folio_hwpoison().
o cleaned up the nits / debug code as pointed out by Matthew Wilcox
o clarified the max block size we support is computed by the MAX_ORDER, and for x86_64 this is 8 MiB.
o Tested up to 4 MiB block size with a basic test nothing blew up
Future work:
o shmem_file_read_iter()
o extend struct address_space with order and use that instead of our own block order. We may still need to have our own block order, we'll need to see.
o swap_cluster_readahead() and friends coverted over to folios
o test this well
[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=large-block-20230525
[1] https://github.com/linux-kdevops/kdevops
Luis Chamberlain (8):
page_flags: add is_folio_hwpoison()
shmem: convert to use is_folio_hwpoison()
shmem: account for high order folios
shmem: add helpers to get block size
shmem: account for larger blocks sizes for shmem_default_max_blocks()
shmem: consider block size in shmem_default_max_inodes()
shmem: add high order page support
shmem: add support to customize block size order
include/linux/page-flags.h | 7 ++ include/linux/shmem_fs.h | 3 + mm/shmem.c | 139 +++++++++++++++++++++++++++++-------- 3 files changed, 119 insertions(+), 30 deletions(-)
Signature · 1 line
2.39.2