Re: [PATCH v2] mm: let /proc/meminfo report physical memory installed as "MemTotal"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 21 Feb 2013 01:27:25 +0800
Jiang Liu <liuj97@xxxxxxxxx> wrote:

> As reported by https://bugzilla.kernel.org/show_bug.cgi?id=53501,
> "MemTotal" from /proc/meminfo means memory pages managed by the buddy
> system (managed_pages), but "MemTotal" from /sys/.../node/nodex/meminfo
> means phsical pages present (present_pages) within the NUMA node.
> There's a difference between managed_pages and present_pages due to
> bootmem allocator and reserved pages.
> 
> So change /proc/meminfo to report physical memory installed as
> "MemTotal", which is
> MemTotal = sum(pgdat->present_pages)

Documentation/filesystems/proc.txt says

    MemTotal: Total usable ram (i.e. physical ram minus a few reserved
              bits and the kernel binary code)

And arguably, that is more useful than "total physical memory".

Presumably the per-node MemTotals are including kernel memory and
reserved memory.  Maybe they should be fixed instead (sounds hard).

Or maybe we just leave everything as-is and document it carefully.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]