intel / ipmctl

BSD 3-Clause "New" or "Revised" License
184 stars 62 forks source link

Inaccessible capacity clarification under AEP memory-resource #117

Open Muthu2112 opened 5 years ago

Muthu2112 commented 5 years ago

Hi All,

When AEP DIMM configured as Appdirect or Appdirectnotinterleaved either in Mixed or App mode . Executed Command : ipmctl.efi show -memoryresources where InaccessibleCapacity shown some size or value

Question:

  1. whether InaccessibleCapacity should 0 B or some value
  2. If some value shown how to calculate it and its maximum limit size depending on DIMM population and size

Command : ipmctl.efi show -memoryresources

Capacity=505.6 GiB MemoryCapacity=0 B AppDirectCapacity=504.0 GiB UnconfiguredCapacity=0 B InaccessibleCapacity=1.6 GiB ReservedCapacity=0 B

sscargal commented 5 years ago

We reserve a small amount of space for metadata such as a the PCD (Platform Configuration Data). The BIOS reads this at boot time and applies that config. The space required is approximately 500MB regardless of the Capacity. We also aligned to 1GB in AppDirect & AppDirectNotInterleaved, so that's where the ~1GB + ~500MB = ~1.6GB of "InaccessibleCapacity" comes from (rounded up).

There's a more detailed description in the ipmctl-show-memory-resources(1) man page.

Note: 1LM == AppDirect or AppDirectNotInterleaved, 2LM = MemoryMode

RETURN DATA

       Capacity
           Total system DCPMM capacity.

       MemoryCapacity
           Total usable system DCPMM Memory Mode capacity.

       AppDirectCapacity
           Total usable system DCPMM App Direct capacity.

       UnconfiguredCapacity
           Total system DCPMM capacity that is unusable because it has not been configured.

       ReservedCapacity
           Total system DCPMM persistent memory capacity that is reserved. This capacity is the persistent memory partition
           capacity (rounded down for alignment) less any App Direct capacity. Reserved capacity typically results from a
           Memory Allocation Goal request that specified the Reserved property. This capacity is not mapped to system physical
           address (SPA) space.

       InaccessibleCapacity
           Total system DCPMM capacity that is inaccessible due any of:

           ·   Platform configuration prevents accessing this capacity. e.g. MemoryCapacity is configured but MemoryMode is
               not enabled by platform FW (current Memory Mode is 1LM).

           ·   Capacity is inaccessible because it is not mapped into the system physical address space (SPA). This is usually
               due to platform firmware memory alignment requirements.

           ·   DCPMM configured capacity but SKU prevents usage. e.g. AppDirectCapcity but DCPMM SKU is MemoryMode only.

DETAILS
       DCPMMs are partitioned into Memory and Persistent partitions. ipmctl will align the Memory partition on a 1 GiB
       boundary with the Persistent partition consuming the remaining capacity. An exception: if DCPMM is configured for 100%
       Memory Mode then Memory partition will consume 100% of the capacity, while Persistent partition will be 0 length. Any
       capacity that falls outside the Memory and Persistent partitions is InaccessibleCapacity and is not useable.

       Platform firmware alignment restrictions may result in some capacity from the Memory and Persistent partitions not
       mapped to system physical address (SPA) space. This memory is considered InaccessibleCapacity and is not usable.

       Definitions:

       Total Capacity (TC)
           Raw Capacity (total usable) reported by DCPMM DIMM Partition Info

       Memory Partition Capacity (MPC)
           Volatile Capacity reported by DCPMM DIMM Partition Info

       Persistent Partition Capacity (PPC)
           Persistent Capacity reported by DCPMM DIMM Partition Info

       Volatile Memory Size (VMS)
           Usable voliatile memory capacity as reported by platform FW via Intel NVDIMM Current Config→Volatile Memory Size
           Mapped into SPA field

       Persistent Memory Size (PMS)
           Usable persistent memory capacity as reported by platform FW via Intel NVDIMM Current Config→Persistent Memory Size
           Mapped into SPA field

       DCPMM DIMM Partition Info
           DIMM Partition Info provided by DCPMM firmware. See Intel® Optane™ DC Persistent Memory Module Firmware Interface
           Specification for details.

       Intel NVDIMM Current Config
           See Intel® NVM Dimm Management Software-Firmware Interface Specification for details.

       Calculations:

       MemoryCapacity = Volatile Memory Size

       AppDirectCapacity = Persistent Memory Size

       ReservedCapacity = PPC (rounded down for PM alignment) - PMS

       InaccessibleCapacity =
         + (TC - MPC - PPC)
         + (TC - PMS - ReservedCapacity)
        if (CurrentMode == 1LM) then
         + VMS (rounded down for alignment)

HTH