dax alignment problem on arm64 (and other achitectures)

Dan Williams dan.j.williams at intel.com
Fri Jan 29 15:26:07 EST 2021


On Fri, Jan 29, 2021 at 5:51 AM Pavel Tatashin
<pasha.tatashin at soleen.com> wrote:
>
> > Since we last talked about this the enabling for EFI "Special Purpose"
> > / Soft Reserved Memory has gone upstream and instantiates device-dax
> > instances for address ranges marked with EFI_MEMORY_SP attribute.
> > Critically this way of declaring device-dax removes the consideration
> > of it as persistent memory and as such no metadata reservation. So, if
> > you are willing to maintain the metadata external to the device (which
> > seems reasonable for your environment) and have your platform firmware
> > / kernel command line mark it as EFI_CONVENTIONAL_MEMORY +
> > EFI_MEMORY_SP, then these reserve-free dax-devices will surface.
>
> Hi Dan,
>
> This is cool. Does it allow conversion between devdax and fsdax so DAX
> aware filesystem can be installed and data can be put there to be
> preserved across the reboot?
>

It does not because it's not "pmem" by this designation.

Instead if you want fsdax, zero metadata on the device, and the
ability to switch from fsdax to devdax I think that could be achieved
with a new sysfs attribute at the region-device level. Currently the
mode of a namespace with no metadata on it defaults to "raw" mode
where "raw" treats the pmem as a persistent memory block device with
no DAX capability. There's no reason the default could instead be
devdax with pages mapped.

Something like:
ndctl disable-region region0
echo 1 > /sys/bus/nd/devices/region0/pagemap
echo devdax > /sys/bus/nd/devices/region0/raw_default
ndctl enable-region region0

...where the new pagemap attribute does set_bit(ND_REGION_PAGEMAP,
&nd_region->flags), and raw_default arranges for the namespace to be
shunted over to devdax.



More information about the linux-arm-kernel mailing list