Page MenuHomeFreeBSD

Move libsqlite3 to the top of the SUBDIR list
ClosedPublic

Authored by arichardson on Aug 24 2020, 11:55 AM.

Details

Summary

In parellel builds, this should allow sqlite to start building earlier and
increase parallelism when building lib/. Looking at htop output during
buildworld/tinderbox, there are long phases where only one CPU is active
optimizing the massive sqlite3.c file since the build of libsqlite3 is
started quite late.

It appears that bmake currently processes dependencies in order, but if
there is a way to force certain ones to be started first that would be less
fragile than this current approach.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

arichardson created this revision.

We might be able to do something with .ORDER instead.

Anyhow this change is fine with me unless @sjg has a better suggestion.

This revision is now accepted and ready to land.Aug 24 2020, 12:40 PM

We might be able to do something with .ORDER instead.

Anyhow this change is fine with me unless @sjg has a better suggestion.

I tried a small test makefile with .ORDER and it seems to serialize execution:

a:
	echo a
b:
	echo b
c:
	echo c
d:
	echo d
.ORDER: b a
all: d a b c

-> a is only started once b has completed.

--- d ---
--- b ---
--- c ---
--- d ---
echo d
d
--- b ---
echo b
b
--- c ---
echo c
c
--- a ---
echo a
a

Best way to get parallelism is to avoid tree walks.
Once system is pkg based, there should be a path to enabling that.

In D26169#581544, @sjg wrote:

Best way to get parallelism is to avoid tree walks.
Once system is pkg based, there should be a path to enabling that.

Does that mean this change is fine for now?

In D26169#581544, @sjg wrote:

Best way to get parallelism is to avoid tree walks.
Once system is pkg based, there should be a path to enabling that.

Does that mean this change is fine for now?

Yes, it not going to do any great harm anyway ;-)

This revision was automatically updated to reflect the committed changes.