]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
build/ops: rpm: override %_smp_mflags if not enough memory
authorNathan Cutler <ncutler@suse.com>
Thu, 19 May 2016 18:03:29 +0000 (20:03 +0200)
committerNathan Cutler <ncutler@suse.com>
Wed, 24 Jan 2018 22:20:56 +0000 (23:20 +0100)
commit0cf627b4e305f5cbaf53e3f10209092b7bd77c1b
treedd6582a60178b14d21aa2cbd7e0ddeacded97d0e
parent353ff677807c7f15b01ef45132b197b277509943
build/ops: rpm: override %_smp_mflags if not enough memory

Sometimes the build machine has lots of processor cores and not enough
memory to successfully build Ceph on all of them at once. Calculate
how many parallel build processes we can sustain with the memory we
have and set a lower build parallelism if necessary. Never exceed
the value set by %_smp_mflags even if memory is aplenty.

Credits to Tomáš Chvátal for the original idea and implementation.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
ceph.spec.in