NVSL / linux-nova

NOVA is a log-structured file system designed for byte-addressable non-volatile memories, developed at the University of California, San Diego.
http://nvsl.ucsd.edu/index.php?path=projects/nova
Other
421 stars 118 forks source link

fs,nova: favor huge page mapping automatically #64

Closed fengyuleidian0615 closed 6 years ago

fengyuleidian0615 commented 6 years ago

In case of creating mapping with size fit into huge page, 2M for example, use thp_get_unmapped_area to get start address aligned in huge page size, which in turn will huge page mapping in case of page fault.

Before

[ 2841.949504] nova: [nova_dax_file_mmap:901] inode 208, MMAP 4KPAGE vm_start(0x7f661d141000), vm_end(0x7f661d541000), vm pgoff 0, 1024 blocks, vm_flags(0x300000fb), vm_page_prot(0x8000000000000027)

After

[13010.829945] nova: [nova_dax_file_mmap:901] inode 208, MMAP 4KPAGE vm_start(0x7f8699c00000), vm_end(0x7f869a000000), vm pgoff 0, 1024 blocks, vm_flags(0x300000fb), vm_page_prot(0x8000000000000027)

Signed-off-by: Fan Du fan.du@intel.com

Andiry commented 6 years ago

Thank you for the patch. Huge page mmap still requires physical address to be contiguous and aligned on huge page size, and this is the first step.