]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/nvdimm/pfn_devs.c
libnvdimm: Stop using HPAGE_SIZE
authorOliver O'Halloran <oohall@gmail.com>
Tue, 27 Jun 2017 09:56:33 +0000 (19:56 +1000)
committerDan Williams <dan.j.williams@intel.com>
Tue, 25 Jul 2017 23:30:51 +0000 (16:30 -0700)
commit0dd69643061d78f3f9047c2382d8d77cca1ac943
treed290332080ff1b4bcfb60bbcbf3b09944e7caaa8
parent520eccdfe187591a51ea9ab4c1a024ae4d0f68d9
libnvdimm: Stop using HPAGE_SIZE

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: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/nd.h
drivers/nvdimm/pfn_devs.c