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

Split num_blocks when allocating superpages #85

Closed pleiadesian closed 3 years ago

pleiadesian commented 3 years ago

In nova_alloc_superpage, it's trying to find a free_list node that can hold all consecutive num_blocks. It's hard to succeed when fallocating a large space. For example, even if there is two 800MB free_list nodes, it will fail to use superpages when fallocating 1.6GB space. I think free blocks for superpages can be obtained from different free_list nodes. It can be done by directly returning the number of 2M-aligned free blocks found in nova_alloc_superpage, just like when allocating small pages.

Andiry commented 3 years ago

You are right. Care to send a PR?