what does mean by HardwareCorrupted, DirectMap4k, DirectMap2M fields in “/proc/meminfo” file of Linux?

7,883

HardwareCorrupted show the amount of memory in "poisoned pages", i.e. memory which has failed (as flagged by ECC typically). ECC stands for "Error Correcting Code". ECC memory is capable of correcting small errors and detecting larger ones; on typical PCs with non-ECC memory, memory errors go undetected. If an uncorrectable error is detected using ECC (in memory or cache, depending on the system's hardware support), then the Linux kernel marks the corresponding page as poisoned.

DirectMap is shown on x86, Book3s PowerPC, and S/390, and gives an indication of the TLB load, not memory use: it counts the number of pages mapped using the various supported page sizes on each platform (corresponding to different page table levels): 4KiB, 64KiB, 1MiB, 2MiB, 4MiB, 1GiB, or 2GiB pages. The TLB, or "Translation Lookaside Buffer", is a cache used to store mappings between virtual addresses (as seen by software running on your computer) and physical pages in memory (as seen by the hardware); the calculations and memory fetches involved to go from virtual to physical addresses are expensive, so caches are used to avoid needing them too often. But the TLB is small, so accessing a variety of different addresses (too many to stay in the cache) incurs a performance penalty. This penalty can be reduced by using larger pages; on the x86 architecture the traditional page size is 4KiB, but larger pages can be used when possible, and their sizes can be 2MiB, 4MiB or 1GiB.

For more detail you can look up the Wikipedia links I've included, and follow the references from there.

Share:
7,883

Related videos on Youtube

diago
Author by

diago

Updated on September 18, 2022

Comments

  • diago
    diago over 1 year

    I am looking for description of following terms:

    • HardwareCorrupted, DirectMap4k, DirectMap2M fields in "/proc/meminfo" file of Linux.

    I could find the following description for the fields from "Free", "buffer", "swap", "dirty" /proc/meminfo Explained:

    HardwareCorrupted: ECC at it's finest

    DirectMap* : This is x86 specific, basically available direct mapped slots.

    but this description is not enough. Can anyone please let me know descriptions for "HardwareCorrupted", "DirectMap4k", "DirectMap2M"?

  • ctrl-alt-delor
    ctrl-alt-delor almost 4 years
    I believe that 4M pages are not in the architecture that has 1G pages (x86-pae and x86-64). 4k and 4M are in x86-32. 4k, 2M and 1G are in x86-64 and x86-pae. Also it is not the calculations that are expensive, it is a page read to read the page table (I am refuse to use different names for the different levels).
  • Stephen Kitt
    Stephen Kitt almost 4 years
    Indeed, fetches are quite a bit more expensive than the ~10 cycles needed for most address calculations, thanks! And yes, 1G is not used on x86-32.
  • Simon Richter
    Simon Richter almost 4 years
    I have DirectMap entries on my POWER9 box, although I'm not sure that these are fully meaningful -- all but DirectMap1G are zero.
  • Stephen Kitt
    Stephen Kitt almost 4 years
    @SimonRichter indeed, they were x86-specific but are now listed on PowerPC and S/390.