<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ci, branch v2.19.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.19.4</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.19.4'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2018-08-22T18:17:05Z</updated>
<entry>
<title>Merge branch 'nd/pack-deltify-regression-fix'</title>
<updated>2018-08-22T18:17:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-22T18:17:05Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=29d9e3e2c47dd4b5053b0a98c891878d398463e3'/>
<id>urn:sha1:29d9e3e2c47dd4b5053b0a98c891878d398463e3</id>
<content type='text'>
In a recent update in 2.18 era, "git pack-objects" started
producing a larger than necessary packfiles by missing
opportunities to use large deltas.

* nd/pack-deltify-regression-fix:
  pack-objects: fix performance issues on packing large deltas
</content>
</entry>
<entry>
<title>Merge branch 'sg/travis-retrieve-trash-upon-failure'</title>
<updated>2018-08-15T22:08:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-15T22:08:28Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6be44b59fc5e957b9d6e25b32b0fc38c45d50f3f'/>
<id>urn:sha1:6be44b59fc5e957b9d6e25b32b0fc38c45d50f3f</id>
<content type='text'>
The Travis CI scripts were taught to ship back the test data from
failed tests.

* sg/travis-retrieve-trash-upon-failure:
  travis-ci: include the trash directories of failed tests in the trace log
</content>
</entry>
<entry>
<title>travis-ci: include the trash directories of failed tests in the trace log</title>
<updated>2018-08-01T16:59:36Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-07-31T22:56:12Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=aea8879a6ac54dd3bc552812061130d0ff451cc2'/>
<id>urn:sha1:aea8879a6ac54dd3bc552812061130d0ff451cc2</id>
<content type='text'>
The trash directory of a failed test might contain invaluable
information about the cause of the failure, but we have no access to
the trash directories of Travis CI build jobs.  The only feedback we
get from there is the build job's trace log, so...

Modify 'ci/print-test-failures.sh' to create a tar.gz archive of the
trash directory of each failed test, encode that archive with base64,
and print the resulting block of ASCII text, so it gets embedded in
the trace log.  Furthermore, run tests with '--immediate' to
faithfully preserve the failed state.

Extracting the trash directories from the trace log turned out to be a
bit of a hassle, partly because of the size of these logs (usually
resulting in several hundreds or even thousands of lines of
base64-encoded text), and partly because these logs have CRLF, CRCRLF
and occasionally even CRCRCRLF line endings, which cause 'base64 -d'
from coreutils to complain about "invalid input".  For convenience add
a small script 'ci/util/extract-trash-dirs.sh', which will extract and
unpack all base64-encoded trash directories embedded in the log fed to
its standard input, and include an example command to be copy-pasted
into a terminal to do it all at the end of the failure report.

A few of our tests create sizeable trash directories, so limit the
size of each included base64-encoded block, let's say, to 1MB.  And
just in case something fundamental gets broken and a lot of tests fail
at once, don't include trash directories when the combined size of the
included base64-encoded blocks would exceed 1MB.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: fail if Coccinelle static analysis found something to transform</title>
<updated>2018-07-23T19:08:38Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-07-23T13:02:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0860a7641bae520beceb708b072e0efab197fe9a'/>
<id>urn:sha1:0860a7641bae520beceb708b072e0efab197fe9a</id>
<content type='text'>
Coccinelle's and in turn 'make coccicheck's exit code only indicates
that Coccinelle managed to finish its analysis without any errors
(e.g. no unknown --options, no missing files, no syntax errors in the
semantic patches, etc.), but it doesn't indicate whether it found any
undesired code patterns to transform or not.  To find out the latter,
one has to look closer at 'make coccicheck's standard output and look
for lines like:

  SPATCH result: contrib/coccinelle/&lt;something&gt;.cocci.patch

And this only indicates that there is something to transform, but to
see what the suggested transformations are one has to actually look
into those '*.cocci.patch' files.

This makes the automated static analysis build job on Travis CI not
particularly useful, because it neither draws our attention to
Coccinelle's findings, nor shows the actual findings.  Consequently,
new topics introducing undesired code patterns graduated to master
on several occasions without anyone noticing.

The only way to draw attention in such an automated setting is to fail
the build job.  Therefore, modify the 'ci/run-static-analysis.sh'
build script to check all the resulting '*.cocci.patch' files, and
fail the build job if any of them turns out to be not empty.  Include
those files' contents, i.e. Coccinelle's suggested transformations, in
the build job's trace log, so we'll know why it failed.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: run Coccinelle static analysis with two parallel jobs</title>
<updated>2018-07-23T19:08:36Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-07-23T13:02:29Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4ab8d1af336ed1a8547ee773149bec8a31a9941c'/>
<id>urn:sha1:4ab8d1af336ed1a8547ee773149bec8a31a9941c</id>
<content type='text'>
Currently the static analysis build job runs Coccinelle using a single
'make' job.  Using two parallel jobs cuts down the build job's run
time from around 10-12mins to 6-7mins, sometimes even under 6mins
(there is quite large variation between build job runtimes).  More
than two parallel jobs don't seem to bring further runtime benefits.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-objects: fix performance issues on packing large deltas</title>
<updated>2018-07-23T17:21:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-07-22T08:04:21Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9ac3f0e5b3e4cebe5bc9a24e3adef8b8e64fe692'/>
<id>urn:sha1:9ac3f0e5b3e4cebe5bc9a24e3adef8b8e64fe692</id>
<content type='text'>
Let's start with some background about oe_delta_size() and
oe_set_delta_size(). If you already know, skip the next paragraph.

These two are added in 0aca34e826 (pack-objects: shrink delta_size
field in struct object_entry - 2018-04-14) to help reduce 'struct
object_entry' size. The delta size field in this struct is reduced to
only contain max 1MB. So if any new delta is produced and larger than
1MB, it's dropped because we can't really save such a large size
anywhere. Fallback is provided in case existing packfiles already have
large deltas, then we can retrieve it from the pack.

While this should help small machines repacking large repos without
large deltas (i.e. less memory pressure), dropping large deltas during
the delta selection process could end up with worse pack files. And if
existing packfiles already have &gt;1MB delta and pack-objects is
instructed to not reuse deltas, all of them will be dropped on the
floor, and the resulting pack would be definitely bigger.

There is also a regression in terms of CPU/IO if we have large on-disk
deltas because fallback code needs to parse the pack every time the
delta size is needed and just access to the mmap'd pack data is enough
for extra page faults when memory is under pressure.

Both of these issues were reported on the mailing list. Here's some
numbers for comparison.

    Version  Pack (MB)  MaxRSS(kB)  Time (s)
    -------  ---------  ----------  --------
     2.17.0     5498     43513628    2494.85
     2.18.0    10531     40449596    4168.94

This patch provides a better fallback that is

- cheaper in terms of cpu and io because we won't have to read
  existing pack files as much

- better in terms of pack size because the pack heuristics is back to
  2.17.0 time, we do not drop large deltas at all

If we encounter any delta (on-disk or created during try_delta phase)
that is larger than the 1MB limit, we stop using delta_size_ field for
this because it can't contain such size anyway. A new array of delta
size is dynamically allocated and can hold all the deltas that 2.17.0
can. This array only contains delta sizes that delta_size_ can't
contain.

With this, we do not have to drop deltas in try_delta() anymore. Of
course the downside is we use slightly more memory, even compared to
2.17.0. But since this is considered an uncommon case, a bit more
memory consumption should not be a problem.

Delta size limit is also raised from 1MB to 16MB to better cover
common case and avoid that extra memory consumption (99.999% deltas in
this reported repo are under 12MB; Jeff noted binary artifacts topped
out at about 3MB in some other private repos). Other fields are
shuffled around to keep this struct packed tight. We don't use more
memory in common case even with this limit update.

A note about thread synchronization. Since this code can be run in
parallel during delta searching phase, we need a mutex. The realloc
part in packlist_alloc() is not protected because it only happens
during the object counting phase, which is always single-threaded.

Access to e-&gt;delta_size_ (and by extension
pack-&gt;delta_size[e - pack-&gt;objects]) is unprotected as before, the
thread scheduler in pack-objects must make sure "e" is never updated
by two different threads.

The area under the new lock is as small as possible, avoiding locking
at all in common case, since lock contention with high thread count
could be expensive (most blobs are small enough that delta compute
time is short and we end up taking the lock very often). The previous
attempt to always hold a lock in oe_delta_size() and
oe_set_delta_size() increases execution time by 33% when repacking
linux.git with with 40 threads.

Reported-by: Elijah Newren &lt;newren@gmail.com&gt;
Helped-by: Elijah Newren &lt;newren@gmail.com&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/travis-gcc-8'</title>
<updated>2018-05-30T05:04:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-30T05:04:08Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6105fee3fd7002c7e51932540f723b02885a84e5'/>
<id>urn:sha1:6105fee3fd7002c7e51932540f723b02885a84e5</id>
<content type='text'>
Developer support.  Use newer GCC on one of the builds done at
TravisCI.org to get more warnings and errors diagnosed.

* nd/travis-gcc-8:
  travis-ci: run gcc-8 on linux-gcc jobs
</content>
</entry>
<entry>
<title>travis-ci: run gcc-8 on linux-gcc jobs</title>
<updated>2018-05-21T05:14:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-19T04:32:34Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=37fa4b3c78f465a53a5e4c6af86255be317cbfda'/>
<id>urn:sha1:37fa4b3c78f465a53a5e4c6af86255be317cbfda</id>
<content type='text'>
Switch from gcc-4.8 to gcc-8. Newer compilers come with more warning
checks (usually in -Wextra).  Since -Wextra is enabled in developer
mode (which is also enabled in travis), this lets travis report more
warnings before other people do it.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ci: exercise the whole test suite with uncommon code in pack-objects</title>
<updated>2018-04-16T03:38:59Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-04-14T15:35:13Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f6a5576d521693963092dd69355d8e96ecd73635'/>
<id>urn:sha1:f6a5576d521693963092dd69355d8e96ecd73635</id>
<content type='text'>
Some recent optimizations have been added to pack-objects to reduce
memory usage and some code paths are split into two: one for common
use cases and one for rare ones. Make sure the rare cases are tested
with Travis since it requires manual test configuration that is
unlikely to be done by developers.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache.c: make $GIT_TEST_SPLIT_INDEX boolean</title>
<updated>2018-04-16T03:38:58Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-04-14T15:34:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4c2db93807f5ab65976a901b562e4bc8d69d40bf'/>
<id>urn:sha1:4c2db93807f5ab65976a901b562e4bc8d69d40bf</id>
<content type='text'>
While at there, document about this special mode when running the test
suite.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
