AGESA is a very heavy beast, at over one and a half million lines of
code. Although contributions to the AGESA codebase (boards and
supporting chipset/cpu code) have slowed down significantly over the
years, we still rebuild this behemoth for every version of a patch.
This causes quite a bit of strain on our build infrastructure, and even
with an army of four state-of-the art build machines, some people (wink,
wink, Martin) are concerned with long patch trains and verification
times. I can't speak for other machines, but after replacement hardware
costs, flying in, and a lost day of work, I've realized that maintaining
this infrastructure is not cheap.
This made me think if we can make more efficient use of the
infrastructure we have available today, and allow builders to use
less-powerful machines without increased latency.
I've run a few timing tests without AGESA being built, and took
historical data to compare build times for when AGESA is included in the
build.
>From averaging build times on nuclearis2, with a primed page cache and
ccache a compete abuild run takes on average, five to six minutes. A
build without a useful ccache cache takes around fifteen to twenty
minutes (I don't have a reliable way of timing this, hence the high
variance).
Now, if we build a tree without AGESA, we get the following:
First run:
[mrnuke@nuclearis2 coreboot]$ ccache -C #clear ccache
[mrnuke@nuclearis2 coreboot]$ time CPUS=12 make what-jenkins-does
real 6m46.778s
Second run:
[mrnuke@nuclearis2 coreboot]$ time CPUS=12 make what-jenkins-does
real 2m7.889s
7 min vs 20 min on empty ccache, and 2 min vs 6 min on primed ccache.
Those are speedups of 2x to 3x. Also note that the local builds were not
done on a tmpfs, like the actual jenkins builds. I expect similar
speedups on the other builders.
The obvious solution is to separate AGESA into its branch. Patch trains
from google and other contributions to non-AGESA code gain a 2x to 3x
speedup in server time, while users of AGESA can continue to contribute
and work on the codebase.
Of course, the AGESA branch would also have the non-AGESA boards and
code trimmed so as to make efficient use of the server resources. There
is some common code, and overlap between the two code paths, but it
doesn't seem to be anywhere near as significant as the behemoth that
AGESA is.
Since 4.2 was just released, we can do this today without much fanare.
This also allows other people to donate CPU cycles without needing to
own over-priced server-class machines, and without increasing the
verification latency (compared to the one today).
To anyone saying that putting code in a branch is a death sentence,
please don't treat this as TL;DR and read the above paragraphs.
Alex