<div dir="ltr">A somewhat tedious way to test would be to build and boot with 'bitbake core-image-minimal' to ensure no phosphor-daemons are loaded, and then compare the kernel memory footprint.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 10:01 AM Tanous, Ed <<a href="mailto:ed.tanous@intel.com">ed.tanous@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Was this only the kernel version jump, or did you jump in openbmc/phosphor levels as well?  There have been quite a few daemons added in the last 6 months or so that could explain your memory footprint increase.<br>
<br>
-Ed<br>
<br>
<br>
<br>
> On Oct 9, 2018, at 9:54 AM, Patrick Venture <<a href="mailto:venture@google.com" target="_blank">venture@google.com</a>> wrote:<br>
> <br>
> Just jumped from 4.7 kernel to 4.18 running the latest openbmc image<br>
> on the quanta-q71l board.  And I see now I have ~20MiB of RAM free for<br>
> stuff once things are settled, whereas before I could have up to<br>
> 35MiB.<br>
> <br>
> Here are some dumps:<br>
> <br>
> Now:<br>
> [  Â  0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f<br>
> [  Â  0.000000] CPU: VIVT data cache, VIVT instruction cache<br>
> [  Â  0.000000] OF: fdt: Machine model: Quanta Q71L BMC<br>
> [  Â  0.000000] Memory policy: Data cache writeback<br>
> [  Â  0.000000] On node 0 totalpages: 30720<br>
> [  Â  0.000000]  Â Normal zone: 240 pages used for memmap<br>
> [  Â  0.000000]  Â Normal zone: 0 pages reserved<br>
> [  Â  0.000000]  Â Normal zone: 30720 pages, LIFO batch:7<br>
> [  Â  0.000000] random: get_random_bytes called from<br>
> start_kernel+0x8c/0x4c0 with crng_init=0<br>
> [  Â  0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768<br>
> [  Â  0.000000] pcpu-alloc: [0] 0<br>
> [  Â  0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 30480<br>
> [  Â  0.000000] Kernel command line: console=ttyS4,115200n8<br>
> root=/dev/ram rw clk_ignore_unused<br>
> [  Â  0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)<br>
> [  Â  0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)<br>
> [  Â  0.000000] Memory: 111076K/122880K available (5120K kernel code,<br>
> 365K rwdata, 1104K rodata, 1024K init, 143K bss, 11804K reserved, 0K<br>
> cma-reserved)<br>
> [  Â  0.000000] Virtual kernel memory layout:<br>
> [  Â  0.000000]  Â  Â vector  : 0xffff0000 - 0xffff1000  Â (  Â 4 kB)<br>
> [  Â  0.000000]  Â  Â fixmap  : 0xffc00000 - 0xfff00000  Â (3072 kB)<br>
> [  Â  0.000000]  Â  Â vmalloc : 0x88000000 - 0xff800000  Â (1912 MB)<br>
> [  Â  0.000000]  Â  Â lowmem  : 0x80000000 - 0x87800000  Â ( 120 MB)<br>
> [  Â  0.000000]  Â  Â  Â .text : 0x(ptrval) - 0x(ptrval)  Â (6112 kB)<br>
> [  Â  0.000000]  Â  Â  Â .init : 0x(ptrval) - 0x(ptrval)  Â (1024 kB)<br>
> [  Â  0.000000]  Â  Â  Â .data : 0x(ptrval) - 0x(ptrval)  Â ( 366 kB)<br>
> [  Â  0.000000]  Â  Â  Â  .bss : 0x(ptrval) - 0x(ptrval)  Â ( 144 kB)<br>
> [  Â  0.000000] ftrace: allocating 18546 entries in 55 pages<br>
> <br>
> cat /proc/meminfo<br>
> MemTotal:  Â  Â  Â  Â 113952 kB<br>
> MemFree:  Â  Â  Â  Â  Â 19944 kB<br>
> MemAvailable:  Â  Â  62432 kB<br>
> Buffers:  Â  Â  Â  Â  Â 11032 kB<br>
> Cached:  Â  Â  Â  Â  Â  48732 kB<br>
> SwapCached:  Â  Â  Â  Â  Â  0 kB<br>
> Active:  Â  Â  Â  Â  Â  40940 kB<br>
> Inactive:  Â  Â  Â  Â  26728 kB<br>
> Active(anon):  Â  Â  17068 kB<br>
> Inactive(anon):  Â  Â 9316 kB<br>
> Active(file):  Â  Â  23872 kB<br>
> Inactive(file):  Â  17412 kB<br>
> Unevictable:  Â  Â  Â  9088 kB<br>
> Mlocked:  Â  Â  Â  Â  Â  Â  Â 0 kB<br>
> SwapTotal:  Â  Â  Â  Â  Â  Â 0 kB<br>
> SwapFree:  Â  Â  Â  Â  Â  Â  0 kB<br>
> Dirty:  Â  Â  Â  Â  Â  Â  Â  Â 0 kB<br>
> Writeback:  Â  Â  Â  Â  Â  Â 0 kB<br>
> AnonPages:  Â  Â  Â  Â 17008 kB<br>
> Mapped:  Â  Â  Â  Â  Â  21120 kB<br>
> Shmem:  Â  Â  Â  Â  Â  Â  9392 kB<br>
> Slab:  Â  Â  Â  Â  Â  Â  11956 kB<br>
> SReclaimable:  Â  Â  Â 6472 kB<br>
> SUnreclaim:  Â  Â  Â  Â 5484 kB<br>
> KernelStack:  Â  Â  Â  Â 560 kB<br>
> PageTables:  Â  Â  Â  Â 1384 kB<br>
> NFS_Unstable:  Â  Â  Â  Â  0 kB<br>
> Bounce:  Â  Â  Â  Â  Â  Â  Â  0 kB<br>
> WritebackTmp:  Â  Â  Â  Â  0 kB<br>
> CommitLimit:  Â  Â  Â 56976 kB<br>
> Committed_AS:  Â  Â 124224 kB<br>
> VmallocTotal:  Â  1957888 kB<br>
> VmallocUsed:  Â  Â  Â  Â  Â 0 kB<br>
> VmallocChunk:  Â  Â  Â  Â  0 kB<br>
> <br>
> Before:<br>
> dmesg<br>
>  Normal zone: 30720 pages, LIFO batch:7<br>
> pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768<br>
> pcpu-alloc: [0] 0<br>
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 30480<br>
> Kernel command line: console=ttyS4,115200n8 root=/dev/ram rw<br>
> PID hash table entries: 512 (order: -1, 2048 bytes)<br>
> Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)<br>
> Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)<br>
> Memory: 113644K/122880K available (4206K kernel code, 150K rwdata,<br>
> 860K rodata, 1024K init, 111K bss, 9236K reserved, 0K cma-reserved)<br>
> Virtual kernel memory layout:<br>
>  Â  vector  : 0xffff0000 - 0xffff1000  Â (  Â 4 kB)<br>
>  Â  fixmap  : 0xffc00000 - 0xfff00000  Â (3072 kB)<br>
>  Â  vmalloc : 0xc8000000 - 0xff800000  Â ( 888 MB)<br>
>  Â  lowmem  : 0xc0000000 - 0xc7800000  Â ( 120 MB)<br>
>  Â  Â  .text : 0xc0008000 - 0xc05f28ec  Â (6059 kB)<br>
>  Â  Â  .init : 0xc0600000 - 0xc0700000  Â (1024 kB)<br>
>  Â  Â  .data : 0xc0700000 - 0xc0725be8  Â ( 151 kB)<br>
>  Â  Â  Â .bss : 0xc0725be8 - 0xc0741a38  Â ( 112 kB)<br>
> <br>
> cat /proc/meminfo<br>
> MemTotal:  Â  Â  Â  Â 116224 kB<br>
> MemFree:  Â  Â  Â  Â  Â 35832 kB<br>
> MemAvailable:  Â  Â  76952 kB<br>
> Buffers:  Â  Â  Â  Â  Â  9596 kB<br>
> Cached:  Â  Â  Â  Â  Â  39776 kB<br>
> SwapCached:  Â  Â  Â  Â  Â  0 kB<br>
> Active:  Â  Â  Â  Â  Â  40516 kB<br>
> Inactive:  Â  Â  Â  Â  25432 kB<br>
> Active(anon):  Â  Â  17004 kB<br>
> Inactive(anon):  Â  Â 6968 kB<br>
> Active(file):  Â  Â  23512 kB<br>
> Inactive(file):  Â  18464 kB<br>
> Unevictable:  Â  Â  Â  Â  Â 0 kB<br>
> Mlocked:  Â  Â  Â  Â  Â  Â  Â 0 kB<br>
> SwapTotal:  Â  Â  Â  Â  Â  Â 0 kB<br>
> SwapFree:  Â  Â  Â  Â  Â  Â  0 kB<br>
> Dirty:  Â  Â  Â  Â  Â  Â  Â  Â 0 kB<br>
> Writeback:  Â  Â  Â  Â  Â  Â 0 kB<br>
> AnonPages:  Â  Â  Â  Â 16588 kB<br>
> Mapped:  Â  Â  Â  Â  Â  20064 kB<br>
> Shmem:  Â  Â  Â  Â  Â  Â  7396 kB<br>
> Slab:  Â  Â  Â  Â  Â  Â  Â 9424 kB<br>
> SReclaimable:  Â  Â  Â 4532 kB<br>
> SUnreclaim:  Â  Â  Â  Â 4892 kB<br>
> KernelStack:  Â  Â  Â  Â 720 kB<br>
> PageTables:  Â  Â  Â  Â 1328 kB<br>
> NFS_Unstable:  Â  Â  Â  Â  0 kB<br>
> Bounce:  Â  Â  Â  Â  Â  Â  Â  0 kB<br>
> WritebackTmp:  Â  Â  Â  Â  0 kB<br>
> CommitLimit:  Â  Â  Â 58112 kB<br>
> Committed_AS:  Â  Â 142324 kB<br>
> VmallocTotal:  Â  Â 909312 kB<br>
> VmallocUsed:  Â  Â  Â  Â  Â 0 kB<br>
> VmallocChunk:  Â  Â  Â  Â  0 kB<br>
> <br>
> This matters for a few reasons:<br>
> 1) my memory chip is too small to be practical and I need all the<br>
> bytes I can get.<br>
> 2) I need at least 32MiB to load a new firmware image.<br>
> <br>
> I dropped all the python except the mapper, and I dropped the newer<br>
> daemons from my build to clear out that difference.  It was originally<br>
> about 16MiB difference, so I was thinking that something is now being<br>
> mapped by default that wasn't before, such as part of a flash image.<br>
> <br>
> Patrick<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Kun</div></div></div>