From: Dexuan Cui <decui@microsoft.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Kelley <mikelley@microsoft.com>
Subject: RE: [PATCH] libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family
Date: Wed, 6 Feb 2019 00:57:48 +0000 [thread overview]
Message-ID: <PU1P153MB01691648EF8354319EA0244CBF6F0@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAPcyv4h6xBmsO+KrJas2YcsZRayn50UVGp1Sjs3nv4+_6XwGLA@mail.gmail.com>
> From: Dan Williams <dan.j.williams@intel.com>
> Sent: Tuesday, February 5, 2019 9:12 AM
> On Tue, Feb 5, 2019 at 8:53 AM Dexuan Cui <decui@microsoft.com> wrote:
> >
> > > From: Dan Williams <dan.j.williams@intel.com>
> > > Sent: Sunday, February 3, 2019 11:14 AM
> > > > ...
> > > > As I understand, the essence of the issue is: Hyper-V emulates the
> > > > label mechanism (i.e. it supports _LSI and LSR), but doesn't do it
> > > > right (i.e. it doesn't support _LSW).
> > > >
> > > > To manage the namespaces, Linux can choose to use label or not.
> > > >
> > > > If _LSI/_LSR are supported, Linux assumes _LSW is supported as well
> > > > and chooses to use label (i.e. the label mode), but since Hyper-V doesn't
> > > > support _LSW, Linux fails to change the namespace configuration.
> > >
> > > No, that's not quite right. The reason Linux does not see the fsdax
> > > mode configuration is due to the missing "address abstraction GUID" in
> > > the label produced the default Hyper-V configuration.
> > Hi Dan,
> > Do you mean NVDIMM_DAX_GUID?
>
> Correct.
FYI: in create_namespace_pmem(), label0->abstraction_guid is guid_null in
the case of Hyper-V NVDIMM. It looks Hyper-V does't use the guid.
> > > In label-less mode there is no "address abstraction GUID" to validate so
> > > it falls back to just using the info-block directly.
> > In the case of not using label storage area, as I understand the info-block
> > resides in regular data storage area. Can you please tell me where exactly
> > the info-block is and how its location is decided?
> > And I suppose the info-block contains the NVDIMM_DAX_GUID?
>
> The info-block always lives in the data-storage area, even with
> labels. It's placed at namespace base address + 4K.
>
> When labels are present the label gives the namespace a uuid and the
> info-block "parent uuid" field must match that value. Without labels
> the "parent uuid" field is unused / filled with zero's. Also with v1.2
> labels the address abstraction uuid must match the info-block type.
Thanks for elaborating on this!
It looks the label mechanism is for advanced usages, e.g., a PMEM namespace
can consist of multiple NVDIMMs, or a namespace only uses part of the
capacity of a NVDIMM, or a NVDIMM contains both PMEM and Block-Mode
namespaces.
For a simple usage, e.g. if a NVDIMM only contains one PMEM namespace which
consumes all the storage space of the NVDIMM, it looks the namespace can
be normally used with the help of the info-block, and we don't really need
the label. IMO this is the case of Hyper-V, i.e. we don't use the label at all,
since _LSW is not implemented.
> > I'm asking because I found I lose ~500MBytes of the 32GBytes Hyper-V
> > NVDIMM device, when the namespace is in fsdax mode. When it's in
> > raw mode, I'm able to use all of the 32GB space.
>
> Yes. A portion of the capacity is reserved for page structures.
Got it. It looks the size of the info-block (and the related padding?) is 2MB,
and "the overhead is 64-bytes per 4K (16GB per 1TB) on x86", so the total
overhead in my 32GB case is: 2MB + 32GB/(4096/64) = 514MB.
Thanks for sharing the link! Now I realized we can use the -M parameter
to not store the page metadata in the NVDIMM:
-M; --map=
A pmem namespace in “fsdax” or “devdax” mode requires allocation of
per-page metadata. The allocation can be drawn from either:
“mem”: typical system memory
“dev”: persistent memory reserved from the namespace
Thanks,
--Dexuan
next prev parent reply other threads:[~2019-02-06 0:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-29 0:56 [PATCH v2] nfit: add Hyper-V NVDIMM DSM command set to white list Dexuan Cui
2019-01-30 6:23 ` Dan Williams
2019-02-01 17:14 ` Dexuan Cui
2019-02-01 17:29 ` Dan Williams
2019-02-01 23:17 ` Dexuan Cui
2019-02-01 23:47 ` Dan Williams
2019-02-02 0:34 ` Dexuan Cui
2019-02-02 0:47 ` Dan Williams
2019-02-02 1:06 ` Dexuan Cui
2019-02-02 1:28 ` Dan Williams
2019-02-02 2:17 ` Dexuan Cui
2019-02-02 5:27 ` Dan Williams
2019-02-02 3:32 ` Dexuan Cui
2019-02-02 5:26 ` Dan Williams
2019-02-03 1:13 ` [PATCH] libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family Dan Williams
2019-02-03 14:31 ` kbuild test robot
2019-02-03 17:39 ` Dexuan Cui
2019-02-03 14:38 ` kbuild test robot
2019-02-03 17:40 ` Dexuan Cui
2019-02-03 17:21 ` Dexuan Cui
2019-02-03 17:49 ` Dan Williams
2019-02-03 18:13 ` Dexuan Cui
2019-02-03 19:13 ` Dan Williams
2019-02-03 19:28 ` [PATCH] acpi/nfit: Require opt-in for read-only label configurations Dan Williams
2019-02-04 5:45 ` Dexuan Cui
2019-02-05 16:53 ` [PATCH] libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family Dexuan Cui
2019-02-05 17:11 ` Dan Williams
2019-02-06 0:57 ` Dexuan Cui [this message]
2019-02-13 4:14 ` [PATCH v2] " Dan Williams
2019-02-13 9:41 ` Johannes Thumshirn
Reply instructions:
You may reply publicly 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PU1P153MB01691648EF8354319EA0244CBF6F0@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM \
--to=decui@microsoft.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mikelley@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®