ndctl: Add pcdctl tool with pcdctl list and reconfigure-region commands
Subsystems (3)
cover ndctl: Add pcdctl tool with pcdctl list and reconfigure-region commands
From: James Sushanth Anandraj <[email protected]>
The Intel Optane Persistent Memory OS provisioning specification describes how to support basic provisioning for Intel Optane persistent memory 100 and 200 series for use in different operating modes using OS software.
This patch set introduces a new utility pcdctl that implements basic provisioning as described in the provisioning specification document at https://cdrdv2.intel.com/v1/dl/getContent/634430 .
The pcdctl utility provides enumeration and region reconfiguration commands for "nvdimm" subsystem devices (Non-volatile Memory). This is implemented as a separate tool rather than as a feature of ndctl as the steps for provisioning are specific to Intel Optane devices and are as follows.
1..Generate a new region configuration request using this utility.
2. Reset the platform.
3. Use this utility to list the status of operation.
James Sushanth Anandraj (4):
Documentation/pcdctl: Add documentation for pcdctl tool and commands pcdctl/list: Add pcdctl-list command to enumerate 'nvdimm' devices pcdctl/reconfigure: Add pcdctl-reconfigure-region command pcdctl/reconfigure: Add support for pmem and iso-pmem modes
Documentation/pcdctl/Makefile.am | 59 + .../pcdctl/asciidoctor-extensions.rb | 30 + Documentation/pcdctl/pcdctl-list.txt | 56 + .../pcdctl/pcdctl-reconfigure-region.txt | 50 + Documentation/pcdctl/pcdctl.txt | 40 + Documentation/pcdctl/theory-of-operation.txt | 28 + Makefile.am | 4 +- configure.ac | 2 + pcdctl/Makefile.am | 18 + pcdctl/builtin.h | 9 + pcdctl/list.c | 114 ++ pcdctl/list.h | 11 + pcdctl/pcat.c | 59 + pcdctl/pcat.h | 13 + pcdctl/pcd.h | 381 +++++ pcdctl/pcdctl.c | 88 + pcdctl/reconfigure.c | 1458 +++++++++++++++++ pcdctl/reconfigure.h | 12 + util/main.h | 1 + 19 files changed, 2431 insertions(+), 2 deletions(-) create mode 100644 Documentation/pcdctl/Makefile.am create mode 100644 Documentation/pcdctl/asciidoctor-extensions.rb create mode 100644 Documentation/pcdctl/pcdctl-list.txt create mode 100644 Documentation/pcdctl/pcdctl-reconfigure-region.txt create mode 100644 Documentation/pcdctl/pcdctl.txt create mode 100644 Documentation/pcdctl/theory-of-operation.txt create mode 100644 pcdctl/Makefile.am create mode 100644 pcdctl/builtin.h create mode 100644 pcdctl/list.c create mode 100644 pcdctl/list.h create mode 100644 pcdctl/pcat.c create mode 100644 pcdctl/pcat.h create mode 100644 pcdctl/pcd.h create mode 100644 pcdctl/pcdctl.c create mode 100644 pcdctl/reconfigure.c create mode 100644 pcdctl/reconfigure.h
Signature · 1 line
2.20.1
PATCH 1/4 Documentation/pcdctl: Add documentation for pcdctl tool and commands
From: James Sushanth Anandraj <[email protected]>
Add man page files for pcdctl tool, pcdctl-list and pcdctl-reconfigure-region commands.Pcdctl is a tool to help region reconfiguration for 'nvdimm' devices.
It modifies a portion of the pcd region on 'nvdimm' devices to reconfigure regions. The module Platform Configuration Data (PCD) refers to a section of the PMem module that is used to store metadata. The metadata stored in the PCD is the architected interface between software and platform firmware to support PMem provisioning
--- Documentation/pcdctl/Makefile.am | 59 +++++++++++++++++++ .../pcdctl/asciidoctor-extensions.rb | 30 ++++++++++ Documentation/pcdctl/pcdctl-list.txt | 56 ++++++++++++++++++ .../pcdctl/pcdctl-reconfigure-region.txt | 50 ++++++++++++++++ Documentation/pcdctl/pcdctl.txt | 40 +++++++++++++ Documentation/pcdctl/theory-of-operation.txt | 28 +++++++++ Makefile.am | 2 +- configure.ac | 1 + 8 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 Documentation/pcdctl/Makefile.am create mode 100644 Documentation/pcdctl/asciidoctor-extensions.rb create mode 100644 Documentation/pcdctl/pcdctl-list.txt create mode 100644 Documentation/pcdctl/pcdctl-reconfigure-region.txt create mode 100644 Documentation/pcdctl/pcdctl.txt create mode 100644 Documentation/pcdctl/theory-of-operation.txt
Documentation/pcdctl/Makefile.am new file +59 -0
@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2015-2020 Intel Corporation. All rights reserved. + +if USE_ASCIIDOCTOR + +do_subst = sed -e 's,@Utility@,Pcdctl,g' -e's,@utility@,pcdctl,g' +CONFFILE = asciidoctor-extensions.rb +asciidoctor-extensions.rb: ../asciidoctor-extensions.rb.in + $(AM_V_GEN) $(do_subst) < $< > $@ + +else + +do_subst = sed -e 's,UTILITY,pcdctl,g' +CONFFILE = asciidoc.conf +asciidoc.conf: ../asciidoc.conf.in + $(AM_V_GEN) $(do_subst) < $< > $@ + +endif + +man1_MANS = \ + pcdctl.1 \ + pcdctl-list.1 \ + pcdctl-reconfigure-region.1 + +EXTRA_DIST = $(man1_MANS) + +CLEANFILES = $(man1_MANS) + +XML_DEPS = \ + ../../version.m4 \ + ../copyright.txt \ + Makefile \ + $(CONFFILE) + +RM ?= rm -f + +if USE_ASCIIDOCTOR + +%.1: %.txt $(XML_DEPS) + $(AM_V_GEN)$(RM) $@+ $@ && \ + $(ASCIIDOC) -b manpage -d manpage -acompat-mode \ + -I. -rasciidoctor-extensions \ + -amansource=pcdctl -amanmanual="pcdctl Manual" \ + -andctl_version=$(VERSION) -o $@+ $< && \ + mv $@+ $@ + +else + +%.xml: %.txt $(XML_DEPS) + $(AM_V_GEN)$(RM) $@+ $@ && \ + $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \ + --unsafe -apcdctl_version=$(VERSION) -o $@+ $< && \ + mv $@+ $@ + +%.1: %.xml $(XML_DEPS) + $(AM_V_GEN)$(RM) $@ && \ + $(XMLTO) -o . -m ../manpage-normal.xsl man $< + +endif
Documentation/pcdctl/asciidoctor-extensions.rb new file +30 -0
@@ -0,0 +1,30 @@ +require 'asciidoctor' +require 'asciidoctor/extensions' + +module Pcdctl + module Documentation + class LinkPcdctlProcessor < Asciidoctor::Extensions::InlineMacroProcessor + use_dsl + + named :chrome + + def process(parent, target, attrs) + if parent.document.basebackend? 'html' + prefix = parent.document.attr('pcdctl-relative-html-prefix') + %(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>\n) + elsif parent.document.basebackend? 'manpage' + "#{target}(#{attrs[1]})" + elsif parent.document.basebackend? 'docbook' + "<citerefentry>\n" \ + "<refentrytitle>#{target}</refentrytitle>" \ + "<manvolnum>#{attrs[1]}</manvolnum>\n" \ + "</citerefentry>\n" + end + end + end + end +end + +Asciidoctor::Extensions.register do + inline_macro Pcdctl::Documentation::LinkPcdctlProcessor, :linkpcdctl +end
Documentation/pcdctl/pcdctl-list.txt new file +56 -0
56 lines not on this page · raw message
Documentation/pcdctl/pcdctl-reconfigure-region.txt new file +50 -0
50 lines not on this page · raw message
Documentation/pcdctl/pcdctl.txt new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0 + +pcdctl(1) +========= + +NAME +---- +pcdctl - Provides enumeration and region reconfiguraion commands for "nvdimm" +subsystem devices (Non-volatile Memory) + +include::theory-of-operation.txt[] + +SYNOPSIS +-------- +[verse] +'pcdctl' [--version] [--help] COMMAND [ARGS] + +OPTIONS +------- +-v:: +--version:: + Display pcdctl version. + +-h:: +--help:: + Run pcdctl help command. + +DESCRIPTION +----------- +The pcdctl utility provides enumeration and region reconfiguration commands for +"nvdimm" subsystem devices (Non-volatile Memory). Operations +supported by the tool include region reconfiguration and enumeration of the +devices and their region reconfiguration status. + +include::../copyright.txt[] + +SEE ALSO +-------- +linkpcdctl:pcdctl-list[1], +linkpcdctl:pcdctl-reconfigure-region[1]
Documentation/pcdctl/theory-of-operation.txt new file +28 -0
@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 + +THEORY OF OPERATION +------------------- +A region is persistent memory from one or more non-volatile memory devices that +is mapped into the system physical address (SPA) space. For some device vendors, +reconfiguring regions is a multi-step process as follows. +1. Generate a new region configuration request using this command. +2. Reset the platform. +3. Platform firmware (BIOS) processes the region configuration request and +presents the new region configuration via ACPI NFIT tables. The status of this +BIOS operation can be retrieved using the pcdctl-list command. + +Region types are as follows: +1. Interleaved Persistent Memory Region (iso-pmem) +This is a persistent memory region that utilizes hardware interleaving across +non-volatile memory devices. +2. Non-Interleaved Persistent Memory Region (pmem) +This is a persistent memory region that does not utilize hardware interleaving +across non-volatile memory devices. +3. Volatile Memory Region (ram) +The portion of persistent memory in the system that is used in a volatile +memory region is treated as volatile 'system-ram' to expand the overall system +memory. This type of region is entirely managed by platform firmware (BIOS) and +is no longer visible in 'ndctl' nor is it usable by applications as persistent +storage. Additionally, in this mode, some portion of DRAM in the system is +'consumed' by the platform firmware to act as a cache that fronts the +persistent memory.
Makefile.am +1 -1
@@ -3,7 +3,7 @@ include Makefile.am.in ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} SUBDIRS = . daxctl/lib ndctl/lib ndctl daxctl if ENABLE_DOCS -SUBDIRS += Documentation/ndctl Documentation/daxctl +SUBDIRS += Documentation/ndctl Documentation/daxctl Documentation/pcdctl endif SUBDIRS += test
configure.ac +1 -0
@@ -228,6 +228,7 @@ AC_CONFIG_FILES([ test/Makefile Documentation/ndctl/Makefile Documentation/daxctl/Makefile + Documentation/pcdctl/Makefile ]) AC_OUTPUT
Signature · 1 line
2.20.1
Re: [PATCH v1 1/4] Documentation/pcdctl: Add documentation for pcdctl tool and commands
On Thu, Jul 8, 2021 at 11:38 AM James Anandraj
<[email protected]> wrote:
[..]
Quoted 16 lines
Documentation/pcdctl/theory-of-operation.txt new file +10
-0@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 + +THEORY OF OPERATION +------------------- +A region is persistent memory from one or more non-volatile memory devices that +is mapped into the system physical address (SPA) space. For some device vendors, +reconfiguring regions is a multi-step process as follows. +1. Generate a new region configuration request using this command. +2. Reset the platform. +3. Platform firmware (BIOS) processes the region configuration request and
Documentation/pcdctl/theory-of-operation.txt line 20
Quoted 10 lines
Documentation/pcdctl/theory-of-operation.txt new file +10
-0+presents the new region configuration via ACPI NFIT tables. The status of this +BIOS operation can be retrieved using the pcdctl-list command. + +Region types are as follows: +1. Interleaved Persistent Memory Region (iso-pmem) +This is a persistent memory region that utilizes hardware interleaving across +non-volatile memory devices. +2. Non-Interleaved Persistent Memory Region (pmem) +This is a persistent memory region that does not utilize hardware interleaving +across non-volatile memory devices.
"iso-pmem" and "pmem" are not immediately obvious names for interleaved and non-interleaved pmem. Even "interleave" is not a great term unless the user is familiar with the operation of the memory controller. How about "performance-pmem" and "fault-isolation-pmem" as that is the question that is being asked of the user? I.e. do you want to configure pmem to maximize bandwidth, or do you want to configure pmem to maximize the isolation and resiliency to faults in individual modules.
PATCH 2/4 pcdctl/list: Add pcdctl-list command to enumerate 'nvdimm' devices
In reply to James AnandrajFrom: James Sushanth Anandraj <[email protected]>
Add pcdctl-list command to enumerate 'nvdimm' devices. The command reads pcd data from the 'nvdimm' devices to display information related to region reconfiguration such as, Is there a pending reconfiguration request and the status of last request.
--- Makefile.am | 2 +- configure.ac | 1 + pcdctl/Makefile.am | 17 ++ pcdctl/builtin.h | 8 + pcdctl/list.c | 114 +++++++++++++ pcdctl/list.h | 11 ++ pcdctl/pcd.h | 160 ++++++++++++++++++ pcdctl/pcdctl.c | 87 ++++++++++ pcdctl/reconfigure.c | 379 +++++++++++++++++++++++++++++++++++++++++++ pcdctl/reconfigure.h | 12 ++ util/main.h | 1 + 11 files changed, 791 insertions(+), 1 deletion(-) create mode 100644 pcdctl/Makefile.am create mode 100644 pcdctl/builtin.h create mode 100644 pcdctl/list.c create mode 100644 pcdctl/list.h create mode 100644 pcdctl/pcd.h create mode 100644 pcdctl/pcdctl.c create mode 100644 pcdctl/reconfigure.c create mode 100644 pcdctl/reconfigure.h
Makefile.am +1 -1
@@ -1,7 +1,7 @@ include Makefile.am.in ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = . daxctl/lib ndctl/lib ndctl daxctl +SUBDIRS = . daxctl/lib ndctl/lib ndctl daxctl pcdctl if ENABLE_DOCS SUBDIRS += Documentation/ndctl Documentation/daxctl Documentation/pcdctl endif
configure.ac +1 -0
@@ -225,6 +225,7 @@ AC_CONFIG_FILES([ ndctl/lib/Makefile ndctl/Makefile daxctl/Makefile + pcdctl/Makefile test/Makefile Documentation/ndctl/Makefile Documentation/daxctl/Makefile
pcdctl/Makefile.am new file +17 -0
@@ -0,0 +1,17 @@ +include $(top_srcdir)/Makefile.am.in + +bin_PROGRAMS = pcdctl + +pcdctl_SOURCES =\ + pcdctl.c \ + list.c \ + reconfigure.c \ + ../util/json.c \ + builtin.h + +pcdctl_LDADD =\ + ../ndctl/lib/libndctl.la \ + ../libutil.a \ + $(UUID_LIBS) \ + $(KMOD_LIBS) \ + $(JSON_LIBS)
pcdctl/builtin.h new file +8 -0
@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2015-2021 Intel Corporation. All rights reserved. */ +#ifndef _PCDCTL_BUILTIN_H_ +#define _PCDCTL_BUILTIN_H_ + +struct ndctl_ctx ; +int cmd_list (int argc,const char **argv,struct ndctl_ctx *ctx); +#endif /* _PCDCTL_BUILTIN_H_ */
pcdctl/list.c new file +114 -0
114 lines not on this page · raw message
pcdctl/list.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0*/ +/* Copyright(c) 2021 Intel Corporation. All rights reserved.*/ + +#ifndef _LIST_H_ +#define _LIST_H_ + +#include <ndctl/lib/private.h> +#include <ndctl/libndctl.h> +#include <util/json.h> +struct json_object *pcdctl_list_dimm_to_json (struct ndctl_dimm *dimm); +#endif /* _LIST_H_ */
pcdctl/pcd.h new file +160 -0
160 lines not on this page · raw message
pcdctl/pcdctl.c new file +87 -0
87 lines not on this page · raw message
pcdctl/reconfigure.c new file +379 -0
379 lines not on this page · raw message
pcdctl/reconfigure.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0*/ +/* Copyright(c) 2021 Intel Corporation. All rights reserved.*/ + +#ifndef _RECONFIGURE_H_ +#define _RECONFIGURE_H_ + +#include <ndctl/lib/private.h> +#include <ndctl/libndctl.h> +bool pcdctl_dimm_reconfigure_region_pending (struct ndctl_dimm *dimm); +const char *pcdctl_dimm_reconfigure_status_string (struct ndctl_dimm *dimm); +int pcdctl_dimm_reconfigure_status (struct ndctl_dimm *dimm); +#endif /* _RECONFIGURE_H_ */
util/main.h +1 -0
@@ -10,6 +10,7 @@enum program {PROG_NDCTL ,PROG_DAXCTL , +PROG_PCDCTL };struct ndctl_ctx ;
Signature · 1 line
2.20.1
PATCH 3/4 pcdctl/reconfigure: Add pcdctl-reconfigure-region command
In reply to James AnandrajFrom: James Sushanth Anandraj <[email protected]>
Add pcdctl-reconfigure-region command and helper functions. The command reads pcd data from the 'nvdimm' devices and writes a new pcd reflecting the region reconfiguration request. In this patch functions to reconfigure region into volatile regions(ram) are implemented.
--- pcdctl/Makefile.am | 1 + pcdctl/builtin.h | 1 + pcdctl/pcat.c | 59 +++++++ pcdctl/pcat.h | 13 ++ pcdctl/pcd.h | 58 +++++++ pcdctl/pcdctl.c | 1 + pcdctl/reconfigure.c | 390 ++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 515 insertions(+), 8 deletions(-) create mode 100644 pcdctl/pcat.c create mode 100644 pcdctl/pcat.h
pcdctl/Makefile.am +1 -0
@@ -6,6 +6,7 @@ pcdctl_SOURCES =\ pcdctl.c \ list.c \ reconfigure.c \ + pcat.c \ ../util/json.c \ builtin.h
pcdctl/builtin.h +1 -0
@@ -5,4 +5,5 @@struct ndctl_ctx ;int cmd_list (int argc,const char **argv,struct ndctl_ctx *ctx); +int cmd_reconfigure_region (int argc,const char **argv,struct ndctl_ctx *ctx);#endif /* _PCDCTL_BUILTIN_H_ */
pcdctl/pcat.c new file +59 -0
59 lines not on this page · raw message
pcdctl/pcat.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0*/ +/* Copyright(c) 2021 Intel Corporation. All rights reserved.*/ + +#ifndef _PCAT_H_ +#define _PCAT_H_ +#include <stdint.h> +#include <ccan/short_types/short_types.h> +#define PCAT_REV_0_2 ((u8)0x02) +#define PCAT_REV_1_2 ((u8)0x12) + +int validate_pcat_rev (void ); +u8 get_pcat_rev (void ); +#endif /* _LIST_H_ */
pcdctl/pcd.h +58 -0
86 lines not on this page · raw message
pcdctl/pcdctl.c +1 -0
@@ -51,6 +51,7 @@ static int cmd_help(int argc, const char **argv, struct ndctl_ctx *ctx)static struct cmd_struct commands[] = { {"version" , { cmd_version } }, {"list" , { cmd_list } }, + {"reconfigure-region" , { cmd_reconfigure_region } }, {"help" , { cmd_help } }, };
pcdctl/reconfigure.c +382 -8
437 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 4/4 pcdctl/reconfigure: Add support for pmem and iso-pmem modes
In reply to James AnandrajFrom: James Sushanth Anandraj <[email protected]>
Implement pcdctl-reconfigure-region pmem and iso-pmem support. This patch adds helper functions to support processing of pmem and iso-pmem reconfigure-region requests. The pmem reconfigure-region request results in regions that
does not utilize hardware interleaving across non-volatile memory devices. The iso-pmem request results in regions that utilize hardware interleaving. The command reads
pcd data from the 'nvdimm' devices and writes a new pcd reflecting the new region reconfiguration request.
--- pcdctl/pcd.h | 163 ++++++++++ pcdctl/reconfigure.c | 709 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 870 insertions(+), 2 deletions(-)
pcdctl/pcd.h +163 -0
@@ -26,6 +26,11 @@* │ +---------------------+ +---------------+ * +------------->│Configuration Output +--->│Extension table│ * +---------------------+ +---------------+ +* +* The extension table for Configuration Input is determined by the region +* reconfiguration request. See section 5 in provisioning document for examples +* for each request type. +* * Glossary * -------- * PCD - Platform Configuration Data
@@ -34,6 +39,11 @@* CIN - Configuration Input * COUT - Configuration Output * PSCT - Partition Size Change Table +* IIT - Interleave Information Table +* MIIIS - Module Identification Information for Interleave Set +* MUI - Module Unique Identifier +* ML - Module location +* MPIO - Module partition information output */ /** * struct pcd_config_header - configuration header
@@ -130,6 +140,136 @@ struct pcd_psct {u32 status;u64 size; } __attribute__((packed)); +/** +* struct pcd_mui - module unique identifier +* @id: subsystem vendor id +* @location: manufacturing location +* @date: manufacturing date +* @serial: serial number +* The module unique identifier is a field in module identification information +* for interleave set. The field and its sub-fields are described in section +* 3.8.1.1 Table 311 in the provisioning specification document. +*/ +struct pcd_mui { +u16 id; +u8 location; +u16 date; +u32 serial; +} __attribute__((packed)); +/** +* struct pcd_ml - module location +* @socket_id: module socket id +* @die_id: module die id +* @mem_controller_id: module memory controller id +* @channel_id: memory channel number +* @slot_id: dimm number +* @r: reserved +* The module location is a field in module identification information for +* interleave set. The field and its sub-fields are described in section +* 3.8.1.1 Table 311 in the provisioning specification document. +*/ +struct pcd_ml { +u8 socket_id; +u8 die_id; +u8 mem_controller_id; +u8 channel_id; +u8 slot_id; +u8 r[3 ]; +} __attribute__((packed)); +/** +* struct pcd_miiis - module identification information for interleave set +* @mui: module unique identifier +* @ml: module location only used in pcat v1.2 +* @r: reserved +* @offset: partition offset +* @size: partition size +* The module identification information for interleave set is used for +* identifying the modules that are present in the interleave set. +* The structure and fields of table are described in section 3.8.1.1 Table 310 +* and Table 311 in the provisioning specification document. +*/ +struct pcd_miiis { +struct pcd_mui mui; +struct pcd_ml ml; +u8 r[15 ]; +u64 offset; +u64 size; +} __attribute__((packed)); +/** +* struct pcd_iit - interleave information table (type 5) +* @type: table type +* @length: length in bytes for the entire table +* @index: interleave set index +* @modules: number of modules in interleave set +* @itype: interleave memory type +* @isize: interleave size +* @iways: interleave ways - this field is ignore for pcat v1.2 +* @r1: reserved +* @status: interleave change status +* @r2: reserved +* The interleave information table describes a interleave set. The structure +* and fields of the table are described in section 3.8 Table 38 and 39 in the +* provisioning specification document +*/ +struct pcd_iit { +u16 type; +u16 length; +u16 index; +u8 modules; +u8 itype; +u16 isize; +u16 iways; +u8 r1; +u8 status; +u8 r2[10 ]; +} __attribute__((packed)); +/** +* struct nfit_handle - nfit handle +* @dimm: dimm number +* @mem_chnl: memory channel number +* @mem_ctrlr: memory controller id +* @socket_id: socket id +* @node: node id +* @r: reserved +* @value: unsigned value +* This structure is used to unpack the subfields of the dimm handle. +*/ +struct nfit_handle { +union { +struct { +u8 dimm :4 ; +u8 mem_chnl :4 ; +u8 mem_ctrlr :4 ; +u8 socket_id :4 ; +u16 node :12 ; +u8 r :4 ; + } __attribute__((packed)); +u32 value; + }; +} __attribute__((packed)); +/** +* struct pcd_mpio - module partition information output payload +* @volatile_capacity: volatile capacity +* @r1: reserved +* @volatile_start: volatile start location +* @persistent_capacity: persistent capacity +* @r2: reserved +* @persistent_start: persistent start location +* @raw_capacity: raw capacity +* The structure represents the output parameters of get module partition +* information vendor specific command. The structure and its fields are +* described in section 4.3 and Table 48 in the provisioning specification +* document. +*/ +struct pcd_mpio { +u32 volatile_capacity; +u8 r1[4 ]; +u64 volatile_start; +u32 persistent_capacity; +u8 r2[4 ]; +u64 persistent_start; +u32 raw_capacity; +} __attribute__((packed));/** * struct pcd_get_pcd_input - get pcd input * @partition_id: partition id
@@ -203,6 +343,12 @@ static const char *const pcd_status_str[] = {* in section 4.2 Table 45 of provisioning document. */ #define PCD_OPCODE_SET_PCD ((u16)0x0701) +/** +* The opcode value for get module partition information vendor specific +* command. The value is mentioned in section 4.3 Table 447 of provisioning +* document. +*/ +#define PCD_OPCODE_GET_MPI ((u16)0x0602)/** * Defines for PCD revision values */
@@ -215,4 +361,21 @@ static const char *const pcd_status_str[] = {* mentioned in Table 37 of provisioning document. */ #define PSCT_TYPE ((u16)0x4) +/** +* Define for header type value for Interleave Information Table. The value is +* mentioned in Table 38 of provisioning document. +*/ +#define IIT_TYPE ((u16)0x5) +/** +* Define for interleave memory type field app direct mode value in Interleave +* information table. The value is mentioned in Table 38 of provisioning +* document. +*/ +#define APP_DIRECT_MODE ((u8)0x2) +/** +* Define for interleave size field value in Interleave information table. +* The value is mentioned in Table 38 of provisioning document. +*/ +#define INTERLEAVE_SIZE ((u16)0x4040) +#endif /* _PCD_H_ */
pcdctl/reconfigure.c +707 -2
753 lines not on this page · raw message
Signature · 1 line
2.20.1
[ add Jeff, Michal, and Adam ]
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. Recall that the ACPI NFIT communicates the static region configuration to the OS, but changing that configuration is a device-specific protocol plus a reboot. Until the arrival of pcdctl, region provisioning required ipmctl.
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. In general, the ndctl project is open to carrying support for persistent memory devices with open specifications. In this case the provisioning specification for devices formerly driven by ipmctl was opened up and provided here:
https://cdrdv2.intel.com/v1/dl/getContent/634430
Please comment on its suitability for shipping in distros alongside the ndctl tool.
Quoted 68 lines · James Anandraj
From: James Sushanth Anandraj <[email protected]>
The Intel Optane Persistent Memory OS provisioning specification describes how to support basic provisioning for Intel Optane persistent memory 100 and 200 series for use in different operating modes using OS software.
This patch set introduces a new utility pcdctl that implements basic provisioning as described in the provisioning specification document at https://cdrdv2.intel.com/v1/dl/getContent/634430 .
The pcdctl utility provides enumeration and region reconfiguration commands for "nvdimm" subsystem devices (Non-volatile Memory). This is implemented as a separate tool rather than as a feature of ndctl as the steps for provisioning are specific to Intel Optane devices and are as follows.
1..Generate a new region configuration request using this utility.
2. Reset the platform.
3. Use this utility to list the status of operation.James Sushanth Anandraj (4):
Documentation/pcdctl: Add documentation for pcdctl tool and commands pcdctl/list: Add pcdctl-list command to enumerate 'nvdimm' devices pcdctl/reconfigure: Add pcdctl-reconfigure-region command pcdctl/reconfigure: Add support for pmem and iso-pmem modesDocumentation/pcdctl/Makefile.am | 59 + .../pcdctl/asciidoctor-extensions.rb | 30 + Documentation/pcdctl/pcdctl-list.txt | 56 + .../pcdctl/pcdctl-reconfigure-region.txt | 50 + Documentation/pcdctl/pcdctl.txt | 40 + Documentation/pcdctl/theory-of-operation.txt | 28 + Makefile.am | 4 +- configure.ac | 2 + pcdctl/Makefile.am | 18 + pcdctl/builtin.h | 9 + pcdctl/list.c | 114 ++ pcdctl/list.h | 11 + pcdctl/pcat.c | 59 + pcdctl/pcat.h | 13 + pcdctl/pcd.h | 381 +++++ pcdctl/pcdctl.c | 88 + pcdctl/reconfigure.c | 1458 +++++++++++++++++ pcdctl/reconfigure.h | 12 + util/main.h | 1 + 19 files changed, 2431 insertions(+), 2 deletions(-) create mode 100644 Documentation/pcdctl/Makefile.am create mode 100644 Documentation/pcdctl/asciidoctor-extensions.rb create mode 100644 Documentation/pcdctl/pcdctl-list.txt create mode 100644 Documentation/pcdctl/pcdctl-reconfigure-region.txt create mode 100644 Documentation/pcdctl/pcdctl.txt create mode 100644 Documentation/pcdctl/theory-of-operation.txt create mode 100644 pcdctl/Makefile.am create mode 100644 pcdctl/builtin.h create mode 100644 pcdctl/list.c create mode 100644 pcdctl/list.h create mode 100644 pcdctl/pcat.c create mode 100644 pcdctl/pcat.h create mode 100644 pcdctl/pcd.h create mode 100644 pcdctl/pcdctl.c create mode 100644 pcdctl/reconfigure.c create mode 100644 pcdctl/reconfigure.h--
2.20.1
Quoted 10 lines · Dan Williams
[ add Jeff, Michal, and Adam ]
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. [...]
Quoted 6 lines
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. [...]
Please comment on its suitability for shipping in distros alongside the ndctl tool.
I see no issues with that.
You might want to suggest whether you prefer pcdctl and clx-cli to be shipped in a separate binary package.
Meow!
Signature · 4 lines
⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ If you ponder doing what Jesus did, remember than flipping tables ⢿⡄⠘⠷⠚⠋⠀ and chasing people with a whip is a prime choice. ⠈⠳⣄⠀⠀⠀⠀
Quoted 16 lines · Adam Borowski
Quoted 13 lines · Dan Williams
[ add Jeff, Michal, and Adam ]
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. [...]
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. [...]
Quoted 7 lines
Quoted 2 lines
Please comment on its suitability for shipping in distros alongside the ndctl tool.
I see no issues with that.
You might want to suggest whether you prefer pcdctl and clx-cli to be shipped in a separate binary package.
Yes, that was my expectation that ndctl, daxctl, pcdctl (ipmregion?), and the 'cxl' tool would each be independent binary packages.
Quoted 20 lines · Dan Williams
Quoted 19 lines · Adam Borowski
Quoted 16 lines · Dan Williams
[ add Jeff, Michal, and Adam ]
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. [...]
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. [...]
Please comment on its suitability for shipping in distros alongside the ndctl tool.
Quoted 7 lines
Quoted 4 lines
I see no issues with that.
You might want to suggest whether you prefer pcdctl and clx-cli to be shipped in a separate binary package.
Yes, that was my expectation that ndctl, daxctl, pcdctl (ipmregion?), and the 'cxl' tool would each be independent binary packages.
Agreed. We would only build and ship a particular tool on the platforms that supported it.
Cheers,
Jeff
Quoted 1 line · Dan Williams
[ add Jeff, Michal, and Adam ]
[ adding Bryan Gurney, who is helping out with RHEL packaging ]
Quoted 10 lines
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. Recall that the ACPI NFIT communicates the static region configuration to the OS, but changing that configuration is a device-specific protocol plus a reboot. Until the arrival of pcdctl, region provisioning required ipmctl.
It's great to see progress on this, thanks! Shipping another utility as part of the ndctl package is fine with me, though I'm not sure why we wouldn't just make this an ndctl sub-command. From a user's perspective, these are all operations on or about nvdimms. ipmctl didn't have separate utilities for provisioning goals and namespace configuration, for example.
Quoted 6 lines
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. In general, the ndctl project is open to carrying support for persistent memory devices with open specifications. In this case the provisioning specification for devices formerly driven by ipmctl was opened up and provided here:
Is there a meaningful difference to the user? Can you show some examples of how configuration would be different between cxl-attached pmem and memory-bus attached pmem?
Quoted 4 lines
https://cdrdv2.intel.com/v1/dl/getContent/634430
Please comment on its suitability for shipping in distros alongside the ndctl tool.
It's completely fine to ship more tools with ndctl. I would like a better overall picture of configuration from the admin's perspective. At first glance, I think we're adding unneeded complexity.
Cheers,
Jeff
p.s. I don't find the name 'pdctl' particularly endearing. If we do stick with a separate utility, I'd suggest coming up with a more descriptive name.
Quoted 71 lines
Quoted 68 lines · James Anandraj
From: James Sushanth Anandraj <[email protected]>
The Intel Optane Persistent Memory OS provisioning specification describes how to support basic provisioning for Intel Optane persistent memory 100 and 200 series for use in different operating modes using OS software.
This patch set introduces a new utility pcdctl that implements basic provisioning as described in the provisioning specification document at https://cdrdv2.intel.com/v1/dl/getContent/634430 .
The pcdctl utility provides enumeration and region reconfiguration commands for "nvdimm" subsystem devices (Non-volatile Memory). This is implemented as a separate tool rather than as a feature of ndctl as the steps for provisioning are specific to Intel Optane devices and are as follows.
1..Generate a new region configuration request using this utility.
2. Reset the platform.
3. Use this utility to list the status of operation.James Sushanth Anandraj (4):
Documentation/pcdctl: Add documentation for pcdctl tool and commands pcdctl/list: Add pcdctl-list command to enumerate 'nvdimm' devices pcdctl/reconfigure: Add pcdctl-reconfigure-region command pcdctl/reconfigure: Add support for pmem and iso-pmem modesDocumentation/pcdctl/Makefile.am | 59 + .../pcdctl/asciidoctor-extensions.rb | 30 + Documentation/pcdctl/pcdctl-list.txt | 56 + .../pcdctl/pcdctl-reconfigure-region.txt | 50 + Documentation/pcdctl/pcdctl.txt | 40 + Documentation/pcdctl/theory-of-operation.txt | 28 + Makefile.am | 4 +- configure.ac | 2 + pcdctl/Makefile.am | 18 + pcdctl/builtin.h | 9 + pcdctl/list.c | 114 ++ pcdctl/list.h | 11 + pcdctl/pcat.c | 59 + pcdctl/pcat.h | 13 + pcdctl/pcd.h | 381 +++++ pcdctl/pcdctl.c | 88 + pcdctl/reconfigure.c | 1458 +++++++++++++++++ pcdctl/reconfigure.h | 12 + util/main.h | 1 + 19 files changed, 2431 insertions(+), 2 deletions(-) create mode 100644 Documentation/pcdctl/Makefile.am create mode 100644 Documentation/pcdctl/asciidoctor-extensions.rb create mode 100644 Documentation/pcdctl/pcdctl-list.txt create mode 100644 Documentation/pcdctl/pcdctl-reconfigure-region.txt create mode 100644 Documentation/pcdctl/pcdctl.txt create mode 100644 Documentation/pcdctl/theory-of-operation.txt create mode 100644 pcdctl/Makefile.am create mode 100644 pcdctl/builtin.h create mode 100644 pcdctl/list.c create mode 100644 pcdctl/list.h create mode 100644 pcdctl/pcat.c create mode 100644 pcdctl/pcat.h create mode 100644 pcdctl/pcd.h create mode 100644 pcdctl/pcdctl.c create mode 100644 pcdctl/reconfigure.c create mode 100644 pcdctl/reconfigure.h--
2.20.1
Quoted 18 lines · Jeff Moyer
Quoted 1 line · Dan Williams
[ add Jeff, Michal, and Adam ]
[ adding Bryan Gurney, who is helping out with RHEL packaging ]
Quoted 10 lines
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. Recall that the ACPI NFIT communicates the static region configuration to the OS, but changing that configuration is a device-specific protocol plus a reboot. Until the arrival of pcdctl, region provisioning required ipmctl.
Quoted 6 lines
It's great to see progress on this, thanks! Shipping another utility as part of the ndctl package is fine with me, though I'm not sure why we wouldn't just make this an ndctl sub-command. From a user's perspective, these are all operations on or about nvdimms. ipmctl didn't have separate utilities for provisioning goals and namespace configuration, for example.
True, but ipmctl also did not make an attempt to support anything other than Intel devices, and later versions abandoned the namespace setup code in favor of "native OS" capabilities (ndctl on Linux).
The main rationale for splitting region provisioning to dedicated tooling is the observation that region provisioning semantics are platform specific. It is already the case that IBM devices have their own provisioning tool with different semantics for the "PAPR" family. CXL region provisioning semantics again are much different than what is done for DDR-T devices (see below). So rather than try to abstract all that under ndctl that wants to be vendor agnostic, offload that to platform specific tools. My hope is that more tools like this do not proliferate as the industry unifies on common standards for persistent memory like CXL.
That said, the new commands could be placed under a vendor/platform-specific name in ndctl, like:
ndctl list-ipm-region
ndctl reconfigure-ipm-region
...just not my first choice given the success to date of keeping vendor details out of the command line interface of ndctl. The primary blocker for ndctl to generic region provisioning would be a kernel driver model for it, but I don't know how to reconcile "ipm-regions" requiring a reboot and a BIOS validation step vs buses like CXL that can reconfigure interleave sets at runtime.
Quoted 10 lines
Quoted 6 lines
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. In general, the ndctl project is open to carrying support for persistent memory devices with open specifications. In this case the provisioning specification for devices formerly driven by ipmctl was opened up and provided here:
Is there a meaningful difference to the user? Can you show some examples of how configuration would be different between cxl-attached pmem and memory-bus attached pmem?
Yes, CXL exposes several more details and degrees of freedom to system software. Before I list those I'll point out that to keep pcdctl simple it only handles the simple / common configurations: all performance-pmem (interleaved), all fault tolerant pmem (non-interleaved), all volatile with memory-side-caching. Any custom/expert configuration outside of those common cases is punted to ipmctl. In comparison, the CXL tool will need to handle the full range of configuration complexity.
The main difference to end users when provisioning regions on CXL is the wider range of resources they need to consider. The CXL specific resources include:
- Available PMEM capable address space as described by the ACPI CFMWS
- Device performance that matches the address space traffic class
- Decoder resources at each level of the hierarchy. I.e. a device may be able to participate in 4 different interleave configurations, but depending on the switch topology upstream of that device it may be constrained to a smaller set.
- Volatile memory vs PMEM partitioning on the device. The NVDIMM sub-system and ndctl will not have any responsibility for the volatile memory side of CXL.
To me that looks like sufficient complexity to warrant a dedicated CXL tool rather than try to find a lowest-common-denominator abstraction that melds with ipm-regions for ndctl to drive generically. The CXL tool will also handle firmware update and other CXL generic functionality outside of PMEM.
Quoted 8 lines
Quoted 4 lines
https://cdrdv2.intel.com/v1/dl/getContent/634430
Please comment on its suitability for shipping in distros alongside the ndctl tool.
It's completely fine to ship more tools with ndctl. I would like a better overall picture of configuration from the admin's perspective. At first glance, I think we're adding unneeded complexity.
You mean the complexity of having to determine which platform region provisioning tool to use before you can use ndctl to do the rest?
Quoted 7 lines
Cheers,
Jeffp.s. I don't find the name 'pdctl' particularly endearing. If we do stick with a separate utility, I'd suggest coming up with a more descriptive name.
How about "ipmregion"? Where "ipm" is already in the wild as an identifier for DDR-T configuration, and unlike ipmctl it only handles the region provisioning subset?
[ CC people who have some experience with the ACPI pmem ]
Hello,
Quoted 65 lines · Dan Williams
Quoted 18 lines · Jeff Moyer
Quoted 1 line · Dan Williams
[ add Jeff, Michal, and Adam ]
[ adding Bryan Gurney, who is helping out with RHEL packaging ]
Quoted 10 lines
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. Recall that the ACPI NFIT communicates the static region configuration to the OS, but changing that configuration is a device-specific protocol plus a reboot. Until the arrival of pcdctl, region provisioning required ipmctl.
Quoted 6 lines
It's great to see progress on this, thanks! Shipping another utility as part of the ndctl package is fine with me, though I'm not sure why we wouldn't just make this an ndctl sub-command. From a user's perspective, these are all operations on or about nvdimms. ipmctl didn't have separate utilities for provisioning goals and namespace configuration, for example.
True, but ipmctl also did not make an attempt to support anything other than Intel devices, and later versions abandoned the namespace setup code in favor of "native OS" capabilities (ndctl on Linux).
The main rationale for splitting region provisioning to dedicated tooling is the observation that region provisioning semantics are platform specific. It is already the case that IBM devices have their own provisioning tool with different semantics for the "PAPR" family. CXL region provisioning semantics again are much different than what is done for DDR-T devices (see below). So rather than try to abstract all that under ndctl that wants to be vendor agnostic, offload that to platform specific tools. My hope is that more tools like this do not proliferate as the industry unifies on common standards for persistent memory like CXL.
That said, the new commands could be placed under a vendor/platform-specific name in ndctl, like:
ndctl list-ipm-region
ndctl reconfigure-ipm-region...just not my first choice given the success to date of keeping vendor details out of the command line interface of ndctl. The primary blocker for ndctl to generic region provisioning would be a kernel driver model for it, but I don't know how to reconcile "ipm-regions" requiring a reboot and a BIOS validation step vs buses like CXL that can reconfigure interleave sets at runtime.
Quoted 10 lines
Quoted 6 lines
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. In general, the ndctl project is open to carrying support for persistent memory devices with open specifications. In this case the provisioning specification for devices formerly driven by ipmctl was opened up and provided here:
Is there a meaningful difference to the user? Can you show some examples of how configuration would be different between cxl-attached pmem and memory-bus attached pmem?
Quoted 7 lines
Yes, CXL exposes several more details and degrees of freedom to system software. Before I list those I'll point out that to keep pcdctl simple it only handles the simple / common configurations: all performance-pmem (interleaved), all fault tolerant pmem (non-interleaved), all volatile with memory-side-caching. Any custom/expert configuration outside of those common cases is punted to ipmctl.
What is the purpose of having the new tool when it cannot handle the full configuration, and users still need to refer to the old tool for some cases?
Then to make life or users simpler I vould completely skip the new partial tool.
Other than that if the new tools provide some value but are platform-specific it is slight annoyance to package different set of tools depending on target architecture but it's not something that cannot be managed.
Thanks
Michal
Quoted 49 lines
In comparison, the CXL tool will need to handle the full range of configuration complexity.
The main difference to end users when provisioning regions on CXL is the wider range of resources they need to consider. The CXL specific resources include:
- Available PMEM capable address space as described by the ACPI CFMWS
- Device performance that matches the address space traffic class
- Decoder resources at each level of the hierarchy. I.e. a device may be able to participate in 4 different interleave configurations, but depending on the switch topology upstream of that device it may be constrained to a smaller set.
- Volatile memory vs PMEM partitioning on the device. The NVDIMM sub-system and ndctl will not have any responsibility for the volatile memory side of CXL.
To me that looks like sufficient complexity to warrant a dedicated CXL tool rather than try to find a lowest-common-denominator abstraction that melds with ipm-regions for ndctl to drive generically. The CXL tool will also handle firmware update and other CXL generic functionality outside of PMEM.
Quoted 8 lines
Quoted 4 lines
https://cdrdv2.intel.com/v1/dl/getContent/634430
Please comment on its suitability for shipping in distros alongside the ndctl tool.
It's completely fine to ship more tools with ndctl. I would like a better overall picture of configuration from the admin's perspective. At first glance, I think we're adding unneeded complexity.
You mean the complexity of having to determine which platform region provisioning tool to use before you can use ndctl to do the rest?
Quoted 7 lines
Cheers,
Jeffp.s. I don't find the name 'pdctl' particularly endearing. If we do stick with a separate utility, I'd suggest coming up with a more descriptive name.
How about "ipmregion"? Where "ipm" is already in the wild as an identifier for DDR-T configuration, and unlike ipmctl it only handles the region provisioning subset?
Quoted 79 lines · Michal Suchánek
[ CC people who have some experience with the ACPI pmem ]
Hello,
Quoted 65 lines · Dan Williams
Quoted 18 lines · Jeff Moyer
Quoted 1 line · Dan Williams
[ add Jeff, Michal, and Adam ]
[ adding Bryan Gurney, who is helping out with RHEL packaging ]
Quoted 10 lines
Hey ndctl distro maintainers,
Just wanted to highlight this new tool submission for your consideration. The goal here is to have a Linux native provisioning tool that covers the basics of the functionality that is outside of the ACPI specification, and reduce the need for ipmctl outside of exceptional device-specific debug scenarios. Recall that the ACPI NFIT communicates the static region configuration to the OS, but changing that configuration is a device-specific protocol plus a reboot. Until the arrival of pcdctl, region provisioning required ipmctl.
Quoted 6 lines
It's great to see progress on this, thanks! Shipping another utility as part of the ndctl package is fine with me, though I'm not sure why we wouldn't just make this an ndctl sub-command. From a user's perspective, these are all operations on or about nvdimms. ipmctl didn't have separate utilities for provisioning goals and namespace configuration, for example.
True, but ipmctl also did not make an attempt to support anything other than Intel devices, and later versions abandoned the namespace setup code in favor of "native OS" capabilities (ndctl on Linux).
The main rationale for splitting region provisioning to dedicated tooling is the observation that region provisioning semantics are platform specific. It is already the case that IBM devices have their own provisioning tool with different semantics for the "PAPR" family. CXL region provisioning semantics again are much different than what is done for DDR-T devices (see below). So rather than try to abstract all that under ndctl that wants to be vendor agnostic, offload that to platform specific tools. My hope is that more tools like this do not proliferate as the industry unifies on common standards for persistent memory like CXL.
That said, the new commands could be placed under a vendor/platform-specific name in ndctl, like:
ndctl list-ipm-region
ndctl reconfigure-ipm-region...just not my first choice given the success to date of keeping vendor details out of the command line interface of ndctl. The primary blocker for ndctl to generic region provisioning would be a kernel driver model for it, but I don't know how to reconcile "ipm-regions" requiring a reboot and a BIOS validation step vs buses like CXL that can reconfigure interleave sets at runtime.
Quoted 10 lines
Quoted 6 lines
I will note that CXL moves the region configuration into the base CXL specification so the ndctl project will pick up a "cxl-cli" tool for that purpose. In general, the ndctl project is open to carrying support for persistent memory devices with open specifications. In this case the provisioning specification for devices formerly driven by ipmctl was opened up and provided here:
Is there a meaningful difference to the user? Can you show some examples of how configuration would be different between cxl-attached pmem and memory-bus attached pmem?
Quoted 7 lines
Yes, CXL exposes several more details and degrees of freedom to system software. Before I list those I'll point out that to keep pcdctl simple it only handles the simple / common configurations: all performance-pmem (interleaved), all fault tolerant pmem (non-interleaved), all volatile with memory-side-caching. Any custom/expert configuration outside of those common cases is punted to ipmctl.
Quoted 3 lines
What is the purpose of having the new tool when it cannot handle the full configuration, and users still need to refer to the old tool for some cases?
A valid question, indeed I neglected to clarify the original motivation to go this route. So a small bit of history: ndctl was built to be Linux native and vendor agnostic, and ipmctl was built to be OS agnostic and vendor specific. For that reason ipmctl was slower to be picked up by distributions and some distributions still do not ship it in their supported repos today.
One of the feedback items we, ndctl + ipmctl developers, heard is that ndctl is easier for a distribution to support because of its organization as a Linux-native open-source project, i.e. no OS abstraction + typical open development on a public mailing list. We also heard the feedback that ndctl was frustratingly deficient in being able to handle all the major provisioning flows for DDR-T devices except for "goal" / region management.
Quoted 2 lines
Then to make life or users simpler I vould completely skip the new partial tool.
I think that's a reasonable position. If a distribution is already comfortable shipping and supporting ipmctl then there's little need to ship this new tool. Conversely if a distribution has not promoted ipmctl to a supported package this new tool can fill a gap.
Again, this gets better for CXL where all provisioning is standardized across vendors.
Quoted 4 lines
Other than that if the new tools provide some value but are platform-specific it is slight annoyance to package different set of tools depending on target architecture but it's not something that cannot be managed.
Understood, I can see how this new tool requires a decision to be made about whether to ignore it, or ship both for distributions that are already carrying ipmctl. I don't have a strong opinion either way, I just know that this option is something that some distributions may want.