<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/contrib/jemalloc, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-12-18T10:09:21Z</updated>
<entry>
<title>Fix abort in jemalloc extent coalescing.</title>
<updated>2020-12-18T10:09:21Z</updated>
<author>
<name>Marcin Wojtas</name>
<email>mw@FreeBSD.org</email>
</author>
<published>2020-12-18T10:09:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=b62ae61446ee19ab524fea4a066f585cbd7aa727'/>
<id>urn:sha1:b62ae61446ee19ab524fea4a066f585cbd7aa727</id>
<content type='text'>
Fix error in extent_try_coalesce_impl(), which could cause abort
to happen when trying to coalesce extents backwards. The error could
happen because of how extent_before_get() function works. This function
gets address of previous extent, by subtracting page size from current
extent address. If current extent is located at PAGE_SIZE offset, this
address resolved to 0x0000. An assertion in rtree_leaf_elm_lookup
then caused the running program to abort.

This problem was discovered when trying to build world on 32-bit
machines with ASLR and PIE enabled. The problem was encountered
on armv7 and i386 machines, but most likely other 32-bit
architectures are affected as well.

While this patch fixes one problem with buildworld on 32-bit platforms
with ASLR, the build still fails, however it happens much later
and due to lack of memory.

The change is aligned with accepted fix in the upstream Jemalloc
repository (https://github.com/jemalloc/jemalloc/pull/1973).
As it doesn't apply on top of Jemalloc tree, its updated version
was eventually merged: https://github.com/jemalloc/jemalloc/pull/2003

PR: 249937
Submitted by: Dawid Gorecki &lt;dgr@semihalf.com&gt;
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D27025
</content>
</entry>
<entry>
<title>Turn MALLOC_PRODUCTION into a regular src.conf(5) option</title>
<updated>2020-09-05T23:30:17Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2020-09-05T23:30:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=7d4374f65f7b3df3d2567029c510f2e1576f0f69'/>
<id>urn:sha1:7d4374f65f7b3df3d2567029c510f2e1576f0f69</id>
<content type='text'>
For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
been used to turn off potentially expensive debug checks and statistics
gathering in the implementation of malloc(3).

It seems more consistent to turn this into a regular src.conf(5) option,
e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
be toggled similar to any other source build option, and turned on or
off by default for e.g. stable branches.

Reviewed by:	imp, #manpages
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D26337
</content>
</entry>
<entry>
<title>Set LG_VADDR to 48 on RISC-V.</title>
<updated>2020-05-04T17:16:30Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2020-05-04T17:16:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=ea69bf7f5d1f3fcf2966a79ba80fbc8189f261e9'/>
<id>urn:sha1:ea69bf7f5d1f3fcf2966a79ba80fbc8189f261e9</id>
<content type='text'>
The Sv48 PTE format is the largest currently defined address space for
RISC-V. It makes no sense to define a larger size and doing so (at
least for 64-bits) forces rtrees down a slow path.

Reviewed by:	vangyzen, jhb, mhorne
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24658
</content>
</entry>
<entry>
<title>Update jemalloc to version 5.2.1</title>
<updated>2020-04-23T23:57:43Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2020-04-23T23:57:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=c5ad81420c495d1d5de04209b0ec4fcb435c322c'/>
<id>urn:sha1:c5ad81420c495d1d5de04209b0ec4fcb435c322c</id>
<content type='text'>
Revert r354606 to restore r354605.

Apply one line from jemalloc commit d01b425e5d1e1 in hash_x86_128()
to fix the build with gcc, which only allows a fallthrough attribute
to appear before a case or default label.

Submitted by:	jasone in r354605
Discussed with:	jasone
Reviewed by:	bdrewery
MFC after:	never, due to gcc 4.2.1
Relnotes:	yes
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D24522
</content>
</entry>
<entry>
<title>Make jemalloc(3) default to retain:true on 64-bit platforms,</title>
<updated>2020-03-31T13:48:06Z</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2020-03-31T13:48:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=568f01f6c3e51ef4b24abe532237081a35e585f6'/>
<id>urn:sha1:568f01f6c3e51ef4b24abe532237081a35e585f6</id>
<content type='text'>
like it already does on Linux and OSX.  This results in significantly
fewer calls to mmap(2).  This should result in a small reduction
in system CPU time and improved superpage usage.

Reviewed by:	markj
Tested by:	markj
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23874
</content>
</entry>
<entry>
<title>jemalloc: pick from upstream: Fix GCC-9.1 warning with macro GET_ARG_NUMERIC</title>
<updated>2019-12-21T02:44:38Z</updated>
<author>
<name>Ryan Libby</name>
<email>rlibby@FreeBSD.org</email>
</author>
<published>2019-12-21T02:44:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=79457a8ad150d784f6c02c5e65e8b75c6836e651'/>
<id>urn:sha1:79457a8ad150d784f6c02c5e65e8b75c6836e651</id>
<content type='text'>
Pick 2d6d099fed05b1509e81e54458516528bfbbf38d from upstream jemalloc:

    Fix GCC-9.1 warning with macro GET_ARG_NUMERIC

    GCC-9.1 reports following error when trying to compile file
    src/malloc_io.c and with CFLAGS='-Werror' :

    src/malloc_io.c: In function ‘malloc_vsnprintf’:
    src/malloc_io.c:369:2: error: case label value exceeds maximum value for type [-Werror]
      369 |  case '?' | 0x80:      \
          |  ^~~~
    src/malloc_io.c:581:5: note: in expansion of macro ‘GET_ARG_NUMERIC’
      581 |     GET_ARG_NUMERIC(val, 'p');
          |     ^~~~~~~~~~~~~~~
    ...
    &lt;snip&gt;
    cc1: all warnings being treated as errors
    make: *** [Makefile:388: src/malloc_io.sym.o] Error 1

    The warning is reported as by default the type 'char' is 'signed char'
    and or-ing 0x80 will turn the case label char negative which will be
    beyond the printable ascii range (0 - 127).

    The patch fixes this by explicitly casting the 'len' variable as
    unsigned char' inside the 'switch' statement so that value of
    expression " '?' | 0x80 " falls within the legal values of the
    variable 'len'.

Discussed with:	jasone (maintainer)
Sponsored by:	Dell EMC Isilon
</content>
</entry>
<entry>
<title>Revert r354605: Update jemalloc to version 5.2.1.</title>
<updated>2019-11-11T05:06:49Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2019-11-11T05:06:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=f2cb29075fe23559635c82963bfe1f1fd4e29620'/>
<id>urn:sha1:f2cb29075fe23559635c82963bfe1f1fd4e29620</id>
<content type='text'>
Compilation fails for non-llvm-based platforms.
</content>
</entry>
<entry>
<title>Update jemalloc to version 5.2.1.</title>
<updated>2019-11-11T03:27:14Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2019-11-11T03:27:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=e1c167d0190dfde72fa06350ef0049181cf79a4f'/>
<id>urn:sha1:e1c167d0190dfde72fa06350ef0049181cf79a4f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>realloc(x, 0) should not return NULL.</title>
<updated>2019-09-17T18:36:29Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-09-17T18:36:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0edc114ac0b998b06235da32bec24d55c10206cd'/>
<id>urn:sha1:0edc114ac0b998b06235da32bec24d55c10206cd</id>
<content type='text'>
See http://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_400.
Upstream jemalloc issue is opened by emaste at
https://github.com/jemalloc/jemalloc/issues/1629.

Reviewed by:	emaste
PR:	240456
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
DIfferential revision:	https://reviews.freebsd.org/D21632
</content>
</entry>
<entry>
<title>Pick 57553c3b1a5592dc4c03f3c6831d9b794e523865 from upstream:</title>
<updated>2018-11-14T13:06:48Z</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2018-11-14T13:06:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=d5aef6d6ca05d7d7d8aa53b410ecd6d63e18d083'/>
<id>urn:sha1:d5aef6d6ca05d7d7d8aa53b410ecd6d63e18d083</id>
<content type='text'>
    Avoid touching all pages in extent_recycle for debug build.

    We may have a large number of pages with *zero set (since they are populated on
    demand).  Only check the first page to avoid paging in all of them.

This makes it easy to compare performance with and without 'retain:true'.

Discussed with:	jasone
Obtained from:	Qi Wang &lt;interwq at gwu dot edu&gt;
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
</content>
</entry>
</feed>
