]> code.ossystems Code Review - openembedded-core.git/commit
image_types.bbclass: Set memory usage limit and CPU threads for xz
authorKhem Raj <raj.khem@gmail.com>
Tue, 12 Feb 2019 05:47:54 +0000 (21:47 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Feb 2019 11:20:06 +0000 (11:20 +0000)
commit28b277a93a34bba033d9d0d9f3227c9453efd384
tree88be773f16a3d5e0ec337d9da6e17fa21ccb9e96
parent1387cc56461ee51c5fd49ba22088710c5b6a652b
image_types.bbclass: Set memory usage limit and CPU threads for xz

when building with opkg backend and huge packages e.g. chromium/llvm all
going in parallel, memory pressure causes xz to catapult with

do_package_write_ipk: Failed to create package, opkg-build failed with: xz: (stdin): Cannot allocate memory

since there are many tasks going on in parallel, xz adds to memory pressure
and it wants it all, put an upper limit for memory xz can use

We add a variable XZ_MAXRAM with 30% of RAM limit and can be customized
if builders have more memory one can set it like

XZ_DEFAULTS = "-M 0 -T 0"

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image_types.bbclass
meta/classes/package_ipk.bbclass
meta/classes/populate_sdk_base.bbclass
meta/conf/bitbake.conf