<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/pkgcache.cc, branch 2.5.2</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.5.2</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.5.2'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-10-19T16:25:51Z</updated>
<entry>
<title>Invalidate cached architecture list when building cache</title>
<updated>2021-10-19T16:25:51Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-10-19T16:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=307912e8d74d9684875a791b0550c10afc14b0b0'/>
<id>urn:sha1:307912e8d74d9684875a791b0550c10afc14b0b0</id>
<content type='text'>
Fix a regression in python-apt where switching the architectures
in the config between cache invocations regressed.

Regression-Of: 8ff4e226af55a9feb168477a2b1a99f9c5152e54
Gbp-Dch: full
</content>
</entry>
<entry>
<title>All pkgCaches are MultiArch caches</title>
<updated>2021-09-04T13:35:15Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-09-04T11:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8ff4e226af55a9feb168477a2b1a99f9c5152e54'/>
<id>urn:sha1:8ff4e226af55a9feb168477a2b1a99f9c5152e54</id>
<content type='text'>
Back in 2015 the code inside libapt who was using this field was dropped
as even if we are on a system which is not configured for MultiArch,
there are still edge cases in which the cache can include very foreign
packages, so any assumption you could make thinking only a single
architecture will be in the cache is probably wrong.

Maintaining two different codepaths for Multi- and SingleArch is likely
not very beneficial for code and users alike and is surprisingly hard to
answer correctly and becoming even harder still, so always assuming the
"worst case" seems like the far better option.

References: 6c9937da76b9155d166092b9dda22d06200510c1
</content>
</entry>
<entry>
<title>Free XXH3 state to avoid leak in cache hashing</title>
<updated>2021-02-03T16:36:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-02-03T09:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=cd1f75854824b3db7ba86039463528f834a0838a'/>
<id>urn:sha1:cd1f75854824b3db7ba86039463528f834a0838a</id>
<content type='text'>
We do this once (usually), so the leak is tremendously big, but it is
detected as a leak by the fuzzer and trips it up.
</content>
</entry>
<entry>
<title>Unroll pkgCache::sHash 8 time, break up dependency</title>
<updated>2020-12-15T21:13:12Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-15T19:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c6d40932f81edc656bbcc8dbd9d277aba543bc5b'/>
<id>urn:sha1:c6d40932f81edc656bbcc8dbd9d277aba543bc5b</id>
<content type='text'>
Unroll pkgCache::sHash 8 times and break up the dependency between
the iterations by expanding the calculation
    H(n) = 33 * H(n-1) + c
8 times rather than performing it 8 times. This seems to yield about
a 0.4% performance improvement.

I tried unrolling 4 and 2 bytes as well, those only having 3 ifs at
the end rather than 1 small loop; but that was actually slower -
potentially the code got to large and the cache went bonkers.

I also tried unrolling 4 times instead of 8, thinking that smaller
code might yield better results overall then, but that was slower as
well.
</content>
</entry>
<entry>
<title>Use XXH3 for cache, hash table hashing</title>
<updated>2020-12-15T12:47:22Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-13T20:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1460eebf2abe913df964e031eff081a57f043697'/>
<id>urn:sha1:1460eebf2abe913df964e031eff081a57f043697</id>
<content type='text'>
XXH3 is faster than both our CRC32c implementation as well
as DJB hash for hash table hashing, so meh, let's switch to
it.
</content>
</entry>
<entry>
<title>Raise APT::Cache-HashtableSize to 196613</title>
<updated>2020-12-10T14:40:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-08T10:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=07808e0d08e8e95e06b754f4c37665015b1045a7'/>
<id>urn:sha1:07808e0d08e8e95e06b754f4c37665015b1045a7</id>
<content type='text'>
We now have over 100k package names, my Ubuntu system has 125k
arleady, so increase the hash table size to match, this will cost
us about a MB in cache size, but give a very nice speed up somewhere
around 3%-4% or so.
</content>
</entry>
<entry>
<title>Allow FMV SSE4.2 detection to succeed on clang</title>
<updated>2020-05-25T10:05:00Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-21T20:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=574249cd721a3cdbb79b6e457384a55827856b6a'/>
<id>urn:sha1:574249cd721a3cdbb79b6e457384a55827856b6a</id>
<content type='text'>
As the builtins were used in the feature test also in the default branch
clang fails to compile the test helpfully complaining that you need to
compile with sse4.2 to use that while on gcc it is optimized out as
unused code and produces only a warning for that… removing the code from
the default branch fixes this problem, but we adapt the code some more to
avoid compilers optimizing it out in the future just in case.
</content>
</entry>
<entry>
<title>Make map_pointer&lt;T&gt; typesafe</title>
<updated>2020-02-24T17:29:07Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-02-24T16:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4fad7262291a8af1415fb9a3693678bd9610f0d6'/>
<id>urn:sha1:4fad7262291a8af1415fb9a3693678bd9610f0d6</id>
<content type='text'>
Instead of just using uint32_t, which would allow you to
assign e.g. a map_pointer&lt;Version&gt; to a map_pointer&lt;Package&gt;,
use our own smarter struct that has strict type checking.

We allow creating a map_pointer from a nullptr, and we allow
comparing map_pointer to nullptr, which also deals with comparisons
against 0 which are often used, as 0 will be implictly converted
to nullptr.
</content>
</entry>
<entry>
<title>pkgcache.cc: Mix PACKAGE_VERSION into the cache hash</title>
<updated>2020-01-16T17:21:20Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-16T17:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=25353dc6646e5b9fff55059a5c85183589cf472d'/>
<id>urn:sha1:25353dc6646e5b9fff55059a5c85183589cf472d</id>
<content type='text'>
This ensures that caches build with one version can't be
opened with another, which makes sense. It's a temporary
approach until we can replace major:minor fields with
a version string.

For example, this would have prevented 1.9.7 from using
broken caches from 1.9.6.
</content>
</entry>
<entry>
<title>Rename _count() macro to APT_ARRAY_SIZE()</title>
<updated>2020-01-07T21:51:41Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-07T21:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=df4b92bd1df204e7fb0d22e73e143d205d74aea6'/>
<id>urn:sha1:df4b92bd1df204e7fb0d22e73e143d205d74aea6</id>
<content type='text'>
</content>
</entry>
</feed>
