RFC Variable Order Page Cache Patchset V2
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest16 patches 0 repliesNew
RFC V1->V2 from the cover letter
- Some ext2 support
- Some block layer, fs layer support etc.
- Better page cache macros
- Use macros to clean up code.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | Free up page->private for compound pagesarch/ include/ include/ +4 more | +79 | 0 replies | |
| 2/16 | vmstat.c: Support accounting for compound pagesinclude/ mm/ | +9 | 0 replies | |
| 3/16 | Variable Order Page Cache: Add order field in mappingfs/ include/ | +2 | 0 replies | |
| 4/16 | Variable Order Page Cache: Add basic allocation functionsinclude/ mm/ | +35 | 0 replies | |
| 5/16 | Variable Order Page Cache: Add functions to establish sizesinclude/ | +42 | 0 replies | |
| 6/16 | Variable Page Cache: Add VM_BUG_ONs to check for correct page ordermm/ | +16 | 0 replies | |
| 7/16 | Variable Order Page Cache: Add clearing and flushing functioninclude/ | +25 | 0 replies | |
| 8/16 | Variable Order Page Cache: Fixup fallback functionsfs/ | +12 | 0 replies | |
| 9/16 | Variable Order Page Cache: Fix up mm/filemap.cmm/ | +31 | 0 replies | |
| 10/16 | Variable Order Page Cache: Readahead fixupsinclude/ mm/ mm/ +2 more | +23 | 0 replies | |
| 11/16 | Variable Page Cache Size: Fix up reclaim countersmm/ | +8 | 0 replies | |
| 12/16 | Variable Order Page Cache: Fix up the writeback logicfs/ mm/ mm/ +1 more | +22 | 0 replies | |
| 13/16 | Variable Order Page Cache: Fixed to block layerfs/ fs/ fs/ +2 more | +100 | 0 replies | |
| 14/16 | Variable Order Page Cache: Add support to ramfsfs/ fs/ include/ | +24 | 0 replies | |
| 15/16 | ext2: Add variable page size supportfs/ fs/ fs/ +2 more | +58 | 0 replies | |
| 16/16 | Variable Order Page Cache: Alternate implementation of page cache macrosinclude/ include/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 00/16] Variable Order Page Cache Patchset V2
RFC V1->V2
- Some ext2 support
- Some block layer, fs layer support etc.
- Better page cache macros
- Use macros to clean up code.
This patchset modifies the Linujx kernel so that higher order page cache pages become possible. The higher order page cache pages are compound pages and can be handled in the same way as regular pages.
Rationales:
1. We have problems supporting devices with a higher blocksize than page size. This is for example important to support CD and DVDs that can only read and write 32k or 64k blocks. We currently have a shim layer in there to deal with this situation which limits the speed of I/O. The developers are currently looking for ways to completely bypass the page cache because of this deficiency.
2. 32/64k blocksize is also used in flash devices. Same issues.
3. Future harddisks will support bigger block sizes
4. Performace. If we look at IA64 vs. x86_64 then it seems that the faster interrupt handling on x86_64 compensate for the speed loss due to a smaller page size (4k vs 16k on IA64). Having higher page sizes on all platform allows a significant reduction in I/O overhead and increases the size of I/O that can be performed by hardware in a single request since the number of scatter gather entries are typically limited for one request. This is going to become increasingly important to support the ever growing memory sizes since we may have to handle excessively large amounts of 4k requests for data sizes that may become common soon. For example to write a 1 terabyte file the kernel would have to handle 256 million 4k chunks.
5. Cross arch compatibility: It is currently not possible to mount an 16k blocksize ext2 filesystem created on IA64 on an x86_64 system.
The support here is currently only for buffered I/O and only for two filesystems ramfs and ext2.
Note that the higher order pages are subject to reclaim. This works in general since we are always operating on a single page struct. Reclaim is fooled to think that it is touching page sized objects (there are likely issues to be fixed there if we want to go down this road).
What is currently not supported:
- Mmapping higher order pages
- Direct I/O (there are some fundamental issues with direct I/O putting compound pages that have to be treated as single pages on the pagevecs and the variable order page cache putting higher order compound pages that hjave to be treated as a single large page onto pagevecs.
Breakage:
- Reclaim does not work for some reasons. Compound pages on the active list get lost somehow.
- Disk data is corrupted when writing ext2fs data. There is likely still a lot of work to do in the block layer.
- There is a lot of incomplete work. There are numerous places where the kernel can no longer assume that the page cache consists of PAGE_SIZE pages that have not been fixed yet.
Future:
- Expect several more RFCs
- We hope for XFS support soon
- There are filesystem layer and lower layer issues here that I am not that familiar with. If you can then please enhance my patches.
- Mmap support could be done in a way that makes the mmap page size independent from the page cache order. There is no problem of mapping a 4k section of a larger page cache page. This should leave mmap as is.
- Lets try to keep scope as small as possible.
--