Linux-NVDIMM Archive on
 help / color / Atom feed
From: Adam Borowski <>
To: Dan Williams <>
Cc: linux-nvdimm <>
Subject: Re: hang in dax_pmem_compat_release on changing namespace mode
Date: Thu, 19 Sep 2019 17:47:08 +0200
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Sep 19, 2019 at 08:10:47AM -0700, Dan Williams wrote:
> On Thu, Sep 19, 2019 at 4:56 AM Adam Borowski <> wrote:
> > Hi!
> > If I try to change the mode of a devdax namespace that's in use (mapped by
> > some process), ndctl hangs:
> Is it merely mapped, or might the pages be actively pinned / in use by
> another part of the kernel? The kernel has no choice but to wait for
> active page pins to drain. Can you get a stack trace of the process
> with the dev-dax instance mapped?

Looks like the behaviour is different depending on what the other process
* with qemu, the hang is 100% reproducible, the guest continues to work and
  cleanly exits -- qemu does not exit on its own (unlike normal case) but
  SIGTERM terminates it correctly.  Thus, qemu is not stuck, only ndctl is.
* with mere mmap() (I've used vmemcache) ndctl allows
  reconfiguring the namespace.  No hang.

My way to start qemu is:
NET="-net bridge -net nic"

exec qemu-system-x86_64 -enable-kvm -m 4096,slots=2,maxmem=16G -smp 8 $NET \
 -drive if=none,id=hd,file="$DISK",format=raw,cache=unsafe,discard=on \
 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd \
 -M pc,nvdimm,nvdimm-persistence=mem-ctrl \
 -object memory-backend-file,id=mem1,share=on,mem-path=/dev/dax0.0,size=4225761280,align=2M,pmem=on \
 -device nvdimm,id=nvdimm1,memdev=mem1,label-size=256K \
 -vnc :5

⢀⣴⠾⠻⢶⣦⠀ A MAP07 (Dead Simple) raspberry tincture recipe: 0.5l 95% alcohol,
⣾⠁⢠⠒⠀⣿⡁ 1kg raspberries, 0.4kg sugar; put into a big jar for 1 month.
⢿⡄⠘⠷⠚⠋⠀ Filter out and throw away the fruits (can dump them into a cake,
⠈⠳⣄⠀⠀⠀⠀ etc), let the drink age at least 3-6 months.
Linux-nvdimm mailing list

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 11:55 Adam Borowski
2019-09-19 15:10 ` Dan Williams
2019-09-19 15:47   ` Adam Borowski [this message]
2019-09-19 15:50     ` Dan Williams
2019-09-19 15:50     ` Adam Borowski

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-NVDIMM Archive on

Archives are clonable:
	git clone --mirror linux-nvdimm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvdimm linux-nvdimm/ \
	public-inbox-index linux-nvdimm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone