[PATCH v2] powerpc/pseries: Fix maximum memory value

Naveen N. Rao naveen.n.rao at linux.vnet.ibm.com
Sat Jun 29 03:38:57 AEST 2019


Nathan Lynch wrote:
> Aravinda Prasad <aravinda at linux.vnet.ibm.com> writes:
>> Calculating the maximum memory based on the number of lmbs
>> and lmb size does not account for the RMA region. Hence
>> use memory_hotplug_max(), which already accounts for the
>> RMA region, to fetch the maximum memory value. Thanks to
>> Nathan Lynch for suggesting the memory_hotplug_max()
>> function.
> 
> Well, I hope I haven't led you astray... will it give you the desired
> result on a kernel configured without memory hotplug support, booted in
> an LPAR with some huge pages configured?
> 
> If so, then
> Acked-by: Nathan Lynch <nathanl at linux.ibm.com>
> 
> It would likely help with review and future maintenance if the semantics
> and intended use of the MaxMem field are made a little more
> explicit. For example, is it supposed to include persistent memory?
> Perhaps a follow-up patch could address this. Or maybe I'm overthinking
> it.

This was primarily aimed to replicate what AIX lparstat does and 
documentation (*) just says:

  Maximum Memory
      Maximum possible amount of Memory.

I think this mirrors the maximum memory value set in the LPAR profile, 
and this provides a way to obtain that value from within the LPAR.

This doesn't necessarily answer your question, but that's at least the 
reference.

(*) 
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.cmds3/lparstat.htm

- Naveen




More information about the Linuxppc-dev mailing list