Lines Matching +full:block +full:- +full:diagram
2 LIBNVDIMM: Non-Volatile Devices
5 libnvdimm - kernel / libndctl - userspace helper library
18 PMEM-REGIONs, Atomic Sectors, and DAX
40 LIBNVDIMM/LIBNDCTL: Block Translation Table "btt"
43 Summary LIBNDCTL Diagram
50 A system-physical-address range where writes are persistent. A
51 block device composed of PMEM is capable of DAX. A PMEM address range
55 DIMM Physical Address, is a DIMM-relative offset. With one DIMM in
56 the system there would be a 1:1 system-physical-address:DPA association.
59 system-physical-address.
62 File system extensions to bypass the page cache and block layer to
63 mmap persistent memory, from a PMEM block device, directly into a
68 device - in this case the firmware.
72 It defines a vendor-id, device-id, and interface format for a given DIMM.
75 Block Translation Table: Persistent memory is byte addressable.
76 Existing software may have an expectation that the power-fail-atomicity
78 table with atomic update semantics to front a PMEM block device
97 is generic and supports pre-NFIT platforms, it was guided by the
100 block-window-aperture capability described in the NFIT, but that support
104 --------------------
116 ---------
127 Prior to the arrival of the NFIT, non-volatile memory was described to a
128 system in various ad-hoc ways. Usually only the bare minimum was
129 provided, namely, a single system-physical-address range where writes
132 platform message-passing entry points for control and configuration.
134 PMEM (nd_pmem.ko): Drives a system-physical-address range. This range is
140 namespace label index block is found), then no block device is created
144 label-less or "legacy".
146 PMEM-REGIONs, Atomic Sectors, and DAX
147 -------------------------------------
151 LIBNVDIMM/NDCTL: Block Translation Table "btt"
157 For the remainder of this document the following diagram will be
162 +-------------------+--------+--------+--------+
163 +------+ | pm0.0 | free | pm1.0 | free | 0
164 | imc0 +--+- - - region0- - - +--------+ +--------+
165 +--+---+ | pm0.0 | free | pm1.0 | free | 1
166 | +-------------------+--------v v--------+
167 +--+---+ | |
169 +--+---+ | |
170 | +----------------------------^ ^--------+
171 +--+---+ | free | pm1.0 | free | 2
172 | imc1 +--+----------------------------| +--------+
173 +------+ | free | pm1.0 | free | 3
174 +----------------------------+--------+--------+
181 single PMEM namespace is created in the REGION0-SPA-range that spans most
182 of DIMM0 and DIMM1 with a user-specified name of "pm0.0". Some of that
183 interleaved system-physical-address range is left free for
187 system-physical-address range, REGION1, that spans those two DIMMs as
201 corresponding object hierarchy diagram as viewed through the LIBNDCTL
207 -----------------
228 -----------------------
231 ACPI based systems is that there is only ever one platform-global NFIT.
238 ---------------------------------------------
244 |-- dev
245 |-- device -> ../../../ndbus0
246 |-- subsystem -> ../../../../../../../class/nd
251 --------------
261 |-- commands
262 |-- nd
263 |-- nfit
264 |-- nmem0
265 |-- nmem1
266 |-- nmem2
267 |-- nmem3
268 |-- power
269 |-- provider
270 |-- region0
271 |-- region1
272 |-- region2
273 |-- region3
274 |-- region4
275 |-- region5
276 |-- uevent
277 `-- wait_probe
300 -------------------------------
304 NFIT then an optional 'nfit' attribute sub-directory is available to add
305 NFIT-specifics.
324 |-- nmem0
325 | |-- available_slots
326 | |-- commands
327 | |-- dev
328 | |-- devtype
329 | |-- driver -> ../../../../../bus/nd/drivers/nvdimm
330 | |-- modalias
331 | |-- nfit
332 | | |-- device
333 | | |-- format
334 | | |-- handle
335 | | |-- phys_id
336 | | |-- rev_id
337 | | |-- serial
338 | | `-- vendor
339 | |-- state
340 | |-- subsystem -> ../../../../../bus/nd
341 | `-- uevent
342 |-- nmem1
349 Note, in this example we are assuming NFIT-defined DIMMs which are
350 identified by an "nfit_handle" a 32-bit value where:
352 - Bit 3:0 DIMM number within the memory channel
353 - Bit 7:4 memory channel number
354 - Bit 11:8 memory controller ID
355 - Bit 15:12 socket ID (within scope of a Node controller if node
357 - Bit 27:16 Node Controller ID
358 - Bit 31:28 Reserved
381 --------------------------
383 A generic REGION device is registered for each PMEM interleave-set /
386 mapping is a tuple of <DIMM, DPA-start-offset, length>.
388 LIBNVDIMM provides a built-in driver for REGION devices. This driver
394 "nstype" indicates the integer type of namespace-device this region
408 |-- region0
409 | |-- available_size
410 | |-- btt0
411 | |-- btt_seed
412 | |-- devtype
413 | |-- driver -> ../../../../../bus/nd/drivers/nd_region
414 | |-- init_namespaces
415 | |-- mapping0
416 | |-- mapping1
417 | |-- mappings
418 | |-- modalias
419 | |-- namespace0.0
420 | |-- namespace_seed
421 | |-- numa_node
422 | |-- nfit
423 | | `-- spa_index
424 | |-- nstype
425 | |-- set_cookie
426 | |-- size
427 | |-- subsystem -> ../../../../../bus/nd
428 | `-- uevent
429 |-- region1
435 Sample region retrieval routines based on NFIT-unique data like
456 -----------------------------
460 triggers the nd_pmem driver to load and register a disk/block device.
466 represents DIMM-info-backed PMEM (note that it has a 'uuid' attribute), and
473 |-- alt_name
474 |-- devtype
475 |-- dpa_extents
476 |-- force_raw
477 |-- modalias
478 |-- numa_node
479 |-- resource
480 |-- size
481 |-- subsystem -> ../../../../../../bus/nd
482 |-- type
483 |-- uevent
484 `-- uuid
486 |-- block
487 | `-- pmem0
488 |-- devtype
489 |-- driver -> ../../../../../../bus/nd/drivers/pmem
490 |-- force_raw
491 |-- modalias
492 |-- numa_node
493 |-- resource
494 |-- size
495 |-- subsystem -> ../../../../../../bus/nd
496 |-- type
497 `-- uevent
538 ndctl_region_get_id(region), paramaters->id);
542 ndctl_namespace_set_uuid(ndns, paramaters->uuid);
543 ndctl_namespace_set_size(ndns, paramaters->size);
545 if (parameters->lbasize)
546 ndctl_namespace_set_sector_size(ndns, parameters->lbasize);
555 ND (libnvdimm subsystem) to a volume manager like device-mapper.
557 2. The term originated to describe the sub-devices that can be created
561 NVME-namespaces.
564 LIBNVDIMM/LIBNDCTL: Block Translation Table "btt"
565 -------------------------------------------------
580 |-- namespace
581 |-- delete
582 |-- devtype
583 |-- modalias
584 |-- numa_node
585 |-- sector_size
586 |-- subsystem -> ../../../../../bus/nd
587 |-- uevent
588 `-- uuid
617 ndctl_btt_set_uuid(btt, parameters->uuid);
618 ndctl_btt_set_sector_size(btt, parameters->sector_size);
619 ndctl_btt_set_namespace(btt, parameters->ndns);
621 ndctl_namespace_disable(parameters->ndns);
632 block" needs to be destroyed. Note, that to destroy a BTT the media
639 Summary LIBNDCTL Diagram
640 ------------------------
645 +---+
647 +-+-+
649 +-------+ |
650 | DIMM0 <-+ | +---------+ +--------------+ +---------------+
651 +-------+ | | +-> REGION0 +---> NAMESPACE0.0 +--> PMEM8 "pm0.0" |
652 | DIMM1 <-+ +-v--+ | +---------+ +--------------+ +---------------+
653 +-------+ +-+BUS0+-| +---------+ +--------------+ +----------------------+
654 | DIMM2 <-+ +----+ +-> REGION1 +---> NAMESPACE1.0 +--> PMEM6 "pm1.0" | BTT1 |
655 +-------+ | | +---------+ +--------------+ +---------------+------+
656 | DIMM3 <-+
657 +-------+