From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66B87C3A5A6 for ; Thu, 19 Sep 2019 15:50:55 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38B5B208C0 for ; Thu, 19 Sep 2019 15:50:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="seKkheH9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38B5B208C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5E84C202EBEA6; Thu, 19 Sep 2019 08:50:00 -0700 (PDT) Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::32b; helo=mail-ot1-x32b.google.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 92831202EA947 for ; Thu, 19 Sep 2019 08:49:58 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id f21so3467663otl.13 for ; Thu, 19 Sep 2019 08:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hAQpuJV2hc6p1LNIlIb8VyFvKUvCMS8PN0tBtt6FY8g=; b=seKkheH9L6Q5ybmuPNvk0Wrw9yH85ozvkGL+Vx5sStO/GzFxmhUhVbVu5u93AeNf4n ruwGq3yRZJg7vOcCJi28Vba0DtMV1LAZcolcSN8o5oNIgZDhNRqelzkU9j3OiQRfEmbZ ODjuryRpyEpQykJrMhuWHxE1HPVZghaJNl12u5nxbHyhrcNIDrxfZcnkR8BDAA1+OqcX 32LNkJnarbkNMRXOjuY5wno9BbTaj8tyQitAIaRAQ23CkCYtY5X57PPFRuVIe3xYKIs6 2OatHxmMcR1M8jf6CzUWtjkzYSijFVfkG0+nJE+4FTZBF6UhCRflmcRlBLJYvon5Cn37 fm2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hAQpuJV2hc6p1LNIlIb8VyFvKUvCMS8PN0tBtt6FY8g=; b=uWAUGnigoLwEhLUIH79GPY9I4HM6GQAeYff/yensNIQCHPYTUaN8u/4h3p8mSBu0bL e9bH4s5WJX6mWGnuRKkVmGFY5TqvM8M9p+EXRunM1obYPlrDN5fcWY1exiQdTyzH6kOH SHHJDduunh2nOiNkt+omPEbSz9Zemj6wsNWGdT80E7t2yqONHg1UNTFaOtY5ag3hz0l5 nfS3ne/ifu7xMnWXq62I7C22/xaWf60/XLb2zutCLJ5qy6yiMLyjEQoYwaOMJCHaFeWa RfZWeivb5k5NxnbC6Ro86rOwO1LK4DyetdN4Gc5qzzQxTyjNyyLrfwcTbz6zDZ56Cuy3 Bkhg== X-Gm-Message-State: APjAAAXj3QMbwVEiJ3HyyIjKwe41yEGgSV7ajKl1BMN0PWNEVVnAoHTE YkBC/mfd3WQ3gAoI7vdXBj7eZ2wVjD5RxO0E4Lh0FcNU X-Google-Smtp-Source: APXvYqx5jRV6+eDsdrEQJLAz5sycwrIvMIJ1uWjq02VHOxeqzSZDpoE7ObPl/6L7NiDjqOSXGR8tePwtERt6emMydc8= X-Received: by 2002:a9d:5ccc:: with SMTP id r12mr6690380oti.71.1568908252238; Thu, 19 Sep 2019 08:50:52 -0700 (PDT) MIME-Version: 1.0 References: <20190919115547.GA17963@angband.pl> <20190919154708.GA24650@angband.pl> In-Reply-To: <20190919154708.GA24650@angband.pl> From: Dan Williams Date: Thu, 19 Sep 2019 08:50:41 -0700 Message-ID: Subject: Re: hang in dax_pmem_compat_release on changing namespace mode To: Adam Borowski X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-nvdimm Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" On Thu, Sep 19, 2019 at 8:47 AM Adam Borowski wrote: > > 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 > is: > * 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: > .---- > #!/bin/sh > NET="-net bridge -net nic" > DISK=eoan-devdax.disk > > 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 Ok, I'll take a look. At first glance nothing in that config should be holding an indefinite page pin, so it does smell like a kernel bug. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm