Re: [PATCH v3 03/10] efi: Enumerate EFI_MEMORY_SP

From: Dan Williams
Date: Fri Jun 07 2019 - 18:11:48 EST


On Fri, Jun 7, 2019 at 2:12 PM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 6/7/19 1:03 PM, Dan Williams wrote:
> >> Separate from these patches, should we have a runtime file that dumps
> >> out the same info? dmesg isn't always available, and hotplug could
> >> change this too, I'd imagine.
> > Perhaps, but I thought /proc/iomem was that runtime file. Given that
> > x86/Linux only seems to care about the the EFI to E820 translation of
> > the map and the E820 map is directly reflected in /proc/iomem, do we
> > need another file?
>
> Probably not.
>
> I'm just trying to think of ways that we can debug systems where someone
> "loses" a bunch of memory, especially if they're moving from an old
> kernel to a new one with these patches. From their perspective, they
> just lost a bunch of expensive memory.
>
> Do we owe a pr_info(), perhaps? Or even a /proc/meminfo entry for how
> much memory these devices own?

We have this existing print when this bit is found:

[ 0.023650] e820: update [mem 0x240000000-0x43fffffff] usable ==>
application reserved

...but perhaps /proc/meminfo could grow:

ApplicationReservedOffline
ApplicationReservedOnline

...to show the relative amount of this memory that has been routed to
device-dax and how much has been returned to the core-mm?