RPI3 swap experiments ["was killed: out of swap space" with: "v_free_count: 5439, v_inactive_count: 1"]

Mark Millard marklmi at yahoo.com
Wed Aug 22 01:07:18 UTC 2018


Just an FYI about lld being multi-threaded . . .

Mark Johnston pointed out to me something that I'd not noticed
about lld: by default it is multi-threaded ( --threads ) instead
of not ( --no-threads ). This apparently goes back to llvm40.
(I've been more compiler focused for powerpc family in my
experiments, where lld does not be work. So I'd not been
monitoring lld's details.)

I tried an example and it seems to create about 5 threads
in the context I tested it in.

With a -j4 buildworld buildkernel already keeping 4 cores
busy, I've decided to experiment with /etc/make.conf like
files having:

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

where so few cores (hw threads) are available. I my do so
more generally.

(If an lld was done in isolation, this likely would be
slower than with multiple threads.)

Also, I'm told that the threaded operation can require more
RAM. (I've no independent knowledge of such and my quick
experiments did not produce any stand-out results.)

It is possible that, for some contexts, --no-threads
might leave a little more free RAM and/or may cut down
on context-switching during some stages of buildworld
or kernel-toolchain or buildkernel or building ports.


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



More information about the freebsd-arm mailing list