Skip to contentSkip to conversation

Question about NVDIMM configuration

DISCUSSION Dan Williams 1 participant 2 messages Apr 12, 2017 – Apr 13, 2017 2 messages not in the archive libnvdimm: non-volatile memory device

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 35 lines · Yasunori Goto

Hello,

I'm studying NVDIMM specs and current Linux driver implementation now. But I'm really confused about it, and I would like to ask a question here. So, I'm glad if anyone help me.

My current question is ...
"Which is correct scenario of user's operation? a) or b)?"

a) NVDIMM user has to configure all of NVDIMM attributes (regions, namespaces, interleave, and so on) via ndctl command.

b) NVDIMM user has to configure the following things via firmware interface (like BIOS menu) beforehand.
- regions (its size, place of NVDIMM, etc)
- interleaves
Then he/she boots the OS and configures only namespaces via ndctl.

In my uderstanding, NVDIMM driver has to read NFIT tables at boot time, and read many information (like block window apertures, interleave information, and so on). To read NFIT at boot time, its configuration must be set before system boot. So, I feel that b) is natural.

However, ndctl command has the feature that user can change the type of namespace (pmem or blk). In addition, user can set size of namespace.

Then I suppose that NFIT table must be changed
when user changed the above attributes of NVDIMM via ndctl to reconfigure NVDIMM, and NVDIMM drivers has to check _FIT method and read changed NFIT again.
If this is correct, I think that not only namespace, but also all of attributes of NVDIMM should be configured via ndctl. So, a) looks correct.....

Quoted 2 lines

I'm not sure which is correct, and I don't have real NVDIMM server to confirm it. So, please answer my question.

Hi,

The answer is that BIOS and vendor specific commands set the region sizes. Changing the region boundaries requires a reboot because it changes memory controller register settings. Once the regions are specified the NFIT will be static each boot. The ndctl command can then create namespaces out of regions. If the the platform allows aliasing DIMM capacity between the blk and pmem access modes then a namespace configuration can pick how much capacity is accessible between each access mode. Creating and changing namespaces does not require reboots because no memory controller settings are being changed, it only requires writing labels to the DIMMs. Some DIMMs do not support labels, and in that case the size of the namespace is static and identical to the size of the region. In that static / no-label case ndctl can still be used to changed the mode of the namespace. For example it can place the namespace in "sector" mode with the "btt" driver.

Hope this helps.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 46 lines · Yasunori Goto

Dan-san,

Thank you for your comment. It is great helpful.
I would like to ask more questions below...

Quoted 41 lines · Yasunori Goto
Quoted 35 lines

Hello,

I'm studying NVDIMM specs and current Linux driver implementation now. But I'm really confused about it, and I would like to ask a question here. So, I'm glad if anyone help me.

My current question is ...
"Which is correct scenario of user's operation? a) or b)?"

a) NVDIMM user has to configure all of NVDIMM attributes (regions, namespaces, interleave, and so on) via ndctl command.

b) NVDIMM user has to configure the following things via firmware interface (like BIOS menu) beforehand.
- regions (its size, place of NVDIMM, etc)
- interleaves
Then he/she boots the OS and configures only namespaces via ndctl.

In my uderstanding, NVDIMM driver has to read NFIT tables at boot time, and read many information (like block window apertures, interleave information, and so on). To read NFIT at boot time, its configuration must be set before system boot. So, I feel that b) is natural.

However, ndctl command has the feature that user can change the type of namespace (pmem or blk). In addition, user can set size of namespace.

Then I suppose that NFIT table must be changed
when user changed the above attributes of NVDIMM via ndctl to reconfigure NVDIMM, and NVDIMM drivers has to check _FIT method and read changed NFIT again.
If this is correct, I think that not only namespace, but also all of attributes of NVDIMM should be configured via ndctl. So, a) looks correct.....

Quoted 2 lines

I'm not sure which is correct, and I don't have real NVDIMM server to confirm it. So, please answer my question.

Hi,

Quoted 7 lines
Quoted 2 lines

The answer is that BIOS and vendor specific commands set the region sizes.

I would like to confirm what is "vendor specific commands" here. "Intel _DSM Interface Example" defineds "vendor specific commands" to call bios features, right? Do you mean this _DSM's vendor specific commands? Otherwise, do you mean a server vendor's utility command which calls bios via IPMI?

I was speaking in general terms because the ACPI specification does not document a mechanism to change region boundaries.

Quoted 8 lines
Quoted 2 lines

Changing the region boundaries requires a reboot because it changes memory controller register settings.

If user installs a new NVDIMM module to system board and boots the OS "without" set the region boundaries (for example, he forget to set it), what status is shown by NVDIMM driver/ndctl command?
- nothing is shown?, or
- uninitialized nvdimm is displayed?

It depends on the platform vendor whether an NFIT is entry is generated for uninitialized DIMMs. Ideally the platform would show an unconfigured DIMM or force it into a default configuration.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm