DAX common 4k zero page
Status from this message: [merged] dax-move-all-dax-radix-tree-defs-to-fs-daxc.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest5 patches 6 repliesApplied 5/5
- v45 patches 10 repliesSuperseded
- v35 patches 13 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 6 replies | Superseded | |
| v1 | 3 patches | 4 replies | Superseded |
Changes in v5 from the cover letter
- Added static __vm_insert_mixed() to mm/memory.c that holds the common code for both vm_insert_mixed() and vm_insert_mixed_mkwrite() so we don't have duplicate code and we don't have to pass boolean flags around. (Dan & Jan)
- Added a comment for the PFN sanity checking done in the mkwrite case of insert_pfn().
- Added Jan's reviewed-by tags.
Patches in v5 All 5 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | mm: add vm_insert_mixed_mkwrite()include/ mm/ | +45 | 6 replies | Applied |
| 2/5 | dax: relocate some dax functionsfs/ | +69 | 0 replies | Applied |
| 3/5 | dax: use common 4k zero page for dax mmap readsDocumentation/ fs/ fs/ +4 more | +86 | 0 replies | Applied |
| 4/5 | dax: remove DAX code from page_cache_tree_insert()fs/ include/ mm/ | +3 | 0 replies | Applied |
| 5/5 | dax: move all DAX radix tree defs to fs/dax.cfs/ include/ | +34 | 0 replies | Applied |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Jan Kara | Kirill A. Shutemov |
|---|---|---|
| 1/5 | R-b | A-b |
| 2/5 | R-b | |
| 3/5 | R-b | |
| 4/5 | R-b | |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/5] DAX common 4k zero page
Changes since v4:
- Added static __vm_insert_mixed() to mm/memory.c that holds the common code for both vm_insert_mixed() and vm_insert_mixed_mkwrite() so we don't have duplicate code and we don't have to pass boolean flags around. (Dan & Jan)
- Added a comment for the PFN sanity checking done in the mkwrite case of insert_pfn().
- Added Jan's reviewed-by tags.
This series has passed a full xfstests run on both XFS and ext4.
---
When servicing mmap() reads from file holes the current DAX code allocates a page cache page of all zeroes and places the struct page pointer in the mapping->page_tree radix tree. This has three major drawbacks:
1) It consumes memory unnecessarily. For every 4k page that is read via a DAX mmap() over a hole, we allocate a new page cache page. This means that if you read 1GiB worth of pages, you end up using 1GiB of zeroed memory.
2) It is slower than using a common zero page because each page fault has more work to do. Instead of just inserting a common zero page we have to allocate a page cache page, zero it, and then insert it.
3) The fact that we had to check for both DAX exceptional entries and for page cache pages in the radix tree made the DAX code more complex.
This series solves these issues by following the lead of the DAX PMD code and using a common 4k zero page instead. This reduces memory usage and decreases latencies for some workloads, and it simplifies the DAX code, removing over 100 lines in total.
Ross Zwisler (5):
mm: add vm_insert_mixed_mkwrite()
dax: relocate some dax functions
dax: use common 4k zero page for dax mmap reads
dax: remove DAX code from page_cache_tree_insert()
dax: move all DAX radix tree defs to fs/dax.c
Documentation/filesystems/dax.txt | 5 +- fs/dax.c | 345 ++++++++++++++++---------------------- fs/ext2/file.c | 25 +-- fs/ext4/file.c | 32 +--- fs/xfs/xfs_file.c | 2 +- include/linux/dax.h | 45 ----- include/linux/mm.h | 2 + include/trace/events/fs_dax.h | 2 - mm/filemap.c | 13 +- mm/memory.c | 50 +++++- 10 files changed, 196 insertions(+), 325 deletions(-)
Signature · 6 lines
2.9.4 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm