mkfs: allow sysadmins to require PMD alignment

Back when persistent memory was a thing, users would occasionally ask
if we could make it easy for them to map the pmem using PMD page table
entries (~2M) instead of the base page size.  This would in theory
enable better performance due to increased TLB caching effects.

Now that we actually have a forced alignment feature, let's add the
ability to figure out the hugepage size, and add a magic forcealign=
value that triggers it.  There doesn't seem to be a good way to
determine if a passed-in path is really a persistent memory device, so
we cannot do this automatically.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
4 files changed