Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2018 21:45:26 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        Ronald Klop <ronald-lists@klop.ws>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: ld.lld goes out of memory
Message-ID:  <6EB261C2-7B9F-43CD-95A0-1B6D82E70868@yahoo.com>
In-Reply-To: <CAPyFy2BKk0on6Dwj7MYhiu5K%2BMjOEhMg1VsM8GbPnCZ0gkCKQg@mail.gmail.com>
References:  <op.zsz1brvbkndu52@sjakie> <CAPyFy2BKk0on6Dwj7MYhiu5K%2BMjOEhMg1VsM8GbPnCZ0gkCKQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-Nov-24, at 19:35, Ed Maste <emaste at reebsd.org> wrote:

> On Sat, 24 Nov 2018 at 14:49, Ronald Klop <ronald-lists@klop.ws> wrote:
>> 
>> Hello,
>> 
>> While compiling databases/mongodb34 on my RPI3B+ 12.0-RC1/arm64 ld.lld
>> fails often because of 'out of swap' or other issues about memory
>> shortage. Is this something others experience on "low memory" machines?
>> ...
>> -bool lld::ThreadsEnabled = true;
>> +bool lld::ThreadsEnabled = false;
> 
> Note that lld has a --no-threads flag that should achieve the same
> thing without a compile-time change.

When I looked into it earlier I did not find a ports
equivalent of the buildworld buildkernel global
control via, say,

LDFLAGS.lld+=-Wl,--no-threads

The binutils linkers will not tolerate the option. So
it ends up being a port-by-port adjustment as far as
I could tell.

It need not be just low memory machines: for N
cpus, in FreeBSD terms, lld with threads enabled
adds N+1 threads (not counting main's thread: N+2
total). If several lld's run at once it can get to
be a lot of threads at once in a poudriere run.
I've observed this fanout on a 32-hardware thread
context, so 34 threads for one lld, counting the
main thread. And at times I've had several compiler
toolchains building at once with multiple lld's
running at once. (But I did happen to have
sufficient RAM for what happened.)


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6EB261C2-7B9F-43CD-95A0-1B6D82E70868>