[PATCH] ARM64: Implement arch_report_meminfo()

Christoph Lameter (Ampere) cl at linux.com
Wed Dec 13 21:25:10 PST 2023


On Tue, 12 Dec 2023, Yang Shi wrote:

>> +static atomic_t nr_pte;
>> +static atomic_t nr_pmd;
>> +static atomic_t nr_pud;
>> +static atomic_t nr_pte_cont;
>> +static atomic_t nr_pmd_cont;
>
> These statistics are useful for debugging. However, why not use the
> direct_pages_count[] array to save the counters like other
> architectures, for example, x86, ppc and s390?

That is because ARM64 also has the CONT features. The code significantly
differs from x86.

Using the above naming scheme ties the values directly to what is supported by
the hardware and results in easier to read source code.

Calling this "direct" something is then a presentation issue.
That is actually something I was not sure about. CONT Direct is a bit 
strange. I'd prefer to see PTE/PMD/PUD there whic makes it clear to me.
But I guess others expect to see "Direct Pages" there since they are
used to it from x86.




More information about the linux-arm-kernel mailing list