| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This limit can be used to let erts_alloc know that it should
use MADV_FREE on any pages within a carrier that are currently
unused.
Before this change we have tried to have this as default, but that
caused performance issues as carriers oscillated in and out of the
migration pool. So in 25 we decided to remove it. However, this caused
MemAvailable from /proc/memory to become significantly lower and thus
machines that have a tight memory budget need this option.
So the solution is to add a new config option where the user can set
at which utilization limit that free pages in a carrier should be placed
in MemAvailable.
The option is by default set to 0, to mimic the behaviour of OTP 25.
|
| |
|
| |
|
|
|
|
| |
From 256kb to 16kb.
|
|
|
|
|
| |
Don't think instance 0 of ets_alloc is ever used,
at least ets_SUITE never used it.
|
|
|
|
| |
Don't even know what the original meaning was.
|
| |
|
|\
| |
| |
| |
| | |
* rickard/small-memory-build-fix/OTP-16939:
Fix SMALL_MEMORY build
|
| | |
|
|\ \
| |/
| |
| |
| | |
* rickard/carrier-pools/OTP-16856:
Multiple carrier pools
|
| | |
|
| |
| |
| |
| |
| | |
This broke when refactoring carrier statistics to allow
cross-carrier migration.
|
|\ \
| |/
| |
| |
| | |
* maint:
Update copyright year
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Now that carriers can migrate freely, a binary allocator may find
itself responsible for a bunch of heap fragments. We used to
present such blocks as if they were still in the pool ("foreign
blocks") but it was a bit too counter-intuitive.
This commit presents all blocks on the allocator that employs their
carrier, regardless of their type.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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 <dmytro.lytovchenko@erlang-solutions.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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
|