Age | Commit message (Collapse) | Author |
|
|
|
|
|
This lets the OS reclaim the physical memory associated with these
blocks which reduces the impact of long-lived awkward allocations.
A small allocated block will still keep a huge carrier alive, but
the unused part of the carrier will now be available to the OS.
Co-authored-by: Dmytro Lytovchenko <[email protected]>
|
|
|
|
|
|
if configured for the allocator. This was not implemented
and pooled_tree always used address order first fit.
The "problem" was as a carrier can be part of both the pooled tree
(of its owner) and the allocation tree (of a foreign instance)
at the same time. Solved by duplicating 'birth_time' in both
AOFF_RBTree_t nodes for each carrier.
Blocks still cannot use age order and does not pay
any memory cost for birth_time.
|
|
This commit replaces the old memory instrumentation with a new
implementation that scans carriers instead of wrapping
erts_alloc/erts_free. The old implementation could not extract
information without halting the emulator, had considerable runtime
overhead, and the memory maps it produced were noisy and lacked
critical information.
Since the new implementation walks through existing data structures
there's no longer a need to start the emulator with special flags to
get information about carrier utilization/fragmentation. Memory
fragmentation is also easier to diagnose as it's presented on a
per-carrier basis which eliminates the need to account for "holes"
between mmap segments.
To help track allocations, each allocation can now be tagged with
what it is and who allocated it at the cost of one extra word per
allocation. This is controlled on a per-allocator basis with the
+M<S>atags option, and is enabled by default for binary_alloc and
driver_alloc (which is also used by NIFs).
|
|
Remove low memory need for HiPE on x86_64
|
|
|
|
into 'sverker/master/alloc-n-migration/ERIERL-88'
|
|
into 'sverker/maint-20/alloc-n-migration/ERIERL-88'
OTP-14915
OTP-14916
OTP-14917
OTP-14918
|
|
into 'sverker/maint-19/alloc-n-migration/ERIERL-88'
|
|
to change sbct limit in runtime for chosen allocator type.
With great power comes great responsibility.
|
|
acnl: Abandon Carrier Nr Limit
acfml: Abandon Carrier Free block Min Limit
|
|
similar to the ones in OTP-19.2.3.1
|
|
* Give back carrier to owner when put in pool with use of dd-queue.
* Replace pooled_list with pooled_tree for more efficient search
of all owned pooled carriers.
* Remove traitor_list as it does not serve much purpose anymore.
* Add HOMECOMING bit flag in crr->allctr atomic to
(1) avoid double enqueue into dd-enqueue.
(2) trigger read barrier in get_used_allctr for newly received carriers.
|
|
by adding a dedicated 'homecoming_dd_block' to use in dd-queue.
+ Preparation for dd-queue-migration of non-empty carriers.
+ Get rid of ugly hack where blk->carrier pointer is overwritten
by dd-queue and then have to be restored.
|
|
|
|
Besides being noisy, they were already defined by a global Unix-
specific header, causing the Windows build to fail if one forgot to
define them.
|
|
|
|
This refactor was done using the unifdef tool like this:
for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done
where defile contained:
#define ERTS_SMP 1
#define USE_THREADS 1
#define DDLL_SMP 1
#define ERTS_HAVE_SMP_EMU 1
#define SMP 1
#define ERL_BITS_REENTRANT 1
#define ERTS_USE_ASYNC_READY_Q 1
#define FDBLOCK 1
#undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
#define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0
#define ERTS_POLL_USE_WAKEUP_PIPE 1
#define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1
#undef ERTS_HAVE_PLAIN_EMU
#undef ERTS_SIGNAL_STATE
|
|
* john/erts/runtime-lcnt:
Document rt_mask and add warnings about copy_save
Add an emulator test suite for lock counting
Break erts_debug:lock_counters/1 into separate BIFs
Allow toggling lock counting at runtime
Move lock flags to a common header
Enable register_SUITE for lcnt builds
Enable lcnt smoke test on all builds that have lcnt enabled
Make lock counter info independent of the locks being counted
OTP-14412
OTP-13170
OTP-14413
|
|
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and
all categories are still enabled by default, but the actual counting can be
toggled at will.
OTP-13170
|
|
|
|
|
|
|
|
Instead of passing around a file descriptor
use a function pointer to facilitate more advanced
backend write logic such as size limitation or compression.
|
|
For non-amd64 it's a "normal" allocator with a
wrapper around mseg_alloc to call mprotect(PROT_EXEC).
|
|
|
|
on 32-bit, as the granularity of the literal bit vector
is super-alignment.
|
|
Make the callbacks more general to be usable for any allocator
that that uses its own ErtsMemMapper.
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
* carrier_create
* carrier_destroy
* carrier_pool_put
* carrier_pool_get
|
|
|
|
|
|
|
|
Problem #1 Goodfit was crippled by the fact that destroying_mbc()
was called _before_ the carriers was unlinked from mbc_list.
Problem #2 destroying_mbc() was called for carriers that later could be
resurrected from dc_list without a matching call to creating_mbc().
This was mostly a practical problem for the new test case
alloc_SUITE:migration that use the callbacks to create/destroy a mutex.
Solution:
destroying_mbc() is now only called just before a carrier is
destroyed (deallocated or put in mseg cache).
remove_mbc() is called both (like before) when inserted into cpool
but now also when last block is freed and mbc is scheduled for
destruction but may later be resurrected from dc_list.
|
|
And remove old case of using only page alignment (12 bits).
|
|
|
|
|
|
|
|
The switch "+Musac <boolean>" controls if sys_alloc carriers
are allowed.
|
|
|
|
rickard/aligned-sys_alloc-carriers_maint/OTP-11318
Conflicts:
erts/emulator/beam/erl_alloc.c
erts/emulator/beam/erl_alloc_util.c
erts/emulator/beam/erl_alloc_util.h
|
|
erts_sys_aligned_alloc() is currently implemented using posix_memalign if
it exist, or using _aligned_malloc on Windows.
If erts_sys_aligned_alloc() exist allocators will create sys_alloc
carriers similar to how this was done pre-R16.
|
|
|
|
|
|
|
|
|
|
A cleanup after SBMBC was removed.
|