Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp2942031ima; Sun, 3 Feb 2019 09:56:17 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia2BXV50+C3H/nc7++7CPfQeZ89TK1wJDhNk/pH0+PKdMsoPOd2uEH+pET4p4r185AAR72/ X-Received: by 2002:a63:de46:: with SMTP id y6mr10072365pgi.198.1549216577509; Sun, 03 Feb 2019 09:56:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549216577; cv=none; d=google.com; s=arc-20160816; b=gINUUkNa4OzuT6ZmHpxYmuguKVfctF1zj1aH9EzE7305zPRddKtIIp4Tvnm7g6wdbi wgCJjl+ZgWtgh3V8EQ2P2EyH5aaEzCtCeB/dlfM00GJ8k+NwCRyO44CTw2bxOlmRRh7C ADbUKDfh+iiaZFG6IcaeeEze9RdMw8t58ak+vp7Ru+nHxAsI5WENRytO83hbDV+IFXMC N6KxU8vR7jJ8Jg5o7x6i7iDClLbkgcq5Z0w/lD8Xviy26tFYOgoGpsfaUIVUcC3GJL2y i4GBRk+qCtzY9ZafX+wZAqIB5aF500guNJQ8hABGk+zyiYA2seu6CmtIf9sM5BI9GN9L wWOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=il69hBbw1PefF0iSqsczm2kXao7knzvmA8rvZFbpyRg=; b=fTV5BTCVsGl0tMrg3m86dy2oSnpCf/MJ0WoefW3SirIaYEIhaKF1A7bZeN+7irvGMu rXoLWfnygTgcpQ67xXGDewFlWffcm1KZsDkoIOX23m41YrzWBTvhwOmZEb4rLe0rwd36 +bxkhLbnGps7WtBk/Vs0fdQa3O1qQwiqZrYWGbapsQuUOjeCi7CdQmNu/dJTX4ao3R8n ZhoX7eSXSpyD01wox0N5KQko4LIlmhgTuxhiOWr3z6tEMLFieGpj4SccjyxoIQPeJ5Sn H+h6FxenvdTw96niZHQ2F2ctTQCT0GC9kzYmo9ydZDsrXGYkgPkaenyMsVu6+SQswpxK gqFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=DCh+HD0w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si12554343pgd.428.2019.02.03.09.56.01; Sun, 03 Feb 2019 09:56:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=DCh+HD0w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727951AbfBCRtX (ORCPT + 99 others); Sun, 3 Feb 2019 12:49:23 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:35057 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfBCRtW (ORCPT ); Sun, 3 Feb 2019 12:49:22 -0500 Received: by mail-oi1-f196.google.com with SMTP id v6so9792316oif.2 for ; Sun, 03 Feb 2019 09:49:22 -0800 (PST) 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=il69hBbw1PefF0iSqsczm2kXao7knzvmA8rvZFbpyRg=; b=DCh+HD0wM/qvLG5B1q2VORLm2I3qFYua6Ju/jpxUXmgWok3FTiRe0X3T6ERo/oKBvY 2iqoEJTg4+ghSwL04R7Sq4dIU2KE8wShRT1K3Ktu7Ug63ir4ya+tKU4PFeFk9iSDRExz ohNlBZJMsVtDX9QT5bo4pMQOq8Gc1FmayeqyALTZjjV/uTyDBnAkEY3YSHrv9GzQHvdC YkTERAI1cYRswA8aVvsIRxwDr5ZdKiW9J+DtINnX+wLHoXp7CZatsC6eEr13MrzJtpmW V9UEzT8wDxzyHT23/0QgKTcM85BKIb1ixC0lR83bvOZa2nJ4U26fU9oR/o1GVP/eCBK0 nfHQ== 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=il69hBbw1PefF0iSqsczm2kXao7knzvmA8rvZFbpyRg=; b=gRFmyZnldv4uL8JU+CQZwgUq3w9R6Hs0Fil+T3B+fxCxA1w7RWDMru6OL4m4kFutq7 1sN5IJTj8q7ETAz8l5dfMvF5vyjtqMx3h6rQlj2H3R33GLw9Ojhw02wrNFTNQgAkVK7g g2TVzUTmJIsYwYePmQohA20bKFOZdtUvl/Gw3wf//XdwCFrPRmLN+M0UBSIFGTJPIT3d pArUDWt1rx2M9lzLpLzaK79Xq9JEtPRPR4TY1UGbb6pafV3VdmRK4uY+ASrdZ6/MsbsT G8H8hd9vIxf5Iwt35XUAFym57/USXtZ9SXMHywZjPen4t6FT8o91+qz8J5VmyD/fRKgC WmyA== X-Gm-Message-State: AHQUAuZgcxKqIenBnbrQFYMk2DBUp+XmDO7yCrrT1VamnR4iS5g3yr3h eVFmNzX/8MpmzWgRPaE2xa2IqMVegIUkWthuih9MVw== X-Received: by 2002:aca:f4c2:: with SMTP id s185mr25168120oih.244.1549216161806; Sun, 03 Feb 2019 09:49:21 -0800 (PST) MIME-Version: 1.0 References: <154915640488.3541628.4947340559510114602.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: From: Dan Williams Date: Sun, 3 Feb 2019 09:49:10 -0800 Message-ID: Subject: Re: [PATCH] libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family To: Dexuan Cui Cc: "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , Michael Kelley Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 3, 2019 at 9:22 AM Dexuan Cui wrote: > > > From: Dan Williams > > Sent: Saturday, February 2, 2019 5:13 PM > > ... > > As Dexuan reports the NVDIMM_FAMILY_HYPERV platform is incompatible with > > the existing Linux namespace implementation because it uses > > NSLABEL_FLAG_LOCAL for x1-width PMEM interleave sets. Quirk it as an > > platform / DIMM that does not provide BLK-aperture access. Allow the > > libnvdimm core to assume no potential for aliasing. In case other > > implementations make the same mistake, provide a "noblk" module > > parameter to force-enable the quirk. > > Hi Dan, > Thanks very much for the patch! With it, "ndctl list" can show the below: > > root@decui-gen2-u1904:~/ndctl# ndctl list > [ > { > "dev":"namespace1.0", > "mode":"raw", > "size":137438953472, > "uuid":"c258aaab-f72b-e546-bfa5-be5e07761dbc", > "blockdev":"pmem1", > "name":"Microsoft Hyper-V NVDIMM 1 Label" > }, > { > "dev":"namespace0.0", > "mode":"raw", > "size":34359738368, > "uuid":"9f0497a7-4453-7c40-ad35-21a791e00345", > "blockdev":"pmem0", > "name":"Microsoft Hyper-V NVDIMM 0 Label" > } > ] > > And /dev/pmem0 can appear, but /dev/pmem0p1 can not appear, and the "mode" of > "namespace0.0" is not correct. With the Ubuntu 19.04 4.18 kenel, I get the below: > > root@decui-gen2-u1904:~/ndctl# ndctl list > [ > { > "dev":"namespace1.0", > "mode":"raw", > "size":137438953472, > "blockdev":"pmem1" > }, > { > "dev":"namespace0.0", > "mode":"fsdax", > "map":"dev", > "size":33820770304, > "uuid":"ef028c4e-2b1f-4bf8-b92a-1109d7a1c914", > "blockdev":"pmem0" > } > ] > and /dev/pmem0p1 can appear. > > It looks the namespace created by Ubuntu 19.04 (4.18) is incompatible with > the libnvdimm-pending branch + this patch. This is correct, the configuration switched from label-less by default to labeled. > It looks we need to completely disable the label usage for NVDIMM_FAMILY_HYPERV > due to compability? It's either going to be a quirk in Linux or a quirk in the Hyper-V configuration. I think it's more manageable for Hyper-V to ship a "label disable" switch than to try to ship a workaround in Linux. The "noblk" quirk in Linux works around the LOCAL bit in the labels. However, the namespace mode regression can only be resolved by hiding the label capability until the administrator manually switches from label-less to labeled operation.