<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>