Skip to content
  • Oliver O'Halloran's avatar
    libnvdimm: Stop using HPAGE_SIZE · 0dd69643
    Oliver O'Halloran authored
    
    
    Currently libnvdimm uses HPAGE_SIZE as the default alignment for DAX and
    PFN devices. HPAGE_SIZE is the default hugetlbfs page size and when
    hugetlbfs is disabled it defaults to PAGE_SIZE. Given DAX has more
    in common with THP than hugetlbfs we should proably be using
    HPAGE_PMD_SIZE, but this is undefined when THP is disabled so lets just
    give it a new name.
    
    The other usage of HPAGE_SIZE in libnvdimm is when determining how large
    the altmap should be. For the reasons mentioned above it doesn't really
    make sense to use HPAGE_SIZE here either. PMD_SIZE seems to be safe to
    use in generic code and it happens to match the vmemmap allocation block
    on x86 and Power. It's still a hack, but it's a slightly nicer hack.
    
    Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    0dd69643