On Wed, Jan 16, 2019 at 3:05 AM Brice Goglin <Brice.Goglin(a)inria.fr> wrote:
Le 31/10/2018 à 04:13, Dan Williams a écrit :
> On the expectation that some environments may not upgrade libdaxctl
> (userspace component that depends on the /sys/class/dax hierarchy),
> provide a default / legacy dax_pmem_compat driver. The dax_pmem_compat
> driver implements the original /sys/class/dax sysfs layout rather than
> /sys/bus/dax. When userspace is upgraded it can blacklist this module
> and switch to the dax_pmem driver going forward.
Hello Dan
It looks like /sys/bus/dax/devices remains empty forever if
dax_pmem_compat has ever been loaded during this boot. Unloading
dax_pmem_compat and recreating dax devices with ndctl afterwards doesn't
make them appear (neither in /sys/class/dax obviously, nor in
/sys/bus/dax/devices surprisingly). Is this expected?
Things appear fine in /sys/bus/dax/devices after disabling the compat
module in Kconfig.
I am using your nvdimm-pending branch.
Thanks for trying it out!
So the kernel by itself will not opt you in to the new device-model.
If dax_pmem_compat is available then it needs to be explicitly
disabled with a modprobe policy. For example here's a before an after
of opting-in to /sys/bus/dax:
# ls /sys/class/dax
dax0.0
# ndctl disable-region all
disabled 3 regions
# daxctl migrate-device-model
Success: installed /etc/modprobe.d/daxctl.conf
# modprobe -r dax_pmem_compat
# lsmod | grep dax
# ndctl enable-region all
enabled 3 regions
# ls /sys/class/dax
<---- no output, it's now gone.
The patch that introduces "daxctl migrate-device-model" is here:
https://patchwork.kernel.org/patch/10763997/
However, behind the scenes all that is doing is installing
/etc/modprobe.d/daxctl.conf with the following contents:
blacklist dax_pmem_compat
alias nd:t7* dax_pmem