From 663d33e9362c432fd2757b5dbf8950ba458e0add Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Tue, 3 Jun 2025 15:17:21 +0200 Subject: [PATCH] Downgraded MxTasking --- repos/ealanos/src/lib/mx/LICENSE | 22 - repos/ealanos/src/lib/mx/README.md | 69 +- repos/ealanos/src/lib/mx/io/network/config.h | 9 - .../ealanos/src/lib/mx/io/network/server.cpp | 153 --- repos/ealanos/src/lib/mx/io/network/server.d | 662 ------------ repos/ealanos/src/lib/mx/io/network/server.h | 76 -- repos/ealanos/src/lib/mx/memory/config.h | 12 +- .../lib/mx/memory/dynamic_size_allocator.cpp | 58 +- .../lib/mx/memory/dynamic_size_allocator.d | 211 +--- .../lib/mx/memory/dynamic_size_allocator.h | 5 +- .../src/lib/mx/memory/fixed_size_allocator.h | 183 ++-- repos/ealanos/src/lib/mx/memory/global_heap.h | 35 +- .../mx/memory/reclamation/epoch_manager.cpp | 30 +- .../lib/mx/memory/reclamation/epoch_manager.d | 584 ++++------ .../lib/mx/memory/reclamation/epoch_manager.h | 41 +- repos/ealanos/src/lib/mx/memory/tagged_ptr.h | 10 +- .../lib/mx/memory/task_allocator_interface.h | 30 +- .../worker_local_dynamic_size_allocator.cpp | 433 -------- .../worker_local_dynamic_size_allocator.h | 345 ------ .../src/lib/mx/queue/dynamic_ringpuffer.h | 39 - repos/ealanos/src/lib/mx/queue/list.h | 149 --- .../ealanos/src/lib/mx/queue/priority_queue.h | 49 - .../ealanos/src/lib/mx/resource/annotation.h | 146 --- repos/ealanos/src/lib/mx/resource/builder.cpp | 56 +- repos/ealanos/src/lib/mx/resource/builder.d | 395 +++---- repos/ealanos/src/lib/mx/resource/builder.h | 91 +- repos/ealanos/src/lib/mx/resource/ptr.h | 99 -- repos/ealanos/src/lib/mx/resource/resource.h | 223 ++++ .../src/lib/mx/resource/resource_interface.h | 39 +- .../mx/synchronization/memory_transaction.h | 81 -- .../lib/mx/synchronization/optimistic_lock.h | 17 +- .../lib/mx/synchronization/primitive_matrix.h | 6 +- .../src/lib/mx/synchronization/rw_spinlock.h | 38 +- .../src/lib/mx/synchronization/spinlock.h | 14 +- .../lib/mx/synchronization/synchronization.h | 25 +- repos/ealanos/src/lib/mx/system/builtin.h | 11 +- repos/ealanos/src/lib/mx/system/cache.h | 258 +++-- repos/ealanos/src/lib/mx/system/cpu.h | 51 - .../ealanos/src/lib/mx/system/environment.cpp | 16 + repos/ealanos/src/lib/mx/system/environment.d | 290 +++++ repos/ealanos/src/lib/mx/system/environment.h | 121 ++- repos/ealanos/src/lib/mx/system/rdtscp.h | 35 - repos/ealanos/src/lib/mx/system/thread.h | 22 +- repos/ealanos/src/lib/mx/system/topology.h | 50 + repos/ealanos/src/lib/mx/tasking/README.md | 43 - repos/ealanos/src/lib/mx/tasking/annotation.h | 139 --- repos/ealanos/src/lib/mx/tasking/channel.h | 211 ++++ ...k_pool_occupancy.h => channel_occupancy.h} | 33 +- repos/ealanos/src/lib/mx/tasking/config.h | 68 +- .../src/lib/mx/tasking/dataflow/annotation.h | 97 -- .../lib/mx/tasking/dataflow/barrier_task.h | 44 - .../mx/tasking/dataflow/finalize_counter.h | 40 - .../src/lib/mx/tasking/dataflow/graph.h | 994 ------------------ .../src/lib/mx/tasking/dataflow/node.h | 134 --- .../src/lib/mx/tasking/dataflow/pipeline.h | 30 - .../src/lib/mx/tasking/dataflow/producer.h | 19 - .../src/lib/mx/tasking/dataflow/task_node.h | 149 --- .../src/lib/mx/tasking/dataflow/token.h | 58 - .../lib/mx/tasking/dataflow/token_generator.h | 18 - repos/ealanos/src/lib/mx/tasking/load.h | 24 +- .../src/lib/mx/tasking/prefetch_descriptor.h | 296 ------ .../src/lib/mx/tasking/prefetch_distance.h | 39 - .../src/lib/mx/tasking/prefetch_slot.cpp | 59 -- .../src/lib/mx/tasking/prefetch_slot.d | 197 ---- .../src/lib/mx/tasking/prefetch_slot.h | 929 +--------------- repos/ealanos/src/lib/mx/tasking/priority.h | 11 - .../mx/tasking/profiling/idle_profiler.cpp | 110 -- .../lib/mx/tasking/profiling/idle_profiler.d | 641 ----------- .../lib/mx/tasking/profiling/idle_profiler.h | 71 -- .../mx/tasking/profiling/profiling_task.cpp | 107 ++ .../profiling/profiling_task.d} | 657 ++++++------ .../lib/mx/tasking/profiling/profiling_task.h | 128 +++ .../src/lib/mx/tasking/profiling/statistic.h | 92 ++ .../lib/mx/tasking/profiling/task_counter.h | 171 --- .../lib/mx/tasking/profiling/task_tracer.cpp | 150 --- .../lib/mx/tasking/profiling/task_tracer.d | 161 --- .../lib/mx/tasking/profiling/task_tracer.h | 141 --- .../src/lib/mx/tasking/profiling/time.cpp | 69 -- .../src/lib/mx/tasking/profiling/time.d | 110 -- .../src/lib/mx/tasking/profiling/time.h | 131 --- repos/ealanos/src/lib/mx/tasking/runtime.h | 453 ++------ .../ealanos/src/lib/mx/tasking/scheduler.cpp | 388 +++---- repos/ealanos/src/lib/mx/tasking/scheduler.d | 611 +++++------ repos/ealanos/src/lib/mx/tasking/scheduler.h | 317 +++--- .../src/lib/mx/tasking/shared_task_queue.h | 32 - repos/ealanos/src/lib/mx/tasking/task.cpp | 35 +- repos/ealanos/src/lib/mx/tasking/task.d | 668 +++++------- repos/ealanos/src/lib/mx/tasking/task.h | 267 ++--- .../ealanos/src/lib/mx/tasking/task_buffer.h | 271 +---- .../src/lib/mx/tasking/task_cycle_sampler.h | 127 --- .../mx/tasking/task_execution_time_history.h | 92 -- repos/ealanos/src/lib/mx/tasking/task_pool.h | 107 -- .../ealanos/src/lib/mx/tasking/task_queues.h | 168 --- .../ealanos/src/lib/mx/tasking/task_squad.cpp | 42 - repos/ealanos/src/lib/mx/tasking/task_squad.d | 641 ----------- repos/ealanos/src/lib/mx/tasking/task_squad.h | 41 - repos/ealanos/src/lib/mx/tasking/task_stack.h | 50 +- repos/ealanos/src/lib/mx/tasking/worker.cpp | 377 ++++--- repos/ealanos/src/lib/mx/tasking/worker.d | 731 +++++-------- repos/ealanos/src/lib/mx/tasking/worker.h | 354 ++++++- repos/ealanos/src/lib/mx/util/aligned_t.h | 7 +- repos/ealanos/src/lib/mx/util/atomic.h | 61 ++ repos/ealanos/src/lib/mx/util/bit_alloc.h | 154 +++ repos/ealanos/src/lib/mx/util/bits.h | 14 + repos/ealanos/src/lib/mx/util/bits.old | 14 + .../bound_mpmc.h => util/bound_mpmc_queue.h} | 47 +- repos/ealanos/src/lib/mx/util/compiler.h | 26 + repos/ealanos/src/lib/mx/util/core_set.cpp | 65 +- repos/ealanos/src/lib/mx/util/core_set.d | 122 ++- repos/ealanos/src/lib/mx/util/core_set.h | 102 +- repos/ealanos/src/lib/mx/util/field_alloc.h | 56 + repos/ealanos/src/lib/mx/util/logger.h | 91 -- .../mx/{queue/mpsc.h => util/mpsc_queue.h} | 68 +- repos/ealanos/src/lib/mx/util/queue.h | 80 ++ repos/ealanos/src/lib/mx/util/queue_item.h | 27 + .../src/lib/mx/util/reference_counter.h | 30 +- repos/ealanos/src/lib/mx/util/split_counter.h | 46 - repos/ealanos/src/lib/mx/util/util.h | 33 + repos/ealanos/src/lib/mx/util/vector.h | 2 +- 119 files changed, 5058 insertions(+), 13419 deletions(-) delete mode 100644 repos/ealanos/src/lib/mx/LICENSE delete mode 100644 repos/ealanos/src/lib/mx/io/network/config.h delete mode 100644 repos/ealanos/src/lib/mx/io/network/server.cpp delete mode 100644 repos/ealanos/src/lib/mx/io/network/server.d delete mode 100644 repos/ealanos/src/lib/mx/io/network/server.h delete mode 100644 repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.cpp delete mode 100644 repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h delete mode 100644 repos/ealanos/src/lib/mx/queue/dynamic_ringpuffer.h delete mode 100644 repos/ealanos/src/lib/mx/queue/list.h delete mode 100644 repos/ealanos/src/lib/mx/queue/priority_queue.h delete mode 100644 repos/ealanos/src/lib/mx/resource/annotation.h delete mode 100644 repos/ealanos/src/lib/mx/resource/ptr.h create mode 100644 repos/ealanos/src/lib/mx/resource/resource.h delete mode 100644 repos/ealanos/src/lib/mx/synchronization/memory_transaction.h delete mode 100644 repos/ealanos/src/lib/mx/system/cpu.h create mode 100644 repos/ealanos/src/lib/mx/system/environment.cpp create mode 100644 repos/ealanos/src/lib/mx/system/environment.d delete mode 100644 repos/ealanos/src/lib/mx/system/rdtscp.h create mode 100644 repos/ealanos/src/lib/mx/system/topology.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/README.md delete mode 100644 repos/ealanos/src/lib/mx/tasking/annotation.h create mode 100644 repos/ealanos/src/lib/mx/tasking/channel.h rename repos/ealanos/src/lib/mx/tasking/{task_pool_occupancy.h => channel_occupancy.h} (52%) delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/annotation.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/barrier_task.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/finalize_counter.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/graph.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/node.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/pipeline.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/producer.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/task_node.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/token.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/dataflow/token_generator.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/prefetch_distance.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/prefetch_slot.cpp delete mode 100644 repos/ealanos/src/lib/mx/tasking/prefetch_slot.d delete mode 100644 repos/ealanos/src/lib/mx/tasking/priority.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.cpp delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.d delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h create mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.cpp rename repos/ealanos/src/lib/mx/{memory/worker_local_dynamic_size_allocator.d => tasking/profiling/profiling_task.d} (81%) create mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h create mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/statistic.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.cpp delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.d delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/time.cpp delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/time.d delete mode 100644 repos/ealanos/src/lib/mx/tasking/profiling/time.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/shared_task_queue.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_pool.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_queues.h delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_squad.cpp delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_squad.d delete mode 100644 repos/ealanos/src/lib/mx/tasking/task_squad.h create mode 100644 repos/ealanos/src/lib/mx/util/atomic.h create mode 100644 repos/ealanos/src/lib/mx/util/bit_alloc.h create mode 100644 repos/ealanos/src/lib/mx/util/bits.h create mode 100644 repos/ealanos/src/lib/mx/util/bits.old rename repos/ealanos/src/lib/mx/{queue/bound_mpmc.h => util/bound_mpmc_queue.h} (83%) create mode 100644 repos/ealanos/src/lib/mx/util/compiler.h create mode 100644 repos/ealanos/src/lib/mx/util/field_alloc.h delete mode 100644 repos/ealanos/src/lib/mx/util/logger.h rename repos/ealanos/src/lib/mx/{queue/mpsc.h => util/mpsc_queue.h} (62%) create mode 100644 repos/ealanos/src/lib/mx/util/queue.h create mode 100644 repos/ealanos/src/lib/mx/util/queue_item.h delete mode 100644 repos/ealanos/src/lib/mx/util/split_counter.h create mode 100644 repos/ealanos/src/lib/mx/util/util.h diff --git a/repos/ealanos/src/lib/mx/LICENSE b/repos/ealanos/src/lib/mx/LICENSE deleted file mode 100644 index aaf3a8504c..0000000000 --- a/repos/ealanos/src/lib/mx/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (C) 2025 Michael Müller -Copyright (c) 2023 Jan Mühlig - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/README.md b/repos/ealanos/src/lib/mx/README.md index 8d496f1055..abf86a4cab 100644 --- a/repos/ealanos/src/lib/mx/README.md +++ b/repos/ealanos/src/lib/mx/README.md @@ -1,33 +1,42 @@ -# MxTasking +# How to use `MxTasking` -The *MxTasking* lib implements the task engine. +## Build a simple _Hello World_ task +Every task inherits from `mx::tasking::TaskInterface` and implements the `execute` method, which is called when the task gets executed by the runtime. -## Structure -### Memory -The memory component can be found in the [memory](memory) folder. -It implements different memory allocators (the [fixed size allocator](memory/fixed_size_allocator.h) mainly for tasks with a static size and the [dynamic size allocator](memory/dynamic_size_allocator.h) for variable sized data objects). -Further, epoch-based memory reclamation is implemented by the [epoch manager](memory/reclamation/epoch_manager.h). - -### Queue -Different (task-) queues can be found in the [queue](queue) folder. -It provides -* a [non-synchronized single-core queue](queue/list.h) (for fast core-local dispatching), -* a [multi-producer single-consumer queue](queue/mpsc.h) (for dispatching tasks to remote cores), -* and a [(bound) multi-producer multi-consumer queue](queue/bound_mpmc.h) (mainly used for memory-reclamation). - -### Resource -The resource component can be found in the [resource](resource) folder. -This package encapsulates -* [annotations for resources](resource/annotation.h), -* the [resource builder](resource/builder.h) which creates and schedules resources, -* a [tagged pointer](resource/ptr.h) instance that links to resources including information (synchronization method and worker id), -* and the [resource interface](resource/resource_interface.h) that has to be implemented by each to synchronized resource. - -### Synchronization -The synchronization component can be found in the [synchronization](synchronization) folder. -This package provides different synchronization methods ([optimistic lock](synchronization/optimistic_lock.h), [rw lock](synchronization/rw_spinlock.h), [spinlock](synchronization/spinlock.h)) and [structures to define the required synchronization level](synchronization/synchronization.h). - -### Tasking -The tasking core can be found in the [tasking](tasking) folder. -For more information see the tasking-specific [readme](tasking/README.md). + #include + #include + class HelloWorldTask : public mx::tasking::TaskInterface + { + public: + HelloWorldTask() = default; + virtual ~HelloWorldTask() = default; + + virtual TaskInterface *execute(const std::uint16_t, const std::uint16_t) + { + std::cout << "Hello world from MxTasking!" << std::endl; + return nullptr; + } + }; + +## Run the _Hello World_ task + #include + + int main() + { + // Define which cores will be used (1 core here). + auto cores = mx::util::core_set::build(1); + + // Create an instance of the task with the current core as first + // parameter (we assume that we start at core 0). + auto *task = mx::tasking::runtime::new_task(0); + + // Create a runtime for the given cores. + mx::tasking::runtime_guard runtime { cores }; + + // Schedule the task. + mx::tasking::runtime::spawn(*task); + + // Will print: "Hello world from MxTasking!" + return 0; + } \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/io/network/config.h b/repos/ealanos/src/lib/mx/io/network/config.h deleted file mode 100644 index 6a6cea8046..0000000000 --- a/repos/ealanos/src/lib/mx/io/network/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -namespace mx::io::network { -class config -{ -public: - static constexpr auto max_connections() noexcept { return 64U; } -}; -} // namespace mx::io::network \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/io/network/server.cpp b/repos/ealanos/src/lib/mx/io/network/server.cpp deleted file mode 100644 index 47e3c5a5c1..0000000000 --- a/repos/ealanos/src/lib/mx/io/network/server.cpp +++ /dev/null @@ -1,153 +0,0 @@ -#include "server.h" -#include -#include -#include -#include -#include - -using namespace mx::io::network; - -Server::Server(std::unique_ptr &&message_handler, const std::uint16_t port, - const std::uint16_t count_channels) noexcept - : _port(port), _socket(-1), _client_sockets({0U}), _message_handler(std::move(message_handler)), - _count_channels(count_channels) -{ - this->_buffer.fill('\0'); -} -bool Server::listen() -{ - this->_socket = socket(AF_INET, SOCK_STREAM, 0); - if (this->_socket == 0) - { - return false; - } - - auto option = std::int32_t{1}; - if (setsockopt(this->_socket, SOL_SOCKET, SO_REUSEADDR, &option, socklen_t{sizeof(std::int32_t)}) < 0) - { - return false; - } - - auto address = sockaddr_in{}; - address.sin_family = AF_INET; - address.sin_addr.s_addr = INADDR_ANY; - address.sin_port = htons(this->_port); - - if (bind(this->_socket, reinterpret_cast(&address), sizeof(sockaddr_in)) < 0) - { - return false; - } - - if (::listen(this->_socket, 3) < 0) - { - return false; - } - - auto address_length = socklen_t{sizeof(sockaddr_in)}; - auto socket_descriptors = fd_set{}; - auto max_socket_descriptor = this->_socket; - auto client_socket = std::int32_t{-1}; - - while (this->_is_running) - { - FD_ZERO(&socket_descriptors); // NOLINT - FD_SET(this->_socket, &socket_descriptors); - - for (auto &socket_descriptor : this->_client_sockets) - { - if (socket_descriptor > 0) - { - FD_SET(socket_descriptor, &socket_descriptors); - } - - max_socket_descriptor = std::max(max_socket_descriptor, std::int32_t(socket_descriptor)); - } - - auto timeout = timeval{}; - timeout.tv_usec = 10000; - const auto count_ready_selectors = - select(max_socket_descriptor + 1, &socket_descriptors, nullptr, nullptr, &timeout); - - if (count_ready_selectors > 0) - { - if (FD_ISSET(this->_socket, &socket_descriptors)) - { - if ((client_socket = accept(this->_socket, reinterpret_cast(&address), &address_length)) < - 0) - { - return false; - } - - this->add_client(client_socket); - } - - for (auto i = 0U; i < this->_client_sockets.size(); ++i) - { - const auto client = this->_client_sockets[i]; - if (FD_ISSET(client, &socket_descriptors)) - { - const auto read_bytes = read(client, this->_buffer.data(), this->_buffer.size()); - if (read_bytes == 0U) - { - ::close(client); - this->_client_sockets[i] = 0U; - } - else - { - // Copy incoming data locally. - auto message = std::string(this->_buffer.data(), read_bytes); - - // Spawn task that processes the message. - auto *task = new MessageHandlerTask(*this->_message_handler.get(), i, std::move(message)); - task->annotate(std::uint16_t(this->_next_worker_id.fetch_add(1U) % this->_count_channels)); - tasking::runtime::spawn(*task); - } - } - } - } - } - - for (const auto client : this->_client_sockets) - { - if (client > 0) - { - ::close(client); - } - } - ::close(this->_socket); - - return true; -} - -void Server::send(const std::uint32_t client_id, std::string &&message) -{ - const auto length = std::uint64_t(message.size()); - auto response = std::string(length + sizeof(length), '\0'); - - // Write header - std::memcpy(response.data(), static_cast(&length), sizeof(length)); - - // Write data - std::memmove(response.data() + sizeof(length), message.data(), length); - - ::send(this->_client_sockets[client_id], response.c_str(), response.length(), 0); -} - -std::uint16_t Server::add_client(const std::int32_t client_socket) -{ - for (auto i = 0U; i < this->_client_sockets.size(); ++i) - { - if (this->_client_sockets[i] == 0U) - { - this->_client_sockets[i] = client_socket; - return i; - } - } - - return std::numeric_limits::max(); -} - -void Server::stop() noexcept -{ - this->_is_running = false; -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/io/network/server.d b/repos/ealanos/src/lib/mx/io/network/server.d deleted file mode 100644 index 07fe7e186b..0000000000 --- a/repos/ealanos/src/lib/mx/io/network/server.d +++ /dev/null @@ -1,662 +0,0 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ - /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ - /home/mml/genode-igb/repos/base/include/base/output.h \ - /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ - /home/mml/genode-igb/repos/base/include/util/misc_math.h \ - /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ - /home/mml/genode-igb/repos/base/include/base/thread.h \ - /home/mml/genode-igb/repos/base/include/base/blockade.h \ - /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ - /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ - /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ - /home/mml/genode-igb/repos/base/include/base/thread_state.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ - /home/mml/genode-igb/repos/base/include/base/signal.h \ - /home/mml/genode-igb/repos/base/include/util/list.h \ - /home/mml/genode-igb/repos/base/include/base/semaphore.h \ - /home/mml/genode-igb/repos/base/include/util/fifo.h \ - /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ - /home/mml/genode-igb/repos/base/include/session/session.h \ - /home/mml/genode-igb/repos/base/include/base/session_label.h \ - /home/mml/genode-igb/repos/base/include/util/arg_string.h \ - /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ - /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ - /home/mml/genode-igb/repos/base/include/base/allocator.h \ - /home/mml/genode-igb/repos/base/include/util/register.h \ - /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ - /home/mml/genode-igb/repos/base/include/base/id_space.h \ - /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ - /home/mml/genode-igb/repos/base/include/session/capability.h \ - /home/mml/genode-igb/repos/base/include/root/capability.h \ - /home/mml/genode-igb/repos/base/include/root/root.h \ - /home/mml/genode-igb/repos/base/include/base/entrypoint.h \ - /home/mml/genode-igb/repos/base/include/util/reconstructible.h \ - /home/mml/genode-igb/repos/base/include/util/construct_at.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_server.h \ - /home/mml/genode-igb/repos/base/include/base/ipc.h \ - /home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h \ - /home/mml/genode-igb/repos/base/include/base/object_pool.h \ - /home/mml/genode-igb/repos/base/include/base/weak_ptr.h \ - /home/mml/genode-igb/repos/base/include/base/trace/events.h \ - /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ - /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ - /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ - /home/mml/genode-igb/repos/base/include/dataspace/client.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ - /home/mml/genode-igb/repos/base/include/base/heap.h \ - /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ - /home/mml/genode-igb/repos/base/include/base/tslab.h \ - /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/netinet/in.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sockaddr_storage.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/netinet6/in6.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/socket.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_iovec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/_align.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/_align.h - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: - -/home/mml/genode-igb/repos/base/include/base/stdint.h: - -/home/mml/genode-igb/repos/base/include/base/log.h: - -/home/mml/genode-igb/repos/base/include/base/output.h: - -/home/mml/genode-igb/repos/base/include/util/interface.h: - -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: - -/home/mml/genode-igb/repos/base/include/util/noncopyable.h: - -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - -/home/mml/genode-igb/repos/base/include/cpu/string.h: - -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - -/home/mml/genode-igb/repos/base/include/base/thread.h: - -/home/mml/genode-igb/repos/base/include/base/blockade.h: - -/home/mml/genode-igb/repos/base/include/base/trace/logger.h: - -/home/mml/genode-igb/repos/base/include/base/trace/buffer.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/capability.h: - -/home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: - -/home/mml/genode-igb/repos/base/include/base/thread_state.h: - -/home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h: - -/home/mml/genode-igb/repos/base/include/base/signal.h: - -/home/mml/genode-igb/repos/base/include/util/list.h: - -/home/mml/genode-igb/repos/base/include/base/semaphore.h: - -/home/mml/genode-igb/repos/base/include/util/fifo.h: - -/home/mml/genode-igb/repos/base/include/dataspace/capability.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: - -/home/mml/genode-igb/repos/base/include/session/session.h: - -/home/mml/genode-igb/repos/base/include/base/session_label.h: - -/home/mml/genode-igb/repos/base/include/util/arg_string.h: - -/home/mml/genode-igb/repos/base/include/pd_session/pd_session.h: - -/home/mml/genode-igb/repos/base/include/region_map/region_map.h: - -/home/mml/genode-igb/repos/base/include/base/allocator.h: - -/home/mml/genode-igb/repos/base/include/util/register.h: - -/home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: - -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - -/home/mml/genode-igb/repos/base/include/base/id_space.h: - -/home/mml/genode-igb/repos/base/include/util/avl_tree.h: - -/home/mml/genode-igb/repos/base/include/session/capability.h: - -/home/mml/genode-igb/repos/base/include/root/capability.h: - -/home/mml/genode-igb/repos/base/include/root/root.h: - -/home/mml/genode-igb/repos/base/include/base/entrypoint.h: - -/home/mml/genode-igb/repos/base/include/util/reconstructible.h: - -/home/mml/genode-igb/repos/base/include/util/construct_at.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_server.h: - -/home/mml/genode-igb/repos/base/include/base/ipc.h: - -/home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h: - -/home/mml/genode-igb/repos/base/include/base/object_pool.h: - -/home/mml/genode-igb/repos/base/include/base/weak_ptr.h: - -/home/mml/genode-igb/repos/base/include/base/trace/events.h: - -/home/mml/genode-igb/repos/base/include/base/trace/policy.h: - -/home/mml/genode-igb/repos/base/include/pd_session/capability.h: - -/home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: - -/home/mml/genode-igb/repos/base/include/dataspace/client.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_client.h: - -/home/mml/genode-igb/repos/base/include/base/heap.h: - -/home/mml/genode-igb/repos/base/include/base/allocator_avl.h: - -/home/mml/genode-igb/repos/base/include/base/tslab.h: - -/home/mml/genode-igb/repos/base/include/base/slab.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: - -/home/mml/genode-igb/repos/libports/include/libc/component.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/netinet/in.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sockaddr_storage.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/netinet6/in6.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/socket.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_iovec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/_align.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/_align.h: diff --git a/repos/ealanos/src/lib/mx/io/network/server.h b/repos/ealanos/src/lib/mx/io/network/server.h deleted file mode 100644 index 68cc7d8282..0000000000 --- a/repos/ealanos/src/lib/mx/io/network/server.h +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once - -#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace mx::io::network { -class MessageHandler -{ -public: - constexpr MessageHandler() noexcept = default; - virtual ~MessageHandler() noexcept = default; - - virtual mx::tasking::TaskResult handle(std::uint16_t worker_id, std::uint32_t client_id, std::string &&message) = 0; -}; - -class MessageHandlerTask final : public tasking::TaskInterface -{ -public: - MessageHandlerTask(MessageHandler &message_handler, const std::uint32_t client_id, std::string &&message) noexcept - : _message_handler(message_handler), _client_id(client_id), _message(std::move(message)) - { - } - - ~MessageHandlerTask() noexcept override = default; - - tasking::TaskResult execute(const std::uint16_t worker_id) override - { - auto result = _message_handler.handle(worker_id, _client_id, std::move(_message)); - delete this; - return result; - } - -private: - MessageHandler &_message_handler; - const std::uint32_t _client_id; - std::string _message; -}; - -class Server -{ -public: - Server(std::unique_ptr &&message_handler, std::uint16_t port, - std::uint16_t count_channels) noexcept; - ~Server() noexcept = default; - - [[nodiscard]] std::uint16_t port() const noexcept { return _port; } - void stop() noexcept; - void send(std::uint32_t client_id, std::string &&message); - bool listen(); - - [[nodiscard]] bool is_running() const noexcept { return _is_running; } - -private: - const std::uint16_t _port; - std::int32_t _socket; - std::array _client_sockets; - std::array _buffer; - std::unique_ptr _message_handler; - - alignas(64) bool _is_running = true; - alignas(64) std::atomic_uint64_t _next_worker_id{0U}; - const std::uint16_t _count_channels; - - std::uint16_t add_client(std::int32_t client_socket); -}; -} // namespace mx::io::network \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/memory/config.h b/repos/ealanos/src/lib/mx/memory/config.h index 387cabf725..5c59b1125c 100644 --- a/repos/ealanos/src/lib/mx/memory/config.h +++ b/repos/ealanos/src/lib/mx/memory/config.h @@ -1,6 +1,5 @@ #pragma once #include -#include namespace mx::memory { class config @@ -11,11 +10,6 @@ public: */ static constexpr std::uint8_t max_numa_nodes() { return 8U; } - /** - * @return Cycles for prefetching a single cache line. - */ - static constexpr std::uint32_t latency_per_prefetched_cache_line() { return 290U; } - /** * @return Interval of each epoch, if memory reclamation is used. */ @@ -26,7 +20,7 @@ public: */ static constexpr bool local_garbage_collection() { return false; } - static constexpr std::size_t min_block_size() { return 64; } - static constexpr std::size_t superblock_cutoff() { return 1024 * min_block_size();} + static constexpr std::size_t block_size() { return 128; } + static constexpr std::size_t hyperblock_cutoff() { return 4*2048; } }; -} // namespace mx::memory +} // namespace mx::memory \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.cpp b/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.cpp index 70983dea5b..290d4f98d1 100644 --- a/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.cpp +++ b/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.cpp @@ -1,20 +1,16 @@ #include "dynamic_size_allocator.h" -#include "ealanos/memory/hamstraaja.h" #include "global_heap.h" #include #include -#include +#include + using namespace mx::memory::dynamic; - -Ealan::Memory::Hamstraaja *mx::memory::GlobalHeap::_heap; - AllocationBlock::AllocationBlock(const std::uint32_t id, const std::uint8_t numa_node_id, const std::size_t size) : _id(id), _numa_node_id(numa_node_id), _size(size), _available_size(size) { this->_allocated_block = GlobalHeap::allocate(numa_node_id, size); this->_free_elements.emplace_back(FreeHeader{reinterpret_cast(this->_allocated_block), size}); - this->_lock.unlock(); } AllocationBlock::AllocationBlock(AllocationBlock &&other) noexcept @@ -22,7 +18,6 @@ AllocationBlock::AllocationBlock(AllocationBlock &&other) noexcept _allocated_block(std::exchange(other._allocated_block, nullptr)), _free_elements(std::move(other._free_elements)), _available_size(other._available_size) { - this->_lock.unlock(); } AllocationBlock &AllocationBlock::operator=(AllocationBlock &&other) noexcept @@ -33,7 +28,6 @@ AllocationBlock &AllocationBlock::operator=(AllocationBlock &&other) noexcept this->_allocated_block = std::exchange(other._allocated_block, nullptr); this->_free_elements = std::move(other._free_elements); this->_available_size = other._available_size; - this->_lock.unlock(); return *this; } @@ -41,7 +35,7 @@ AllocationBlock::~AllocationBlock() { if (this->_allocated_block != nullptr) { - GlobalHeap::free(this->_allocated_block, this->_size, this->_numa_node_id); + GlobalHeap::free(this->_allocated_block); } } @@ -56,31 +50,29 @@ void *AllocationBlock::allocate(const std::size_t alignment, const std::size_t s return nullptr; } - const auto block = this->find_block(alignment, size); - if (block.has_value() == false) + auto [free_element_iterator, aligned_size_including_header] = this->find_block(alignment, size); + if (free_element_iterator == this->_free_elements.end()) { this->_lock.unlock(); return nullptr; } - const auto [free_block_index, aligned_size_including_header] = block.value(); - auto &free_block = this->_free_elements[free_block_index]; + const auto free_block_start = free_element_iterator->start(); + const auto free_block_end = free_block_start + free_element_iterator->size(); + const auto remaining_size = free_element_iterator->size() - aligned_size_including_header; - const auto free_block_start = free_block.start(); - const auto free_block_end = free_block_start + free_block.size(); - const auto remaining_size = free_block.size() - aligned_size_including_header; - - auto size_before_header = std::uint16_t{0U}; + std::uint16_t size_before_header{0U}; if (remaining_size >= 256U) { - free_block.contract(aligned_size_including_header); + const auto index = std::distance(this->_free_elements.begin(), free_element_iterator); + this->_free_elements[index].contract(aligned_size_including_header); this->_available_size -= aligned_size_including_header; } else { size_before_header = remaining_size; - this->_available_size -= free_block.size(); - this->_free_elements.erase(this->_free_elements.begin() + free_block_index); + this->_free_elements.erase(free_element_iterator); + this->_available_size -= free_element_iterator->size(); } this->_lock.unlock(); @@ -115,7 +107,7 @@ void AllocationBlock::free(AllocatedHeader *allocation_header) noexcept assert(index >= 0 && "Index is negative"); const auto real_index = std::size_t(index); - // Try to merge to the right. + // Try merge to the right. if (real_index < this->_free_elements.size() && free_element.borders(this->_free_elements[real_index])) { this->_free_elements[real_index].merge(free_element); @@ -145,8 +137,8 @@ void AllocationBlock::free(AllocatedHeader *allocation_header) noexcept this->_lock.unlock(); } -std::optional> AllocationBlock::find_block(const std::size_t alignment, - const std::size_t size) const noexcept +std::pair::iterator, std::size_t> AllocationBlock::find_block(const std::size_t alignment, + const std::size_t size) noexcept { /** * Check each block of the free list for enough space to include the wanted space. @@ -165,9 +157,9 @@ std::optional> AllocationBlock::find_block(c const auto size_including_header = size + sizeof(AllocatedHeader); - for (auto index = 0U; index < this->_free_elements.size(); ++index) + for (auto iterator = this->_free_elements.begin(); iterator != this->_free_elements.end(); iterator++) { - const auto &free_element = this->_free_elements[index]; + const auto &free_element = *iterator; if (free_element >= size_including_header) { const auto start = free_element.start(); @@ -188,12 +180,12 @@ std::optional> AllocationBlock::find_block(c if (free_element >= aligned_size_including_header) { // aligned_size_including_header - return std::make_optional(std::make_pair(index, aligned_size_including_header)); + return std::make_pair(iterator, aligned_size_including_header); } } } - return std::nullopt; + return std::make_pair(this->_free_elements.end(), 0U); } Allocator::Allocator() @@ -209,7 +201,7 @@ void *Allocator::allocate(const std::uint8_t numa_node_id, const std::size_t ali if (memory == nullptr) { // This will be allocated default... - constexpr auto default_alloc_size = std::size_t(1ULL << 28U); + constexpr auto default_alloc_size = 1UL << 28U; // ... but if the requested size is higher, allocate more. const auto size_to_alloc = std::max(default_alloc_size, alignment_helper::next_multiple(size, 64UL)); @@ -279,7 +271,7 @@ void Allocator::free(void *pointer) noexcept void Allocator::defragment() noexcept { // Remove all blocks that are unused to free as much memory as possible. - for (auto i = 0U; i <= system::cpu::max_node_id(); ++i) + for (auto i = 0U; i <= system::topology::max_node_id(); ++i) { auto &numa_blocks = this->_numa_allocation_blocks[i]; numa_blocks.erase( @@ -295,7 +287,7 @@ void Allocator::initialize_empty() { // For performance reasons: Each list must contain at least // one block. This way, we do not have to check every time. - for (auto i = 0U; i <= system::cpu::max_node_id(); ++i) + for (auto i = 0U; i <= system::topology::max_node_id(); ++i) { auto &blocks = this->_numa_allocation_blocks[i]; if (blocks.empty()) @@ -308,7 +300,7 @@ void Allocator::initialize_empty() bool Allocator::is_free() const noexcept { - for (auto i = 0U; i <= system::cpu::max_node_id(); ++i) + for (auto i = 0U; i <= system::topology::max_node_id(); ++i) { const auto &numa_blocks = this->_numa_allocation_blocks[i]; const auto iterator = std::find_if(numa_blocks.cbegin(), numa_blocks.cend(), [](const auto &allocation_block) { @@ -326,7 +318,7 @@ bool Allocator::is_free() const noexcept void Allocator::release_allocated_memory() noexcept { - for (auto i = 0U; i <= system::cpu::max_node_id(); ++i) + for (auto i = 0U; i <= system::topology::max_node_id(); ++i) { this->_numa_allocation_blocks[i].clear(); this->_next_allocation_id[i].value().store(0U); diff --git a/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.d b/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.d index 487441b75a..61758f56c5 100644 --- a/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.d +++ b/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.d @@ -4,7 +4,6 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ @@ -13,43 +12,27 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ - /home/mml/genode-igb/repos/base/include/base/stdint.h \ /home/mml/genode-igb/repos/base/include/base/log.h \ /home/mml/genode-igb/repos/base/include/base/output.h \ + /home/mml/genode-igb/repos/base/include/base/stdint.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ /home/mml/genode-igb/repos/base/include/util/interface.h \ /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ /home/mml/genode-igb/repos/base/include/util/attempt.h \ /home/mml/genode-igb/repos/base/include/base/capability.h \ @@ -63,8 +46,10 @@ /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ /home/mml/genode-igb/repos/base/include/base/affinity.h \ /home/mml/genode-igb/repos/base/include/util/xml_node.h \ @@ -119,35 +104,17 @@ /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ /home/mml/genode-igb/repos/base/include/base/tslab.h \ /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: @@ -157,8 +124,6 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: @@ -175,68 +140,30 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: - -/home/mml/genode-igb/repos/base/include/base/stdint.h: - /home/mml/genode-igb/repos/base/include/base/log.h: /home/mml/genode-igb/repos/base/include/base/output.h: +/home/mml/genode-igb/repos/base/include/base/stdint.h: + +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: + /home/mml/genode-igb/repos/base/include/util/interface.h: /home/mml/genode-igb/repos/base/include/base/buffered_output.h: @@ -249,6 +176,12 @@ /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h: /home/mml/genode-igb/repos/base/include/util/attempt.h: @@ -275,10 +208,14 @@ /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: /home/mml/genode-igb/repos/base/include/base/affinity.h: @@ -387,60 +324,24 @@ /home/mml/genode-igb/repos/base/include/base/slab.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: +/home/mml/genode-igb/repos/libports/include/libc/component.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: +/home/mml/genode-igb/repos/base/include/rom_session/client.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: +/home/mml/genode-igb/repos/base/include/base/connection.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: +/home/mml/genode-igb/repos/base/include/util/retry.h: diff --git a/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h b/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h index 8db4fd259c..b76ff258f5 100644 --- a/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h +++ b/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include @@ -125,8 +124,8 @@ private: alignas(64) std::size_t _available_size; synchronization::Spinlock _lock; - std::optional> find_block(std::size_t alignment, - std::size_t size) const noexcept; + std::pair::iterator, std::size_t> find_block(std::size_t alignment, + std::size_t size) noexcept; }; /** diff --git a/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h b/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h index c97515cc16..e32b11c7a3 100644 --- a/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h +++ b/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h @@ -11,13 +11,14 @@ #include #include #include -#include +#include #include #include #include -#include #include +#include +#include namespace mx::memory::fixed { /** * Represents a free memory object. @@ -46,10 +47,10 @@ class Chunk { public: Chunk() noexcept = default; - Chunk(void *memory, const bool is_allocated) noexcept : _memory(memory), _is_allocated(is_allocated) {} + explicit Chunk(void *memory, bool is_allocated) noexcept : _memory(memory), _is_allocated(is_allocated) {} ~Chunk() noexcept = default; - static constexpr auto size() { return 32U * 1024U * 1024U; /* 32mb */ } + static constexpr auto size() { return 4096 * 4096; /* 16mb */ } explicit operator void *() const noexcept { return _memory; } explicit operator std::uintptr_t() const noexcept { return reinterpret_cast(_memory); } @@ -73,25 +74,26 @@ public: explicit ProcessorHeap(const std::uint8_t numa_node_id) noexcept : _numa_node_id(numa_node_id) { - _allocated_chunks.reserve(1024U); + _allocated_chunks.reserve(1024); fill_buffer(); } ~ProcessorHeap() noexcept { - if (_numa_node_id > mx::system::cpu::max_node_id()) + if (_numa_node_id > mx::system::topology::max_node_id()) return; for (const auto allocated_chunk : _allocated_chunks) { - GlobalHeap::free(static_cast(allocated_chunk), Chunk::size(), this->_numa_node_id); + if (static_cast(allocated_chunk)) + GlobalHeap::free(static_cast(allocated_chunk)); } for (const auto free_chunk : _free_chunk_buffer) { if (static_cast(free_chunk)) { - GlobalHeap::free(static_cast(free_chunk), Chunk::size(), this->_numa_node_id); + GlobalHeap::free(static_cast(free_chunk)); } } } @@ -121,7 +123,7 @@ public: */ Chunk allocate() noexcept { - const auto next_free_chunk = _next_free_chunk.fetch_add(1U, std::memory_order_relaxed); + const auto next_free_chunk = _next_free_chunk.fetch_add(1, std::memory_order_relaxed); if (next_free_chunk < _free_chunk_buffer.size()) { return _free_chunk_buffer[next_free_chunk]; @@ -145,32 +147,6 @@ public: return allocate(); } - [[nodiscard]] std::vector> allocated_chunks() - { - auto chunks = std::vector>{}; - chunks.reserve(_free_chunk_buffer.size() + _allocated_chunks.size()); - - for (const auto chunk : _free_chunk_buffer) - { - const auto start = static_cast(chunk); - if (start > 0U) - { - chunks.emplace_back(std::make_pair(start, start + Chunk::size())); - } - } - - for (const auto chunk : _allocated_chunks) - { - const auto start = static_cast(chunk); - if (start > 0U) - { - chunks.emplace_back(std::make_pair(start, start + Chunk::size())); - } - } - - return chunks; - } - private: // Size of the internal chunk buffer. inline static constexpr auto CHUNKS = 128U; @@ -209,10 +185,7 @@ private: auto heap_memory_address = reinterpret_cast(heap_memory); for (auto i = 0U; i < _free_chunk_buffer.size(); ++i) { - _free_chunk_buffer[i] = Chunk(reinterpret_cast(heap_memory_address + (i * Chunk::size())), i == 0U); - - /// Touch the page to handle page fault. - reinterpret_cast(_free_chunk_buffer[i].operator void *())[0] = '\0'; + _free_chunk_buffer[i] = Chunk(reinterpret_cast(heap_memory_address + (i * Chunk::size())), i==0); } _next_free_chunk.store(0U); @@ -220,24 +193,21 @@ private: }; /** - * The worker local heap represents the allocator on a single core. + * The CoreHeap represents the allocator on a single core. * By this, allocations are latch-free. */ -template class alignas(64) WorkerLocalHeap +template class alignas(64) CoreHeap { public: - explicit WorkerLocalHeap(ProcessorHeap *processor_heap) noexcept : _processor_heap(processor_heap) - { - fill_buffer(); - } + explicit CoreHeap(ProcessorHeap *processor_heap) noexcept : _processor_heap(processor_heap) { fill_buffer(); } - WorkerLocalHeap() noexcept = default; + CoreHeap() noexcept = default; - ~WorkerLocalHeap() noexcept = default; + ~CoreHeap() noexcept = default; /** - * Allocates new memory from the worker local heap. - * When the internal buffer is empty, the worker local heap + * Allocates new memory from the CoreHeap. + * When the internal buffer is empty, the CoreHeap * will allocate new chunks from the ProcessorHeap. * * @return Pointer to the new allocated memory. @@ -246,17 +216,11 @@ public: { if (empty()) { - /// Maybe, we have an item in the overflow queue. - if (_overflow_first != nullptr) - { - auto *free_element = std::exchange(_overflow_first, _overflow_first->next()); - return static_cast(free_element); - } - - fill_buffer(); + fill_buffer(); } - return reinterpret_cast(_free_elements[_free_head++]); + auto *free_element = std::exchange(_first, _first->next()); + return static_cast(free_element); } /** @@ -269,128 +233,99 @@ public: */ void free(void *pointer) noexcept { - if (_free_head > 0U) - { - _free_elements[--_free_head] = std::uintptr_t(pointer); - } - else - { - auto *free_object = reinterpret_cast(pointer); - free_object->next(_overflow_first); - _overflow_first = free_object; - } + auto *free_object = static_cast(pointer); + free_object->next(_first); + _first = free_object; } /** * Fills the buffer by asking the ProcessorHeap for more memory. * This is latch-free since just a single core calls this method. */ - template void fill_buffer() + void fill_buffer() { auto chunk = _processor_heap->allocate(); + const auto chunk_address = static_cast(chunk); + //assert((chunk_address != 0) && "Failed to allocate chunk from processor heap"); - constexpr auto count_objects = std::uint64_t{Chunk::size() / S}; + constexpr auto object_size = S; + constexpr auto count_objects = std::uint64_t{Chunk::size() / object_size}; - _free_head = 0U; - for (auto i = 0U; i < count_objects; ++i) + auto *first_free = reinterpret_cast(chunk_address); + auto *last_free = reinterpret_cast(chunk_address + ((count_objects - 1) * object_size)); + + auto *current_free = first_free; + for (auto i = 0U; i < count_objects - 1U; ++i) { - _free_elements[i] = chunk_address + i * S; - if (IS_FIRST) - { - reinterpret_cast(_free_elements[i])->next(nullptr); - } + auto *next = reinterpret_cast(chunk_address + ((i + 1U) * object_size)); + current_free->next(next); + current_free = next; } + + last_free->next(nullptr); + _first = first_free; } private: // Processor heap to allocate new chunks. ProcessorHeap *_processor_heap{nullptr}; - std::uint64_t _free_head{Chunk::size() / S}; - - // Free elements - std::array _free_elements; - // First element of the list of free memory objects. - FreeHeader *_overflow_first{nullptr}; + FreeHeader *_first{nullptr}; /** * @return True, when the buffer is empty. */ - [[nodiscard]] bool empty() const noexcept { return _free_head == _free_elements.max_size(); } + [[nodiscard]] bool empty() const noexcept { return _first == nullptr; } }; /** - * The Allocator is the interface to the internal worker local heaps. + * The Allocator is the interface to the internal CoreHeaps. */ template class Allocator final : public TaskAllocatorInterface { public: - explicit Allocator(const util::core_set &core_set) - { - for (auto node_id = std::uint8_t(0U); node_id <= system::cpu::max_node_id(); ++node_id) + explicit Allocator() + { + assert((system::topology::max_node_id() <= config::max_numa_nodes()) && "More NUMA nodes detected than supported. Increase value for max_numa_nodes() in mx/memory/config.h."); + Genode::log("Creating new fixed size allocator"); + for (auto node_id = std::uint8_t(0U); node_id <= system::topology::max_node_id(); ++node_id) { - if (core_set.has_core_of_numa_node(node_id)) - { + Genode::log("Creating heap for node ", node_id); _processor_heaps[node_id] = ProcessorHeap{node_id}; - } } - for (auto worker_id = 0U; worker_id < core_set.count_cores(); ++worker_id) + for (auto core_id = 0; core_id < system::topology::count_cores(); ++core_id) { - const auto node_id = system::cpu::node_id(core_set[worker_id]); - _worker_local_heaps[worker_id] = WorkerLocalHeap{&_processor_heaps[node_id]}; + const auto node_id = system::topology::node_id(core_id); + _core_heaps[core_id] = CoreHeap{&_processor_heaps[node_id]}; } } - explicit Allocator(util::core_set &&core_set) : Allocator(core_set) {} - ~Allocator() override = default; /** - * Allocates memory from the given worker local heap. + * Allocates memory from the given CoreHeap. * - * @param worker_id ID of the worker. + * @param core_id ID of the core. * @return Allocated memory object. */ - [[nodiscard]] void *allocate(const std::uint16_t worker_id) override - { - return _worker_local_heaps[worker_id].allocate(); - } + [[nodiscard]] void *allocate(const std::uint16_t core_id) override { return _core_heaps[core_id].allocate(); } /** * Frees memory. * - * @param worker_id ID of the worker to place the free object in. + * @param core_id ID of the core to place the free object in. * @param address Pointer to the memory object. */ - void free(const std::uint16_t worker_id, void *address) noexcept override - { - _worker_local_heaps[worker_id].free(address); - } - - [[nodiscard]] std::unordered_map>> - allocated_chunks() override - { - auto tags = std::unordered_map>>{}; - - auto chunks = _processor_heaps.front().allocated_chunks(); - for (auto i = 1U; i < _processor_heaps.max_size(); ++i) - { - auto processor_chunks = _processor_heaps[i].allocated_chunks(); - std::move(processor_chunks.begin(), processor_chunks.end(), std::back_inserter(chunks)); - } - - tags.insert(std::make_pair("tasks", std::move(chunks))); - return tags; - } + void free(const std::uint16_t core_id, void *address) noexcept override { _core_heaps[core_id].free(address); } private: // Heap for every processor socket/NUMA region. std::array _processor_heaps; // Map from core_id to core-local allocator. - std::array, tasking::config::max_cores()> _worker_local_heaps; + std::array, tasking::config::max_cores()> _core_heaps; }; } // namespace mx::memory::fixed \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/memory/global_heap.h b/repos/ealanos/src/lib/mx/memory/global_heap.h index 5cb7a8a368..3cb0a71c81 100644 --- a/repos/ealanos/src/lib/mx/memory/global_heap.h +++ b/repos/ealanos/src/lib/mx/memory/global_heap.h @@ -1,29 +1,30 @@ #pragma once #include "alignment_helper.h" -#include "config.h" -#include "ealanos/util/json.hpp" #include #include -#include +#include +#include + #include +#include +#include +#include + +#include + namespace mx::memory { + using Alloc = Ealan::Memory::Hamstraaja; /** * The global heap represents the heap, provided by the OS. */ class GlobalHeap { + public: - static Ealan::Memory::Hamstraaja *_heap; + alignas(64) static Ealan::Memory::Hamstraaja *_alloc; - static bool initialized() { return _heap != nullptr; } - - static void init( - Ealan::Memory::Hamstraaja *_alloc) - { - _heap = _alloc; - } /** * Allocates the given size on the given NUMA node. @@ -34,9 +35,8 @@ public: */ static void *allocate(const std::uint8_t numa_node_id, const std::size_t size) { - void *ptr = _heap->alloc(size, numa_node_id); // numa_alloc_onnode(size, numa_node_id); - return ptr; - } + return _alloc->alloc(size, numa_node_id); + } /** * Allocates the given memory aligned to the cache line @@ -47,15 +47,18 @@ public: */ static void *allocate_cache_line_aligned(const std::size_t size) { - return _heap->alloc(alignment_helper::next_multiple(size, 64UL));//std::aligned_alloc(mx::system::cache::line_size(), alignment_helper::next_multiple(size, 64UL)); + return _alloc->alloc(size); } + /** * Frees the given memory. * * @param memory Pointer to memory. * @param size Size of the allocated object. */ - static void free(void *memory, const std::size_t size, [[maybe_unused]] const std::uint8_t numa_node_id) { _heap->free(memory); } + static void free(void *memory) { _alloc->free(memory); } }; } // namespace mx::memory + +alignas(64) Ealan::Memory::Hamstraaja *mx::memory::GlobalHeap::_alloc; diff --git a/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.cpp b/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.cpp index 721f1f8169..f00ca455a9 100644 --- a/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.cpp +++ b/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.cpp @@ -1,7 +1,7 @@ #include "epoch_manager.h" -#include -#include +#include #include +#include #include using namespace mx::memory::reclamation; @@ -24,13 +24,12 @@ void EpochManager::enter_epoch_periodically() if constexpr (config::local_garbage_collection()) { // Collect local garbage. - // TODO: This might be buggy (even with cpu id, since threads could be interrupted within allocation)! - const auto core_id = mx::system::cpu::core_id(); - for (auto worker_id = std::uint16_t(0U); worker_id < this->_count_channels; ++worker_id) + const auto core_id = mx::system::topology::core_id(); + for (auto channel_id = 0U; channel_id < this->_count_channels; ++channel_id) { auto *garbage_task = mx::tasking::runtime::new_task(core_id, *this, this->_allocator); - garbage_task->annotate(worker_id); + garbage_task->annotate(std::uint16_t(channel_id)); mx::tasking::runtime::spawn(*garbage_task); } } @@ -41,7 +40,7 @@ void EpochManager::enter_epoch_periodically() } // Wait some time until next epoch. - std::this_thread::sleep_until(std::chrono::system_clock::now() + config::epoch_interval()); + std::this_thread::sleep_for(config::epoch_interval()); // NOLINT: sleep_for seems to crash clang-tidy } } @@ -53,7 +52,7 @@ void EpochManager::reclaim_epoch_garbage() noexcept // Items that could not be physically removed in this epoch // and therefore have to be scheduled to the next one. - queue::List deferred_resources{}; + util::Queue deferred_resources{}; resource::ResourceInterface *resource; while ((resource = reinterpret_cast(this->_global_garbage_queue.pop_front())) != @@ -82,11 +81,11 @@ void EpochManager::reclaim_all() noexcept { if constexpr (config::local_garbage_collection()) { - for (auto worker_id = 0U; worker_id < this->_count_channels; ++worker_id) + for (auto channel_id = 0U; channel_id < this->_count_channels; ++channel_id) { resource::ResourceInterface *resource; while ((resource = reinterpret_cast( - this->_local_garbage_queues[worker_id].value().pop_front())) != nullptr) + this->_local_garbage_queues[channel_id].value().pop_front())) != nullptr) { resource->on_reclaim(); this->_allocator.free(static_cast(resource)); @@ -110,14 +109,15 @@ void EpochManager::reset() noexcept if (this->_allocator.is_free()) { this->_global_epoch.store(0U); - for (auto worker_id = 0U; worker_id < tasking::config::max_cores(); ++worker_id) + for (auto channel_id = 0U; channel_id < tasking::config::max_cores(); ++channel_id) { - _local_epochs[worker_id] = std::numeric_limits::max(); + _local_epochs[channel_id] = std::numeric_limits::max(); } } } -mx::tasking::TaskResult ReclaimEpochGarbageTask::execute(const std::uint16_t worker_id) +mx::tasking::TaskResult ReclaimEpochGarbageTask::execute(const std::uint16_t /*core_id*/, + const std::uint16_t channel_id) { // Items logically removed in an epoch leq than // this epoch can be removed physically. @@ -125,10 +125,10 @@ mx::tasking::TaskResult ReclaimEpochGarbageTask::execute(const std::uint16_t wor // Items that could not be physically removed in this epoch // and therefore have to be scheduled to the next one. - queue::List deferred_resources{}; + util::Queue deferred_resources{}; // Queue with channel-local garbage. - auto &garbage_queue = this->_epoch_manager.local_garbage(worker_id); + auto &garbage_queue = this->_epoch_manager.local_garbage(channel_id); resource::ResourceInterface *resource; while ((resource = reinterpret_cast(garbage_queue.pop_front())) != nullptr) diff --git a/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.d b/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.d index 40f4dd7e88..f72f072e87 100644 --- a/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.d +++ b/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.d @@ -8,118 +8,79 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/util/meta.h \ + /home/mml/genode-igb/repos/base/include/base/env.h \ + /home/mml/genode-igb/repos/base/include/parent/parent.h \ + /home/mml/genode-igb/repos/base/include/util/attempt.h \ + /home/mml/genode-igb/repos/base/include/base/rpc.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ /home/mml/genode-igb/repos/base/include/base/output.h \ /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/util/misc_math.h \ + /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/base/thread.h \ + /home/mml/genode-igb/repos/base/include/base/exception.h \ /home/mml/genode-igb/repos/base/include/base/blockade.h \ + /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/capability.h \ + /home/mml/genode-igb/repos/base/include/base/native_capability.h \ /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ /home/mml/genode-igb/repos/base/include/base/thread_state.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ /home/mml/genode-igb/repos/base/include/base/signal.h \ /home/mml/genode-igb/repos/base/include/util/list.h \ /home/mml/genode-igb/repos/base/include/base/semaphore.h \ + /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/util/fifo.h \ + /home/mml/genode-igb/repos/base/include/base/affinity.h \ + /home/mml/genode-igb/repos/base/include/util/xml_node.h \ + /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ /home/mml/genode-igb/repos/base/include/session/session.h \ + /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/session_label.h \ /home/mml/genode-igb/repos/base/include/util/arg_string.h \ /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/base/allocator.h \ /home/mml/genode-igb/repos/base/include/util/register.h \ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ /home/mml/genode-igb/repos/base/include/base/id_space.h \ /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ /home/mml/genode-igb/repos/base/include/session/capability.h \ @@ -136,83 +97,72 @@ /home/mml/genode-igb/repos/base/include/base/trace/events.h \ /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ /home/mml/genode-igb/repos/base/include/dataspace/client.h \ /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ - /home/mml/genode-igb/repos/base/include/base/heap.h \ - /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ - /home/mml/genode-igb/repos/base/include/base/tslab.h \ - /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ + /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ + /home/mml/genode-igb/repos/base/include/util/touch.h \ + /home/mml/genode-igb/repos/base/include/base/heap.h \ + /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ + /home/mml/genode-igb/repos/base/include/base/tslab.h \ + /home/mml/genode-igb/repos/base/include/base/slab.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: @@ -230,180 +180,86 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: +/home/mml/genode-igb/repos/libports/include/libc/component.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: +/home/mml/genode-igb/repos/base/include/util/meta.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: +/home/mml/genode-igb/repos/base/include/base/env.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: +/home/mml/genode-igb/repos/base/include/parent/parent.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: +/home/mml/genode-igb/repos/base/include/util/attempt.h: -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: +/home/mml/genode-igb/repos/base/include/base/rpc.h: -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: +/home/mml/genode-igb/repos/base/include/base/rpc_args.h: -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: +/home/mml/genode-igb/repos/base/include/util/string.h: /home/mml/genode-igb/repos/base/include/base/stdint.h: -/home/mml/genode-igb/repos/base/include/base/log.h: +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: /home/mml/genode-igb/repos/base/include/base/output.h: /home/mml/genode-igb/repos/base/include/util/interface.h: -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: +/home/mml/genode-igb/repos/base/include/util/misc_math.h: /home/mml/genode-igb/repos/base/include/util/noncopyable.h: -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - /home/mml/genode-igb/repos/base/include/cpu/string.h: -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - /home/mml/genode-igb/repos/base/include/base/thread.h: +/home/mml/genode-igb/repos/base/include/base/exception.h: + /home/mml/genode-igb/repos/base/include/base/blockade.h: +/home/mml/genode-igb/repos/base/include/base/lock.h: + /home/mml/genode-igb/repos/base/include/base/trace/logger.h: /home/mml/genode-igb/repos/base/include/base/trace/buffer.h: @@ -412,6 +268,10 @@ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/capability.h: + +/home/mml/genode-igb/repos/base/include/base/native_capability.h: + /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: /home/mml/genode-igb/repos/base/include/base/thread_state.h: @@ -424,14 +284,30 @@ /home/mml/genode-igb/repos/base/include/base/semaphore.h: +/home/mml/genode-igb/repos/base/include/base/mutex.h: + /home/mml/genode-igb/repos/base/include/util/fifo.h: +/home/mml/genode-igb/repos/base/include/base/affinity.h: + +/home/mml/genode-igb/repos/base/include/util/xml_node.h: + +/home/mml/genode-igb/repos/base/include/base/log.h: + +/home/mml/genode-igb/repos/base/include/base/buffered_output.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: + +/home/mml/genode-igb/repos/base/include/util/token.h: + /home/mml/genode-igb/repos/base/include/dataspace/capability.h: -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: +/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: /home/mml/genode-igb/repos/base/include/session/session.h: +/home/mml/genode-igb/repos/base/include/base/quota_guard.h: + /home/mml/genode-igb/repos/base/include/base/session_label.h: /home/mml/genode-igb/repos/base/include/util/arg_string.h: @@ -440,20 +316,16 @@ /home/mml/genode-igb/repos/base/include/region_map/region_map.h: +/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: + +/home/mml/genode-igb/repos/base/include/base/cache.h: + /home/mml/genode-igb/repos/base/include/base/allocator.h: /home/mml/genode-igb/repos/base/include/util/register.h: /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - /home/mml/genode-igb/repos/base/include/base/id_space.h: /home/mml/genode-igb/repos/base/include/util/avl_tree.h: @@ -486,49 +358,33 @@ /home/mml/genode-igb/repos/base/include/pd_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: /home/mml/genode-igb/repos/base/include/dataspace/client.h: /home/mml/genode-igb/repos/base/include/base/rpc_client.h: -/home/mml/genode-igb/repos/base/include/base/heap.h: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: -/home/mml/genode-igb/repos/base/include/base/allocator_avl.h: +/home/mml/genode-igb/repos/base/include/rom_session/client.h: -/home/mml/genode-igb/repos/base/include/base/tslab.h: +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: -/home/mml/genode-igb/repos/base/include/base/slab.h: +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: +/home/mml/genode-igb/repos/base/include/base/connection.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: +/home/mml/genode-igb/repos/base/include/util/retry.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: @@ -538,104 +394,98 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: +/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + +/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: + +/home/mml/genode-igb/repos/base/include/util/touch.h: + +/home/mml/genode-igb/repos/base/include/base/heap.h: + +/home/mml/genode-igb/repos/base/include/base/allocator_avl.h: + +/home/mml/genode-igb/repos/base/include/base/tslab.h: + +/home/mml/genode-igb/repos/base/include/base/slab.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: +/home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: - -/home/mml/genode-igb/repos/libports/include/libc/component.h: diff --git a/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h b/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h index 948ee06f6a..b6c36fd6ea 100644 --- a/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h +++ b/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h @@ -6,8 +6,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -15,6 +14,7 @@ #include #include #include +#include #include namespace mx::memory::reclamation { @@ -58,7 +58,7 @@ private: class EpochManager { public: - EpochManager(const std::uint16_t count_channels, dynamic::local::Allocator &allocator, + EpochManager(const std::uint16_t count_channels, dynamic::Allocator &allocator, util::maybe_atomic &is_running) noexcept : _count_channels(count_channels), _is_running(is_running), _allocator(allocator) { @@ -68,7 +68,7 @@ public: ~EpochManager() = default; - LocalEpoch &operator[](const std::uint16_t worker_id) noexcept { return _local_epochs[worker_id]; } + LocalEpoch &operator[](const std::uint16_t channel_id) noexcept { return _local_epochs[channel_id]; } /** * @return Access to read to global epoch. @@ -81,9 +81,9 @@ public: [[nodiscard]] epoch_t min_local_epoch() const noexcept { auto min_epoch = _local_epochs[0U](); - for (auto worker_id = 1U; worker_id < _count_channels; ++worker_id) + for (auto channel_id = 1U; channel_id < _count_channels; ++channel_id) { - min_epoch = std::min(min_epoch, _local_epochs[worker_id]()); + min_epoch = std::min(min_epoch, _local_epochs[channel_id]()); } return min_epoch; @@ -94,13 +94,13 @@ public: * @param resource Resource to logically delete. */ void add_to_garbage_collection(resource::ResourceInterface *resource, - [[maybe_unused]] const std::uint16_t owning_worker_id) noexcept + [[maybe_unused]] const std::uint16_t owning_channel_id) noexcept { - resource->remove_epoch(_global_epoch.load()); + resource->remove_epoch(_global_epoch.load(std::memory_order_acq_rel)); if constexpr (config::local_garbage_collection()) { - _local_garbage_queues[owning_worker_id].value().push_back(resource); + _local_garbage_queues[owning_channel_id].value().push_back(resource); } else { @@ -113,6 +113,11 @@ public: */ void enter_epoch_periodically(); + static void *enter(void *args) { EpochManager *mgr = static_cast(args); + mgr->enter_epoch_periodically(); + return nullptr; + } + /** * Reclaims all garbage, mainly right before shut down tasking. */ @@ -121,12 +126,12 @@ public: /** * Grants access to the local garbage queue of a specific channel. * - * @param worker_id Channel Id. + * @param channel_id Channel Id. * @return Local garbage queue. */ - [[nodiscard]] queue::MPSC &local_garbage(const std::uint16_t worker_id) noexcept + [[nodiscard]] util::MPSCQueue &local_garbage(const std::uint16_t channel_id) noexcept { - return _local_garbage_queues[worker_id].value(); + return _local_garbage_queues[channel_id].value(); } /** @@ -143,7 +148,7 @@ private: util::maybe_atomic &_is_running; // Allocator to free collected resources. - dynamic::local::Allocator &_allocator; + dynamic::Allocator &_allocator; // Global epoch, incremented periodically. std::atomic _global_epoch{0U}; @@ -152,11 +157,11 @@ private: alignas(64) std::array _local_epochs; // Queue that holds all logically deleted objects in a global space. - alignas(64) queue::MPSC _global_garbage_queue; + alignas(64) util::MPSCQueue _global_garbage_queue; // Queues for every worker thread. Logically deleted objects are stored here // whenever local garbage collection is used. - alignas(64) std::array>, + alignas(64) std::array>, tasking::config::max_cores()> _local_garbage_queues; /** @@ -168,16 +173,16 @@ private: class ReclaimEpochGarbageTask final : public tasking::TaskInterface { public: - constexpr ReclaimEpochGarbageTask(EpochManager &epoch_manager, dynamic::local::Allocator &allocator) noexcept + constexpr ReclaimEpochGarbageTask(EpochManager &epoch_manager, dynamic::Allocator &allocator) noexcept : _epoch_manager(epoch_manager), _allocator(allocator) { } ~ReclaimEpochGarbageTask() noexcept override = default; - tasking::TaskResult execute(std::uint16_t worker_id) override; + tasking::TaskResult execute(std::uint16_t core_id, std::uint16_t channel_id) override; private: EpochManager &_epoch_manager; - dynamic::local::Allocator &_allocator; + dynamic::Allocator &_allocator; }; } // namespace mx::memory::reclamation \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/memory/tagged_ptr.h b/repos/ealanos/src/lib/mx/memory/tagged_ptr.h index 0f0a30d565..8dff7f1970 100644 --- a/repos/ealanos/src/lib/mx/memory/tagged_ptr.h +++ b/repos/ealanos/src/lib/mx/memory/tagged_ptr.h @@ -12,7 +12,7 @@ namespace mx::memory { template class tagged_ptr { public: - constexpr tagged_ptr() noexcept + constexpr tagged_ptr() noexcept : _object_pointer(0U) { static_assert(sizeof(I) == 2U); static_assert(sizeof(tagged_ptr) == 8U); @@ -55,9 +55,7 @@ public: explicit operator T *() const noexcept { return get(); } - explicit operator bool() const noexcept { return _object_pointer != 0U; } - - explicit operator std::uintptr_t() const noexcept { return _object_pointer; } + explicit operator bool() const noexcept { return _object_pointer > 0U; } tagged_ptr &operator=(const tagged_ptr &other) noexcept = default; @@ -83,7 +81,7 @@ private: /** * Pointer to the instance of T, only 48bit are used. */ - std::uintptr_t _object_pointer : 48 {0U}; + std::uintptr_t _object_pointer : 48; /** * Information stored within this pointer, remaining 16bit are used. @@ -100,4 +98,4 @@ template struct hash> return std::hash().operator()(ptr.get()); } }; -} // namespace std \ No newline at end of file +} // namespace std diff --git a/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h b/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h index b23418dcf0..2ae84a93fd 100644 --- a/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h +++ b/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h @@ -1,13 +1,9 @@ #pragma once #include "mx/memory/global_heap.h" +#include "mx/system/topology.h" #include #include -#include -#include -#include -#include -#include namespace mx::memory { /** @@ -22,20 +18,17 @@ public: /** * Allocates memory for the given core. - * @param worker_id Worker to allocate memory for. + * @param core_id Core to allocate memory for. * @return Allocated memory. */ - [[nodiscard]] virtual void *allocate(std::uint16_t worker_id) = 0; + [[nodiscard]] virtual void *allocate(std::uint16_t core_id) = 0; /** * Frees the memory at the given core. - * @param worker_id Worker to store free memory. + * @param core_id Core to store free memory. * @param address Address to free. */ - virtual void free(std::uint16_t worker_id, void *address) noexcept = 0; - - [[nodiscard]] virtual std::unordered_map>> - allocated_chunks() = 0; + virtual void free(std::uint16_t core_id, void *address) noexcept = 0; }; /** @@ -50,21 +43,12 @@ public: /** * @return Allocated memory using systems malloc (but aligned). */ - [[nodiscard]] void *allocate(const std::uint16_t /*worker_id*/) override - { - return memory::GlobalHeap::allocate_cache_line_aligned(S); - } + [[nodiscard]] void *allocate(const std::uint16_t core_id) override { return GlobalHeap::allocate(mx::system::topology::node_id(core_id), 2*S); } /** * Frees the given memory using systems free. * @param address Memory to free. */ - void free(const std::uint16_t /*worker_id*/, void *address) noexcept override { memory::GlobalHeap::free(address, 0, 0); } - - [[nodiscard]] std::unordered_map>> - allocated_chunks() override - { - return std::unordered_map>>{}; - } + void free(const std::uint16_t /*core_id*/, void *address) noexcept override { GlobalHeap::free(address); } }; } // namespace mx::memory \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.cpp b/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.cpp deleted file mode 100644 index 4acf5b552b..0000000000 --- a/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.cpp +++ /dev/null @@ -1,433 +0,0 @@ -#include "worker_local_dynamic_size_allocator.h" -#include "alignment_helper.h" -#include "global_heap.h" -#include - -using namespace mx::memory::dynamic::local; - -std::tuple::iterator, bool, std::size_t, std::size_t> AllocatedBlock:: - find_free_header(const std::size_t alignment, std::size_t size) const -{ - /// This is the minimal size we need to allocate, - /// if and only if the address is perfectly aligned. - /// However, we can filter out all free blocks with a - /// size lower than that. - const auto size_including_header = size + sizeof(AllocationHeader); - - for (auto iterator = this->_free_header.begin(); iterator != this->_free_header.end(); ++iterator) - { - const auto &descriptor = *iterator; - - if (descriptor.size() >= size_including_header) - { - const auto free_block_start_address = std::uintptr_t(descriptor.header()); - - /// Calculate the number of bytes needed to fullfill the wanted aligntment for - /// the given free block. - /// The real allocation block will look like: - /// | (additional_size_to_fulfill_alignment[=0])(AllocationHeader)(size [+rest if free header has too - /// less left]) | - const auto allocation_start_address = free_block_start_address + sizeof(AllocationHeader); - const auto additional_size_to_fulfill_alignment = alignment - allocation_start_address % alignment; - - /// Check if the block has enough space to fullfill the alignment. - const auto size_to_fulfill_alignment = size_including_header + additional_size_to_fulfill_alignment; - if (descriptor.size() >= size_to_fulfill_alignment) - { - /// Check if we should split the block. - const auto remaining_size = descriptor.size() - size_to_fulfill_alignment; - - /// The header will be take totally because the rest would be too small. - /// We will increase the size (full free size - size for header - size before header for alignment). - return std::make_tuple(iterator, remaining_size > 256U, size_including_header, - additional_size_to_fulfill_alignment); - } - } - } - - return std::make_tuple(this->_free_header.end(), false, 0U, 0U); -} - -void *AllocatedBlock::allocate(const std::uint16_t worker_id, const std::uint8_t numa_node_id, - const std::size_t alignment, std::size_t size) -{ - const auto [iterator, is_split, size_including_header, additional_size_to_fulfill_alignment] = - this->find_free_header(alignment, size); - if (iterator == this->_free_header.end()) - { - return nullptr; - } - - auto *free_header = iterator->header(); - const auto free_header_size = iterator->size(); - auto next_iterator = this->_free_header.erase(iterator); - - const auto size_to_fulfill_alignment = size_including_header + additional_size_to_fulfill_alignment; - - if (is_split) - { - const auto remaining_size = free_header->size() - size_to_fulfill_alignment; - auto *new_free_header = new (reinterpret_cast(std::uintptr_t(free_header) + size_to_fulfill_alignment)) - FreeHeader(remaining_size, numa_node_id, this->_id); - - this->_free_header.insert(next_iterator, FreeHeaderDescriptor{new_free_header, remaining_size}); - } - else - { - size = free_header_size - sizeof(AllocationHeader) - additional_size_to_fulfill_alignment; - } - - const auto header_address = std::uintptr_t(free_header) + additional_size_to_fulfill_alignment; - auto *allocation_header = new (reinterpret_cast(header_address)) - AllocationHeader(size, additional_size_to_fulfill_alignment, worker_id, numa_node_id, this->_id); - return allocation_header + 1U; -} - -void AllocatedBlock::free(AllocationHeader *allocation_header) -{ - assert(this->_id == allocation_header->block_id()); - - const auto ptr = std::uintptr_t(allocation_header) - allocation_header->unused_size_before_header(); - - auto *free_header = new (reinterpret_cast(ptr)) FreeHeader( - allocation_header->unused_size_before_header() + sizeof(AllocationHeader) + allocation_header->size(), - allocation_header->numa_node_id(), this->_id); - - this->refund(free_header); -} - -void AllocatedBlock::refund(FreeHeader *free_header) -{ - assert(std::uintptr_t(free_header) >= std::uintptr_t(this->_data)); - assert((std::uintptr_t(free_header) + free_header->size()) <= (std::uintptr_t(this->_data) + this->_size)); - - auto descriptor = FreeHeaderDescriptor{free_header, free_header->size()}; - - /// Try to merge with the descriptor next to the free one. - auto next_descriptor = this->_free_header.upper_bound(descriptor); - if (next_descriptor != this->_free_header.end()) - { - if (free_header->is_right_neighbour(next_descriptor->header())) - { - descriptor.grow(next_descriptor->size()); - next_descriptor = this->_free_header.erase(next_descriptor); - } - } - - auto iterator = this->_free_header.insert(next_descriptor, descriptor); - - if (iterator != this->_free_header.begin()) - { - auto inserted_iterator = iterator--; - - if (iterator->header()->is_right_neighbour( - free_header)) /// Iterator is now the free header before inserted_iterator. - { - auto new_descriptor = *iterator; - new_descriptor.grow(inserted_iterator->size()); - - /// Remove the i-1 and i. - this->_free_header.erase(inserted_iterator); - auto next_iterator = this->_free_header.erase(iterator); - - /// Re-insert as a grown header. - this->_free_header.insert(next_iterator, new_descriptor); - } - } -} - -WorkerHeap::WorkerHeap(std::uint16_t worker_id, std::uint8_t numa_node_id) - : _worker_id(worker_id), _numa_node_id(numa_node_id) -{ -} - -WorkerHeap::WorkerHeap(mx::memory::dynamic::local::WorkerHeap &&other) noexcept - : _worker_id(other._worker_id), _numa_node_id(other._numa_node_id), _next_block_id(other._next_block_id) -{ - for (auto i = 0U; i < config::max_numa_nodes(); ++i) - { - this->_allocated_blocks[i] = std::move(other._allocated_blocks[i]); - this->_allocated_block_indices[i] = std::move(other._allocated_block_indices[i]); - - FreeHeader *free_header; - while ((free_header = other._remote_free_lists[i].pop_front()) != nullptr) - { - this->_remote_free_lists[i].push_back(free_header); - } - } -} - -void *WorkerHeap::allocate(const std::uint8_t numa_node_id, const std::size_t alignment, const std::size_t size) -{ - /// (1) Check all blocks for free memory. - auto &numa_blocks = this->_allocated_blocks[numa_node_id]; - for (auto i = std::int64_t(numa_blocks.size() - 1U); i >= 0; --i) - { - auto *allocated_block = numa_blocks[i].allocate(this->_worker_id, numa_node_id, alignment, size); - if (allocated_block != nullptr) - { - return allocated_block; - } - } - - /// (2) Check free list from other cores for free memory. - FreeHeader *header; - while ((header = this->_remote_free_lists[numa_node_id].pop_front()) != nullptr) - { - header->next(nullptr); - - const auto qualifies = header->size() >= size; - - auto &index = this->_allocated_block_indices[header->numa_node_id()]; - if (auto iterator = index.find(header->block_id()); iterator != index.end()) - { - auto &block = this->_allocated_blocks[header->numa_node_id()][iterator->second]; - assert(block.id() == header->block_id()); - block.refund(header); - - if (qualifies) - { - auto *allocation = block.allocate(this->_worker_id, numa_node_id, alignment, size); - if (allocation != nullptr) - { - return allocation; - } - } - } - } - - /// (3) Allocate a new block. - const auto size_to_alloc_from_global_heap = std::max( - AllocatedBlock::DEFAULT_SIZE_IN_BYTES, alignment_helper::next_multiple(size + sizeof(AllocationHeader), 64UL)); - auto *data = GlobalHeap::allocate(numa_node_id, size_to_alloc_from_global_heap); - auto &allocated_block = this->_allocated_blocks[numa_node_id].emplace_back(this->_next_block_id++, numa_node_id, - size_to_alloc_from_global_heap, data); - - /// Update the index. - this->_allocated_block_indices[numa_node_id].insert( - std::make_pair(allocated_block.id(), this->_allocated_blocks[numa_node_id].size() - 1U)); - - return allocated_block.allocate(this->_worker_id, numa_node_id, alignment, size); -} - -void WorkerHeap::free(AllocationHeader *allocated_block) -{ - auto &index = this->_allocated_block_indices[allocated_block->numa_node_id()]; - if (auto iterator = index.find(allocated_block->block_id()); iterator != index.end()) - { - this->_allocated_blocks[allocated_block->numa_node_id()][iterator->second].free(allocated_block); - return; - } -} - -void WorkerHeap::release_free_memory() -{ - this->refund_remote_freed_memory(); - - for (auto numa_node_id = 0U; numa_node_id < this->_allocated_blocks.size(); ++numa_node_id) - { - auto &allocated_blocks = this->_allocated_blocks[numa_node_id]; - - allocated_blocks.erase(std::remove_if(allocated_blocks.begin(), allocated_blocks.end(), - [](const auto &block) { return block.is_free(); }), - allocated_blocks.end()); - - auto &index = this->_allocated_block_indices[numa_node_id]; - index.clear(); - for (auto i = 0UL; i < allocated_blocks.size(); ++i) - { - index.insert(std::make_pair(allocated_blocks[i].id(), i)); - } - } -} - -void WorkerHeap::release_all_memory() -{ - for (auto &allocated_blocks : this->_allocated_blocks) - { - allocated_blocks.clear(); - } - - for (auto &index : this->_allocated_block_indices) - { - index.clear(); - } -} - -void WorkerHeap::refund_remote_freed_memory() -{ - for (auto i = 0U; i < this->_remote_free_lists.max_size(); ++i) - { - /// Check local numa region first. - const auto nid = (this->_numa_node_id + i) & (this->_remote_free_lists.max_size() - 1U); - FreeHeader *header; - while ((header = this->_remote_free_lists[nid].pop_front()) != nullptr) - { - header->next(nullptr); - - auto &index = this->_allocated_block_indices[header->numa_node_id()]; - if (auto iterator = index.find(header->block_id()); iterator != index.end()) - { - auto &block = this->_allocated_blocks[header->numa_node_id()][iterator->second]; - assert(block.id() == header->block_id()); - block.refund(header); - } - } - } -} - -void WorkerHeap::initialize(const std::uint8_t numa_nodes) -{ - for (auto numa_node_id = 0U; numa_node_id < numa_nodes; ++numa_node_id) - { - auto &index = this->_allocated_block_indices[numa_node_id]; - if (index.max_size() < 1024U) - { - index.reserve(1024U); - } - - if (this->_allocated_blocks[numa_node_id].empty()) - { - const auto size = AllocatedBlock::DEFAULT_SIZE_IN_BYTES * - (1U + (static_cast(numa_node_id == this->_numa_node_id) * 3U)); - - auto *data = GlobalHeap::allocate(numa_node_id, size); - auto &block = this->_allocated_blocks[numa_node_id].emplace_back(this->_next_block_id++, numa_node_id, size, data); - - index.insert(std::make_pair(block.id(), this->_allocated_blocks[numa_node_id].size() - 1U)); - } - } -} - -bool WorkerHeap::is_free() const noexcept -{ - for (const auto &allocated_blocks : this->_allocated_blocks) - { - for (const auto &block : allocated_blocks) - { - if (block.is_free() == false) - { - return false; - } - } - } - - return true; -} - -Allocator::Allocator(const util::core_set &cores) : _count_workers(cores.count_cores()) -{ - this->_worker_local_heaps = reinterpret_cast( - GlobalHeap::allocate_cache_line_aligned(sizeof(WorkerHeap) * cores.count_cores())); - for (auto i = std::uint16_t(0U); i < cores.count_cores(); ++i) - { - auto numa_node_id = cores.numa_node_id(i); - new (reinterpret_cast(&this->_worker_local_heaps[i])) WorkerHeap(i, numa_node_id); - this->_numa_node_ids[i] = numa_node_id; - } -} - -void Allocator::initialize_heap(const std::uint16_t worker_id, const std::uint8_t count_numa_nodes) -{ - this->_worker_local_heaps[worker_id].initialize(count_numa_nodes); -} - -Allocator::~Allocator() -{ - for (auto i = 0U; i < this->_count_workers; ++i) - { - this->_worker_local_heaps[i].~WorkerHeap(); - } - std::free(this->_worker_local_heaps); -} - -void *Allocator::allocate(const std::uint16_t worker_id, const std::uint8_t numa_node_id, const std::size_t alignment, - const std::size_t size) -{ - return this->_worker_local_heaps[worker_id].allocate(numa_node_id, alignment, size); -} - -void Allocator::free(const std::uint16_t calling_worker_id, void *pointer) -{ - auto *allocation_header = reinterpret_cast(std::uintptr_t(pointer) - sizeof(AllocationHeader)); - auto &heap = this->_worker_local_heaps[allocation_header->worker_id()]; - - if (allocation_header->worker_id() == calling_worker_id) - { - heap.free(allocation_header); - } - else - { - heap.free(this->_numa_node_ids[calling_worker_id], allocation_header); - } -} - -void Allocator::free(void *pointer) -{ - auto *allocation_header = reinterpret_cast(std::uintptr_t(pointer) - sizeof(AllocationHeader)); - auto &heap = _worker_local_heaps[allocation_header->worker_id()]; - - heap.free(system::cpu::node_id(), allocation_header); -} - -void Allocator::reset(const util::core_set &cores, bool force_free_memory) -{ - if (force_free_memory) - { - for (auto i = 0U; i < this->_count_workers; ++i) - { - this->_worker_local_heaps[i].release_all_memory(); - } - } - else - { - for (auto i = 0U; i < this->_count_workers; ++i) - { - this->_worker_local_heaps[i].release_free_memory(); - } - } - - if (this->_count_workers < cores.count_cores()) - { - const auto old_count_workers = std::exchange(this->_count_workers, cores.count_cores()); - - auto *old_local_worker_heaps = this->_worker_local_heaps; - auto *new_local_worker_heaps = reinterpret_cast( - GlobalHeap::allocate_cache_line_aligned(sizeof(WorkerHeap) * cores.count_cores())); - - /// Re-initialize old workers on new storage. - auto worker_id = 0U; - for (; worker_id < old_count_workers; ++worker_id) - { - const auto numa_node_id = cores.numa_node_id(worker_id); - new (reinterpret_cast(&new_local_worker_heaps[worker_id])) - WorkerHeap(std::move(old_local_worker_heaps[worker_id])); - this->_numa_node_ids[worker_id] = numa_node_id; - } - - /// Create new workers on new storage. - for (; worker_id < cores.count_cores(); ++worker_id) - { - const auto numa_node_id = cores.numa_node_id(worker_id); - new (reinterpret_cast(&new_local_worker_heaps[worker_id])) WorkerHeap(worker_id, numa_node_id); - this->_numa_node_ids[worker_id] = numa_node_id; - } - - /// Free old storage. - std::free(old_local_worker_heaps); - this->_worker_local_heaps = new_local_worker_heaps; - } -} - -bool Allocator::is_free() const noexcept -{ - for (auto i = 0U; i < this->_count_workers; ++i) - { - if (this->_worker_local_heaps[i].is_free() == false) - { - return false; - } - } - - return true; -} diff --git a/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h b/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h deleted file mode 100644 index 085f6b6003..0000000000 --- a/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h +++ /dev/null @@ -1,345 +0,0 @@ -#pragma once - -#include "config.h" -#include "global_heap.h" -#include -#include -#include -#include -#include -#include -#include -#include - -namespace mx::memory::dynamic::local { -/** - * Header of a free element. - */ -class FreeHeader -{ -public: - constexpr FreeHeader(const std::size_t size, const std::uint8_t numa_node_id, const std::uint32_t block_id) noexcept - : _size(size), _numa_node_id(numa_node_id), _block_id(block_id) - { - } - ~FreeHeader() noexcept = default; - - [[nodiscard]] std::size_t size() const noexcept { return _size; } - [[nodiscard]] std::uint8_t numa_node_id() const noexcept { return _numa_node_id; } - [[nodiscard]] std::uint32_t block_id() const noexcept { return _block_id; } - [[nodiscard]] FreeHeader *next() const noexcept { return _next; } - - void next(FreeHeader *next) noexcept - { - assert(next != this); - _next = next; - } - - [[nodiscard]] bool is_right_neighbour(FreeHeader *possible_right_neighbour) - { - assert(this->_block_id == possible_right_neighbour->_block_id); - - return (std::uintptr_t(this) + _size) == std::uintptr_t(possible_right_neighbour); - } - - void append(FreeHeader *other) { grow(other->_size); } - - void grow(const std::size_t size) { _size += size; } - -private: - /// Size of the full block, including the header size. - /// We include the header size because that is the size that is usable for allocation. - std::size_t _size; - - /// Id of the numa node the block was allocated in. Needed when returning - /// remote free memory. - const std::uint8_t _numa_node_id; - - /// Id of the block within the worker heap. - const std::uint32_t _block_id; - - /// Will be used for allocation within allocation block - /// and for queue in remote free list. - FreeHeader *_next{nullptr}; -}; - -/** - * Header of a block that is allocated. - */ -class AllocationHeader -{ -public: - constexpr AllocationHeader(const std::size_t size, const std::uint16_t unused_size_before_header, - const std::uint16_t worker_id, const std::uint8_t numa_node_id, - const std::uint32_t block_id) noexcept - : _size(size), _unused_size_before_header(unused_size_before_header), _worker_id(worker_id), - _numa_node_id(numa_node_id), _block_id(block_id) - { - } - - ~AllocationHeader() noexcept = default; - - [[nodiscard]] std::size_t size() const noexcept { return _size; } - [[nodiscard]] std::uint16_t unused_size_before_header() const noexcept { return _unused_size_before_header; } - [[nodiscard]] std::uint16_t worker_id() const noexcept { return _worker_id; } - [[nodiscard]] std::uint8_t numa_node_id() const noexcept { return _numa_node_id; } - [[nodiscard]] std::uint32_t block_id() const noexcept { return _block_id; } - - [[nodiscard]] FreeHeader *to_free_header() const noexcept - { - const auto size = _size + _unused_size_before_header + sizeof(AllocationHeader); - return new (reinterpret_cast(std::uintptr_t(this) - _unused_size_before_header)) - FreeHeader(size, _numa_node_id, _block_id); - } - -private: - /// Size of the block after the header. - const std::size_t _size; - - /// Size in front of the header that is not used but needed for alignment. - const std::uint16_t _unused_size_before_header; - - /// Id of the worker. - const std::uint16_t _worker_id; - - /// Numa region the block was allocated in. - std::uint8_t _numa_node_id; - - /// Id of the block within the worker heap. - const std::uint32_t _block_id; -}; - -/** - * A block allocated from global memory into a worker-local heap. - */ -class AllocatedBlock -{ -private: - class FreeHeaderDescriptor - { - public: - constexpr FreeHeaderDescriptor(FreeHeader *header, const std::size_t size) noexcept - : _header(header), _size(size) - { - } - - ~FreeHeaderDescriptor() noexcept = default; - - [[nodiscard]] FreeHeader *header() const noexcept { return _header; } - [[nodiscard]] std::size_t size() const noexcept { return _size; } - - void grow(const std::size_t size) noexcept - { - _size += size; - _header->grow(size); - } - - bool operator<(const FreeHeaderDescriptor other) const noexcept - { - return std::uintptr_t(_header) < std::uintptr_t(other._header); - } - - private: - FreeHeader *_header; - std::size_t _size; - }; - -public: - static inline constexpr auto DEFAULT_SIZE_IN_BYTES = 1024UL * 1024UL * 128U; - - AllocatedBlock(const std::uint32_t id, const std::uint8_t numa_node_id, const std::size_t size, void *data) noexcept - : _id(id), _numa_node_id(numa_node_id), _size(size), _data(data) - { - _free_header.insert(FreeHeaderDescriptor{new (_data) FreeHeader(size, 0U, id), size}); - } - - AllocatedBlock(AllocatedBlock &&other) noexcept - : _id(other._id), _numa_node_id(other._numa_node_id), _size(other._size), _data(std::exchange(other._data, nullptr)), - _free_header(std::move(other._free_header)) - { - } - - ~AllocatedBlock() - { - if (_data != nullptr) - { - GlobalHeap::free(std::exchange(_data, nullptr), _size, _numa_node_id); - } - } - - AllocatedBlock &operator=(AllocatedBlock &&other) noexcept - { - _id = other._id; - _size = other._size; - _data = std::exchange(other._data, nullptr); - _free_header = std::move(other._free_header); - return *this; - } - - [[nodiscard]] std::uint32_t id() const noexcept { return _id; } - [[nodiscard]] void *data() const noexcept { return _data; } - [[nodiscard]] std::size_t size() const noexcept { return _size; } - - [[nodiscard]] void *allocate(std::uint16_t worker_id, std::uint8_t numa_node_id, std::size_t alignment, - std::size_t size); - void free(AllocationHeader *allocation_header); - void refund(FreeHeader *free_header); - - [[nodiscard]] bool is_free() const noexcept - { - return _free_header.size() == 1U && _free_header.begin()->size() == _size; - } - - [[nodiscard]] std::tuple::iterator, bool, std::size_t, std::size_t> find_free_header( - std::size_t alignment, std::size_t size) const; - -private: - std::uint32_t _id; - std::uint8_t _numa_node_id; - std::size_t _size; - void *_data; - std::set _free_header; -}; - -class alignas(64) WorkerHeap -{ -public: - WorkerHeap(std::uint16_t worker_id, std::uint8_t numa_node_id); - WorkerHeap(WorkerHeap &&other) noexcept; - ~WorkerHeap() = default; - - /** - * Allocates memory from the list of allocated blocks, - * or, when no memory available, from the remote free list. - * If, however, no memory is available, a new block is allocated. - * - * @param numa_node_id NUMA node id to allocate memory for. - * @param alignment Alignment of the allocated address. - * @param size Size to allocate. - * @return Pointer to the allocated memory. - */ - void *allocate(std::uint8_t numa_node_id, std::size_t alignment, std::size_t size); - - /** - * Frees memory from a remote worker. - * The memory will be freed lazy, using - * a list that will be used for allocation. - * - * @param calling_numa_id NUMA node id of the freeing worker. - * @param allocated_item Header to the allocation. - */ - void free(const std::uint8_t calling_numa_id, AllocationHeader *allocated_item) - { - auto *free_header = allocated_item->to_free_header(); - _remote_free_lists[calling_numa_id].push_back(free_header); - } - - /** - * Frees a local-worker allocated block. - * - * @param allocated_block Header to the allocation. - */ - void free(AllocationHeader *allocated_block); - - /** - * Releases all free blocks. - */ - void release_free_memory(); - - /** - * Releases all blocks. - */ - void release_all_memory(); - - /** - * Refunds memory from the remote list. - */ - void refund_remote_freed_memory(); - - void initialize(std::uint8_t numa_nodes); - - [[nodiscard]] bool is_free() const noexcept; - -private: - const std::uint16_t _worker_id; - const std::uint8_t _numa_node_id; - std::uint32_t _next_block_id{0U}; - - /// Every worker can allocate blocks for every numa region. - std::array, config::max_numa_nodes()> _allocated_blocks; - - /// Index for every numa node that points from block_id to index in _allocated_blocks. - std::array, config::max_numa_nodes()> _allocated_block_indices; - - std::array, config::max_numa_nodes()> _remote_free_lists; -}; - -class Allocator -{ -public: - Allocator(const util::core_set &cores); - ~Allocator(); - - void initialize_heap(std::uint16_t worker_id, std::uint8_t count_numa_nodes); - - void *allocate(std::uint16_t worker_id, std::uint8_t numa_node_id, std::size_t alignment, std::size_t size); - void free(std::uint16_t calling_worker_id, void *pointer); - - /** - * Frees the memory always as a "remote" caller. - * For performance reason, this should be used carefully! - * - * @param pointer Pointer to the data. - */ - void free(void *pointer); - - /** - * Resets all worker-local allocators. - * - * @param cores New core set (may change in contrast to the current). - * @param force_free_memory If set to true, memory should be freed. - */ - void reset(const util::core_set &cores, bool force_free_memory); - - /** - * Cleans the remote free'd memory of a worker-local heap. - * - * @param worker_id Worker id to clean up. - */ - void clean_up_remote_freed_memory(const std::uint16_t worker_id) - { - _worker_local_heaps[worker_id].refund_remote_freed_memory(); - } - - /** - * @return True, if all blocks of all numa regions are free. - */ - [[nodiscard]] bool is_free() const noexcept; - -private: - /// Map from worker id to numa node id. - std::array _numa_node_ids; - - /// One heap for every worker. - WorkerHeap *_worker_local_heaps; - - std::uint16_t _count_workers; -}; - -class CleanUpMemoryTask final : public tasking::TaskInterface -{ -public: - constexpr CleanUpMemoryTask(Allocator &allocator) noexcept : _allocator(allocator) {} - ~CleanUpMemoryTask() noexcept override = default; - - tasking::TaskResult execute(const std::uint16_t worker_id) override - { - _allocator.clean_up_remote_freed_memory(worker_id); - - return tasking::TaskResult::make_remove(); - } - -private: - Allocator &_allocator; -}; -} // namespace mx::memory::dynamic::local \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/queue/dynamic_ringpuffer.h b/repos/ealanos/src/lib/mx/queue/dynamic_ringpuffer.h deleted file mode 100644 index d4cf9ba758..0000000000 --- a/repos/ealanos/src/lib/mx/queue/dynamic_ringpuffer.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include -#include - -namespace mx::queue -{ -template -class DynamicRingpuffer -{ -public: - DynamicRingpuffer() - { - _data = std::aligned_alloc(64U, sizeof(T*) * _capacity); - } - - ~DynamicRingpuffer() - { - std::free(_data); - } - - void push_back(T* item) - { - const auto index = (_head++) & _capacity; - if (index == _tail) - { - /// TODO: Reallocate - } - _data[index] = item; - } -private: - T **_data; - std::uint64_t _capacity {1024U}; - std::uint64_t _head {0U}; - std::uint64_t _tail {0U}; - - -}; -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/queue/list.h b/repos/ealanos/src/lib/mx/queue/list.h deleted file mode 100644 index d451060829..0000000000 --- a/repos/ealanos/src/lib/mx/queue/list.h +++ /dev/null @@ -1,149 +0,0 @@ -#pragma once - -#include - -namespace mx::queue { -/** - * Single producer and consumer queue. This queue is not thread safe. - */ -template class alignas(64) List -{ -public: - constexpr List() noexcept = default; - ~List() noexcept = default; - - /** - * Inserts an item into the queue. - * @param item Item to be inserted. - */ - void push_back(T *item) noexcept - { - item->next(nullptr); - - if (_tail != nullptr) [[likely]] - { - _tail->next(item); - _tail = item; - } - else - { - _head = _tail = item; - } - } - - /** - * Inserts a list of items into the queue. - * The items have to be concatenated. - * - * @param first First item to be inserted. - * @param last Last item to be inserted. - */ - void push_back(T *first, T *last) noexcept - { - last->next(nullptr); - - if (_tail != nullptr) [[likely]] - { - _tail->next(first); - _tail = last; - } - else - { - _head = first; - _tail = last; - } - } - - /** - * @return Begin of the queue. - */ - [[nodiscard]] T *begin() noexcept { return _head; } - - /** - * @return End of the queue. - */ - [[nodiscard]] const T *end() const noexcept { return _tail; } - - /** - * @return End of the queue. - */ - [[nodiscard]] T *end() noexcept { return _tail; } - - /** - * @return True, when the queue is empty. - */ - [[nodiscard]] bool empty() const noexcept { return _head == nullptr; } - - /** - * @return Takes and removes the first item from the queue. - */ - T *pop_front() noexcept - { - if (_head == nullptr) [[unlikely]] - { - return nullptr; - } - - auto *head = _head; - auto *new_head = head->next(); - if (new_head == nullptr) [[unlikely]] - { - _tail = nullptr; - } - - _head = new_head; - return head; - } - - std::pair pop_front(const std::uint16_t limit) noexcept - { - auto count = 0U; - auto *head = _head; - auto *current = _head; - do - { - current = current->next(); - ++count; - } while (count < limit && current != nullptr); - - _head = current; - if (current == nullptr) [[unlikely]] - { - _tail = nullptr; - } - - return std::make_pair(head, count); - } - - /** - * Pops all items from the list. The items will be concatenated. - * - * @return Pair of first and last task - */ - [[nodiscard]] std::pair pop() noexcept - { - if (_head == nullptr) - { - return std::make_pair(nullptr, nullptr); - } - - if (_head == _tail) - { - auto *head = _head; - _head = _tail = nullptr; - return std::make_pair(head, nullptr); - } - - auto *head = std::exchange(_head, nullptr); - auto *tail = std::exchange(_tail, nullptr); - return std::make_pair(head, tail); - } - -private: - // Pointer to the head. - T *_head{nullptr}; - - // Pointer to the tail. - T *_tail{nullptr}; -}; -} // namespace mx::queue \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/queue/priority_queue.h b/repos/ealanos/src/lib/mx/queue/priority_queue.h deleted file mode 100644 index 1c009d5113..0000000000 --- a/repos/ealanos/src/lib/mx/queue/priority_queue.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace mx::queue { -template class PriorityQueue -{ -public: - PriorityQueue() = default; - ~PriorityQueue() = default; - - template Q &get() noexcept - { - static_assert(static_cast(P) >= static_cast(MIN_PRIORITY)); - static_assert(static_cast(P) <= static_cast(MAX_PRIORITY)); - - return _queues[static_cast(P) - static_cast(MIN_PRIORITY)]; - } - - template const Q &get() const noexcept - { - static_assert(static_cast(P) >= static_cast(MIN_PRIORITY)); - static_assert(static_cast(P) <= static_cast(MAX_PRIORITY)); - - return _queues[static_cast(P) - static_cast(MIN_PRIORITY)]; - } - - Q &get(const tasking::priority priority) noexcept - { - assert(priority >= static_cast(MIN_PRIORITY)); - assert(priority <= static_cast(MAX_PRIORITY)); - - return _queues[static_cast(priority) - static_cast(MIN_PRIORITY)]; - } - - const Q &get(const tasking::priority priority) const noexcept - { - assert(priority >= static_cast(MIN_PRIORITY)); - assert(priority <= static_cast(MAX_PRIORITY)); - - return _queues[static_cast(priority) - static_cast(MIN_PRIORITY)]; - } - -private: - std::array(MAX_PRIORITY) - static_cast(MIN_PRIORITY) + 1U> _queues{}; -}; -} // namespace mx::queue \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/resource/annotation.h b/repos/ealanos/src/lib/mx/resource/annotation.h deleted file mode 100644 index 5d16e6f715..0000000000 --- a/repos/ealanos/src/lib/mx/resource/annotation.h +++ /dev/null @@ -1,146 +0,0 @@ -#pragma once -#include -#include -#include - -namespace mx::resource { -enum expected_access_frequency : std::uint8_t -{ - excessive = 0U, - high = 1U, - normal = 2U, - unused = 3U, -}; - -enum expected_read_write_ratio : std::uint8_t -{ - heavy_read = 0U, - mostly_read = 1U, - balanced = 2U, - mostly_written = 3U, - heavy_written = 4U -}; - -class annotation -{ -public: - constexpr annotation() noexcept = default; - constexpr explicit annotation(const std::uint8_t node_id) noexcept : _target(node_id) {} - constexpr explicit annotation(const std::uint16_t worker_id) noexcept : _target(worker_id) {} - constexpr explicit annotation(const synchronization::isolation_level isolation_level) noexcept - : _isolation_level(isolation_level) - { - } - constexpr explicit annotation(const expected_access_frequency access_frequency) noexcept - : _access_frequency(access_frequency) - { - } - constexpr annotation(const std::uint16_t worker_id, const synchronization::isolation_level isolation_level) noexcept - : _target(worker_id), _isolation_level(isolation_level) - { - } - constexpr annotation(const std::uint8_t node_id, const synchronization::isolation_level isolation_level) noexcept - : _target(node_id), _isolation_level(isolation_level) - { - } - constexpr annotation(const std::uint8_t node_id, const synchronization::isolation_level isolation_level, - const synchronization::protocol preferred_protocol) noexcept - : _target(node_id), _isolation_level(isolation_level), _preferred_protocol(preferred_protocol) - { - } - - constexpr annotation(const std::uint16_t worker_id, const synchronization::isolation_level isolation_level, - const synchronization::protocol preferred_protocol) noexcept - : _target(worker_id), _isolation_level(isolation_level), _preferred_protocol(preferred_protocol) - { - } - - constexpr annotation(const std::uint8_t node_id, const expected_access_frequency access_frequency) noexcept - : _target(node_id), _access_frequency(access_frequency) - { - } - constexpr annotation(const synchronization::isolation_level isolation_level, - const expected_access_frequency access_frequency) noexcept - : _access_frequency(access_frequency), _isolation_level(isolation_level) - { - } - constexpr annotation(const synchronization::isolation_level isolation_level, - const synchronization::protocol preferred_protocol, - const expected_access_frequency access_frequency) noexcept - : _access_frequency(access_frequency), _isolation_level(isolation_level), - _preferred_protocol(preferred_protocol) - { - } - constexpr annotation(const synchronization::isolation_level isolation_level, - const synchronization::protocol preferred_protocol, - const expected_access_frequency access_frequency, - const expected_read_write_ratio read_write_ratio) noexcept - : _access_frequency(access_frequency), _read_write_ratio(read_write_ratio), _isolation_level(isolation_level), - _preferred_protocol(preferred_protocol) - { - } - constexpr annotation(const std::uint8_t node_id, const synchronization::isolation_level isolation_level, - const expected_access_frequency access_frequency) noexcept - : _target(node_id), _access_frequency(access_frequency), _isolation_level(isolation_level) - { - } - constexpr annotation(const std::uint8_t node_id, const synchronization::isolation_level isolation_level, - const synchronization::protocol preferred_protocol, - const expected_access_frequency access_frequency) noexcept - : _target(node_id), _access_frequency(access_frequency), _isolation_level(isolation_level), - _preferred_protocol(preferred_protocol) - { - } - - constexpr annotation(annotation &&) noexcept = default; - constexpr annotation(const annotation &) noexcept = default; - - ~annotation() = default; - - annotation &operator=(annotation &&) noexcept = default; - annotation &operator=(const annotation &) noexcept = default; - - [[nodiscard]] bool has_numa_node_id() const noexcept { return std::holds_alternative(_target); } - [[nodiscard]] std::uint8_t numa_node_id() const noexcept { return std::get(_target); } - - [[nodiscard]] bool has_worker_id() const noexcept { return std::holds_alternative(_target); } - [[nodiscard]] std::uint16_t worker_id() const noexcept { return std::get(_target); } - [[nodiscard]] expected_access_frequency access_frequency() const noexcept { return _access_frequency; } - [[nodiscard]] expected_read_write_ratio read_write_ratio() const noexcept { return _read_write_ratio; } - [[nodiscard]] synchronization::isolation_level isolation_level() const noexcept { return _isolation_level; } - [[nodiscard]] synchronization::protocol preferred_protocol() const noexcept { return _preferred_protocol; } - - bool operator==(const synchronization::isolation_level isolation_level) const noexcept - { - return _isolation_level == isolation_level; - } - - bool operator!=(const synchronization::isolation_level isolation_level) const noexcept - { - return _isolation_level != isolation_level; - } - - bool operator==(const synchronization::protocol protocol) const noexcept { return _preferred_protocol == protocol; } - - bool operator!=(const synchronization::protocol protocol) const noexcept { return _preferred_protocol != protocol; } - -private: - // Preferred NUMA region or CPU core (if any). - std::variant _target{std::monostate{}}; - - // Expected access frequency; normal by default. - enum expected_access_frequency _access_frequency - { - expected_access_frequency::normal - }; - - // Expected read/write ratio; normal by default. - expected_read_write_ratio _read_write_ratio{expected_read_write_ratio::balanced}; - - // Preferred isolation level; no synchronization by default. - synchronization::isolation_level _isolation_level{synchronization::isolation_level::None}; - - // Preferred synchronization protocol (queue, latch, ...); no synchronization by default. - synchronization::protocol _preferred_protocol{synchronization::protocol::None}; -}; -} // namespace mx::resource \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/resource/builder.cpp b/repos/ealanos/src/lib/mx/resource/builder.cpp index 068d39c0f7..e0efb0c36d 100644 --- a/repos/ealanos/src/lib/mx/resource/builder.cpp +++ b/repos/ealanos/src/lib/mx/resource/builder.cpp @@ -3,57 +3,52 @@ using namespace mx::resource; -std::pair Builder::schedule(const resource::annotation &annotation) +std::pair Builder::schedule(const resource::hint &hint) { // Scheduling was done by the hint. - if (annotation.has_worker_id()) + if (hint.has_channel_id()) { - this->_scheduler.predict_usage(annotation.worker_id(), annotation.access_frequency()); - return std::make_pair(annotation.worker_id(), this->_scheduler.numa_node_id(annotation.worker_id())); + this->_scheduler.predict_usage(hint.channel_id(), hint.access_frequency()); + return std::make_pair(hint.channel_id(), this->_scheduler.numa_node_id(hint.channel_id())); } // Schedule resources round robin to the channels. - const auto count_worker = this->_scheduler.count_cores(); - auto worker_id = this->_round_robin_worker_id.fetch_add(1U, std::memory_order_relaxed) % count_worker; + const auto count_channels = this->_scheduler.count_channels(); + auto channel_id = this->_round_robin_channel_id.fetch_add(1U, std::memory_order_relaxed) % count_channels; // If the chosen channel contains an excessive accessed resource, get another. - if (count_worker > 2U && annotation.isolation_level() == synchronization::isolation_level::Exclusive && - this->_scheduler.has_excessive_usage_prediction(worker_id)) + if (count_channels > 2U && hint.isolation_level() == synchronization::isolation_level::Exclusive && + this->_scheduler.has_excessive_usage_prediction(channel_id)) { - worker_id = this->_round_robin_worker_id.fetch_add(1U, std::memory_order_relaxed) % count_worker; + channel_id = this->_round_robin_channel_id.fetch_add(1U, std::memory_order_relaxed) % count_channels; } - this->_scheduler.predict_usage(worker_id, annotation.access_frequency()); + this->_scheduler.predict_usage(channel_id, hint.access_frequency()); - // TODO: NUMA NODE ID is for worker, not channel. - const auto numa_node_id = - annotation.has_numa_node_id() ? annotation.numa_node_id() : this->_scheduler.numa_node_id(worker_id); + const auto numa_node_id = hint.has_numa_node_id() ? hint.numa_node_id() : this->_scheduler.numa_node_id(channel_id); - return std::make_pair(worker_id, numa_node_id); + return std::make_pair(channel_id, numa_node_id); } -mx::synchronization::primitive Builder::isolation_level_to_synchronization_primitive( - const annotation &annotation) noexcept +mx::synchronization::primitive Builder::isolation_level_to_synchronization_primitive(const hint &hint) noexcept { // The developer did not define any fixed protocol for // synchronization; we choose one depending on the hints. - if (annotation == synchronization::protocol::None) + if (hint == synchronization::protocol::None) { - return synchronization::PrimitiveMatrix::select_primitive( - annotation.isolation_level(), annotation.access_frequency(), annotation.read_write_ratio()); + return synchronization::PrimitiveMatrix::select_primitive(hint.isolation_level(), hint.access_frequency(), + hint.read_write_ratio()); } // The developer hinted a specific protocol (latched, queued, ...) // and a relaxed isolation level. - if (annotation == synchronization::isolation_level::ExclusiveWriter) + if (hint == synchronization::isolation_level::ExclusiveWriter) { - switch (annotation.preferred_protocol()) + switch (hint.preferred_protocol()) { case synchronization::protocol::Latch: return synchronization::primitive::ReaderWriterLatch; case synchronization::protocol::OLFIT: return synchronization::primitive::OLFIT; - case synchronization::protocol::RestrictedTransactionalMemory: - return synchronization::primitive::RestrictedTransactionalMemory; default: return synchronization::primitive::ScheduleWriter; } @@ -61,19 +56,10 @@ mx::synchronization::primitive Builder::isolation_level_to_synchronization_primi // The developer hinted a specific protocol (latched, queued, ...) // and a strict isolation level. - if (annotation == synchronization::isolation_level::Exclusive) + if (hint == synchronization::isolation_level::Exclusive) { - switch (annotation.preferred_protocol()) - { - case synchronization::protocol::Latch: - return synchronization::primitive::ExclusiveLatch; - case synchronization::protocol::Batched: - return synchronization::primitive::Batched; - case synchronization::protocol::RestrictedTransactionalMemory: - return synchronization::primitive::RestrictedTransactionalMemory; - default: - return synchronization::primitive::ScheduleAll; - } + return hint == synchronization::protocol::Latch ? synchronization::primitive::ExclusiveLatch + : synchronization::primitive::ScheduleAll; } return mx::synchronization::primitive::None; diff --git a/repos/ealanos/src/lib/mx/resource/builder.d b/repos/ealanos/src/lib/mx/resource/builder.d index abaf2ba303..84d8f584e9 100644 --- a/repos/ealanos/src/lib/mx/resource/builder.d +++ b/repos/ealanos/src/lib/mx/resource/builder.d @@ -1,94 +1,53 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.d: \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.cpp \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ - /home/mml/genode-igb/repos/base/include/base/stdint.h \ /home/mml/genode-igb/repos/base/include/base/log.h \ /home/mml/genode-igb/repos/base/include/base/output.h \ + /home/mml/genode-igb/repos/base/include/base/stdint.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ /home/mml/genode-igb/repos/base/include/util/interface.h \ /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ /home/mml/genode-igb/repos/base/include/util/attempt.h \ /home/mml/genode-igb/repos/base/include/base/capability.h \ @@ -102,8 +61,10 @@ /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ /home/mml/genode-igb/repos/base/include/base/affinity.h \ /home/mml/genode-igb/repos/base/include/util/xml_node.h \ @@ -158,86 +119,70 @@ /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ /home/mml/genode-igb/repos/base/include/base/tslab.h \ /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/primitive_matrix.h /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: @@ -246,6 +191,8 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: @@ -254,124 +201,44 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: - -/home/mml/genode-igb/repos/base/include/base/stdint.h: - /home/mml/genode-igb/repos/base/include/base/log.h: /home/mml/genode-igb/repos/base/include/base/output.h: +/home/mml/genode-igb/repos/base/include/base/stdint.h: + +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: + /home/mml/genode-igb/repos/base/include/util/interface.h: /home/mml/genode-igb/repos/base/include/base/buffered_output.h: @@ -384,6 +251,12 @@ /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h: /home/mml/genode-igb/repos/base/include/util/attempt.h: @@ -410,10 +283,14 @@ /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: /home/mml/genode-igb/repos/base/include/base/affinity.h: @@ -522,96 +399,84 @@ /home/mml/genode-igb/repos/base/include/base/slab.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: +/home/mml/genode-igb/repos/libports/include/libc/component.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: +/home/mml/genode-igb/repos/base/include/rom_session/client.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: +/home/mml/genode-igb/repos/base/include/base/connection.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: +/home/mml/genode-igb/repos/base/include/util/retry.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: +/home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/primitive_matrix.h: diff --git a/repos/ealanos/src/lib/mx/resource/builder.h b/repos/ealanos/src/lib/mx/resource/builder.h index 8f7d92d93c..96a3285fed 100644 --- a/repos/ealanos/src/lib/mx/resource/builder.h +++ b/repos/ealanos/src/lib/mx/resource/builder.h @@ -1,11 +1,10 @@ #pragma once -#include "annotation.h" -#include "ptr.h" +#include "resource.h" #include #include #include +#include #include -#include #include #include #include @@ -21,7 +20,7 @@ namespace mx::resource { class Builder { public: - Builder(tasking::Scheduler &scheduler, memory::dynamic::local::Allocator &allocator) noexcept + Builder(tasking::Scheduler &scheduler, memory::dynamic::Allocator &allocator) noexcept : _allocator(allocator), _scheduler(scheduler) { } @@ -33,22 +32,17 @@ public: * size and arguments. The hint defines the synchronization * requirements and affects scheduling. * - * @param calling_worker_id Id of the calling worker for local allocation. * @param size Size of the data object. * @param hint Hint for scheduling and synchronization. * @param arguments Arguments to the constructor. * @return Tagged pointer holding the synchronization, assigned channel and pointer. */ template - ptr build(const std::uint16_t calling_worker_id, const std::size_t size, annotation &&annotation, - Args &&...arguments) noexcept + ptr build(const std::size_t size, resource::hint &&hint, Args &&... arguments) noexcept { #ifndef NDEBUG - if (annotation != synchronization::isolation_level::None && - (annotation != synchronization::isolation_level::Exclusive || - annotation != synchronization::protocol::Queue) && - (annotation != synchronization::isolation_level::Exclusive && - annotation != synchronization::protocol::Batched)) + if (hint != synchronization::isolation_level::None && + (hint != synchronization::isolation_level::Exclusive || hint != synchronization::protocol::Queue)) { if constexpr (std::is_base_of::value == false) { @@ -57,35 +51,13 @@ public: } #endif - const auto synchronization_method = Builder::isolation_level_to_synchronization_primitive(annotation); + const auto synchronization_method = Builder::isolation_level_to_synchronization_primitive(hint); - const auto [mapped_worker_id, numa_node_id] = schedule(annotation); + const auto [channel_id, numa_node_id] = schedule(hint); + const auto resource_information = information{channel_id, synchronization_method}; - auto *resource = new (_allocator.allocate(calling_worker_id, numa_node_id, system::cache::line_size(), size)) - T(std::forward(arguments)...); - - if constexpr (std::is_base_of::value) - { - switch (synchronization_method) - { - case synchronization::primitive::ExclusiveLatch: - case synchronization::primitive::RestrictedTransactionalMemory: - resource->initialize(ResourceInterface::SynchronizationType::Exclusive); - break; - case synchronization::primitive::ReaderWriterLatch: - resource->initialize(ResourceInterface::SynchronizationType::SharedWrite); - break; - case synchronization::primitive::OLFIT: - case synchronization::primitive::ScheduleWriter: - resource->initialize(ResourceInterface::SynchronizationType::OLFIT); - break; - default: - break; - } - } - - const auto resource_information = information{mapped_worker_id, synchronization_method}; - return ptr{resource, resource_information}; + return ptr{new (_allocator.allocate(numa_node_id, 64U, size)) T(std::forward(arguments)...), + resource_information}; } /** @@ -93,17 +65,14 @@ public: * The hint defines the synchronization * requirements and affects scheduling. * @param object - * @param annotation Hint for scheduling and synchronization. + * @param hint Hint for scheduling and synchronization. * @return Tagged pointer holding the synchronization, assigned channel and pointer. */ - template ptr build(T *object, annotation &&annotation) noexcept + template ptr build(T *object, resource::hint &&hint) noexcept { #ifndef NDEBUG - if (annotation != synchronization::isolation_level::None && - (annotation != synchronization::isolation_level::Exclusive || - annotation != synchronization::protocol::Queue) && - (annotation != synchronization::isolation_level::Exclusive && - annotation != synchronization::protocol::Batched)) + if (hint != synchronization::isolation_level::None && + (hint != synchronization::isolation_level::Exclusive || hint != synchronization::protocol::Queue)) { if constexpr (std::is_base_of::value == false) { @@ -112,18 +81,18 @@ public: } #endif - const auto synchronization_method = Builder::isolation_level_to_synchronization_primitive(annotation); - const auto [worker_id, _] = schedule(annotation); + const auto synchronization_method = Builder::isolation_level_to_synchronization_primitive(hint); + const auto [channel_id, _] = schedule(hint); - return ptr{object, information{worker_id, synchronization_method}}; + return ptr{object, information{channel_id, synchronization_method}}; } /** * Destroys the given data object. - * @param calling_worker_id Worker calling destroy for local free. + * @param core_id Executing core. * @param resource Tagged pointer to the data object. */ - template void destroy(const std::uint16_t calling_worker_id, const ptr resource) + template void destroy(const ptr resource) { // TODO: Revoke usage prediction? if (resource != nullptr) @@ -132,44 +101,44 @@ public: { if (synchronization::is_optimistic(resource.synchronization_primitive())) { - _scheduler.epoch_manager().add_to_garbage_collection(resource.get(), - resource.worker_id()); + _scheduler.epoch_manager().add_to_garbage_collection(resource.get(), + resource.channel_id()); return; } } // No need to reclaim memory. resource.get()->~T(); - _allocator.free(calling_worker_id, resource.get()); + _allocator.free(resource.get()); } } private: // Internal allocator for dynamic sized allocation. - memory::dynamic::local::Allocator &_allocator; + memory::dynamic::Allocator &_allocator; // Scheduler of MxTasking to get access to channels. tasking::Scheduler &_scheduler; // Next channel id for round-robin scheduling. - alignas(64) std::atomic_uint16_t _round_robin_worker_id{0U}; + alignas(64) std::atomic_uint16_t _round_robin_channel_id{0U}; /** * Schedules the resource to a channel, affected by the given hint. * - * @param annotation Hint for scheduling. + * @param hint Hint for scheduling. * @return Pair of Channel and NUMA node IDs. */ - std::pair schedule(const annotation &annotation); + std::pair schedule(const resource::hint &hint); /** * Determines the best synchronization method based on * synchronization requirement. * - * @param annotation Hint for choosing the primitive. + * @param isolation_level Synchronization requirement. + * @param prefer_latch Prefer latch for synchronization or latch-free? * @return Chosen synchronization method. */ - static synchronization::primitive isolation_level_to_synchronization_primitive( - const annotation &annotation) noexcept; + static synchronization::primitive isolation_level_to_synchronization_primitive(const hint &hint) noexcept; }; } // namespace mx::resource \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/resource/ptr.h b/repos/ealanos/src/lib/mx/resource/ptr.h deleted file mode 100644 index 8e2a837180..0000000000 --- a/repos/ealanos/src/lib/mx/resource/ptr.h +++ /dev/null @@ -1,99 +0,0 @@ -#pragma once - -#include "resource_interface.h" -#include -#include -#include -#include -#include -#include -#include - -namespace mx::resource { -/** - * Information of a resource, stored within - * the pointer to the resource. - */ -class information -{ -public: - constexpr information() noexcept = default; - explicit information(const std::uint16_t worker_id, - const synchronization::primitive synchronization_primitive) noexcept - : _worker_id(worker_id), _synchronization_primitive(static_cast(synchronization_primitive)) - { - } - - ~information() = default; - - [[nodiscard]] std::uint16_t worker_id() const noexcept { return _worker_id; } - [[nodiscard]] synchronization::primitive synchronization_primitive() const noexcept - { - return static_cast(_synchronization_primitive); - } - - void worker_id(const std::uint16_t worker_id) noexcept { _worker_id = worker_id; } - void synchronization_primitive(const synchronization::primitive primitive) noexcept - { - _synchronization_primitive = static_cast(primitive); - } - - information &operator=(const information &other) = default; - -private: - std::uint16_t _worker_id : 12 {0U}; - std::uint16_t _synchronization_primitive : 4 {0U}; -} __attribute__((packed)); - -/** - * Pointer to a resource, stores information about - * that resource. - */ -class ptr final : public memory::tagged_ptr -{ -public: - constexpr ptr() noexcept = default; - constexpr ptr(const std::nullptr_t /*nullptr*/) noexcept : memory::tagged_ptr(nullptr) {} - constexpr explicit ptr(void *ptr_, const information info = {}) noexcept - : memory::tagged_ptr(ptr_, info) - { - } - ~ptr() = default; - - ptr &operator=(const ptr &other) noexcept = default; - ptr &operator=(std::nullptr_t) noexcept - { - reset(nullptr); - return *this; - } - - [[nodiscard]] std::uint16_t worker_id() const noexcept { return info().worker_id(); } - [[nodiscard]] synchronization::primitive synchronization_primitive() const noexcept - { - return info().synchronization_primitive(); - } -} __attribute__((packed)); - -/** - * Casts the internal pointer of the resource pointer - * to a pointer typed by the given template parameter. - * - * @param resource Resource to cast. - * @return Pointer to the requested type. - */ -template static auto *ptr_cast(const ptr resource) noexcept -{ - return resource.template get(); -} - -} // namespace mx::resource - -namespace std { -template <> struct hash -{ - std::size_t operator()(const mx::resource::ptr ptr) const noexcept - { - return std::hash().operator()(ptr.get()); - } -}; -} // namespace std \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/resource/resource.h b/repos/ealanos/src/lib/mx/resource/resource.h new file mode 100644 index 0000000000..3746ba540b --- /dev/null +++ b/repos/ealanos/src/lib/mx/resource/resource.h @@ -0,0 +1,223 @@ +#pragma once + +#include "resource_interface.h" +#include +#include +#include +#include +#include +#include +#include + +namespace mx::resource { +/** + * Hint for creating resources by the resource interface. + * Encapsulates the requested numa region, synchronization requirements + * and expected access frequency. + */ +class hint +{ +public: + enum expected_access_frequency : std::uint8_t + { + excessive = 0U, + high = 1U, + normal = 2U, + unused = 3U, + }; + + enum expected_read_write_ratio : std::uint8_t + { + heavy_read = 0U, + mostly_read = 1U, + balanced = 2U, + mostly_written = 3U, + heavy_written = 4U + }; + + constexpr explicit hint(const std::uint8_t node_id) noexcept : _numa_node_id(node_id) {} + constexpr explicit hint(const std::uint16_t channel_id) noexcept : _channel_id(channel_id) {} + constexpr explicit hint(const synchronization::isolation_level isolation_level) noexcept + : _isolation_level(isolation_level) + { + } + constexpr explicit hint(const expected_access_frequency access_frequency) noexcept + : _access_frequency(access_frequency) + { + } + constexpr hint(const std::uint16_t channel_id, const synchronization::isolation_level isolation_level) noexcept + : _channel_id(channel_id), _isolation_level(isolation_level) + { + } + constexpr hint(const std::uint8_t node_id, const synchronization::isolation_level isolation_level) noexcept + : _numa_node_id(node_id), _isolation_level(isolation_level) + { + } + constexpr hint(const std::uint8_t node_id, const synchronization::isolation_level isolation_level, + const synchronization::protocol preferred_protocol) noexcept + : _numa_node_id(node_id), _isolation_level(isolation_level), _preferred_protocol(preferred_protocol) + { + } + + constexpr hint(const std::uint16_t channel_id, const synchronization::isolation_level isolation_level, + const synchronization::protocol preferred_protocol) noexcept + : _channel_id(channel_id), _isolation_level(isolation_level), _preferred_protocol(preferred_protocol) + { + } + + constexpr hint(const std::uint8_t node_id, const expected_access_frequency access_frequency) noexcept + : _numa_node_id(node_id), _access_frequency(access_frequency) + { + } + constexpr hint(const synchronization::isolation_level isolation_level, + const expected_access_frequency access_frequency) noexcept + : _access_frequency(access_frequency), _isolation_level(isolation_level) + { + } + constexpr hint(const synchronization::isolation_level isolation_level, + const synchronization::protocol preferred_protocol, + const expected_access_frequency access_frequency) noexcept + : _access_frequency(access_frequency), _isolation_level(isolation_level), + _preferred_protocol(preferred_protocol) + { + } + constexpr hint(const synchronization::isolation_level isolation_level, + const synchronization::protocol preferred_protocol, const expected_access_frequency access_frequency, + const expected_read_write_ratio read_write_ratio) noexcept + : _access_frequency(access_frequency), _read_write_ratio(read_write_ratio), _isolation_level(isolation_level), + _preferred_protocol(preferred_protocol) + { + } + constexpr hint(const std::uint8_t node_id, const synchronization::isolation_level isolation_level, + const expected_access_frequency access_frequency) noexcept + : _numa_node_id(node_id), _access_frequency(access_frequency), _isolation_level(isolation_level) + { + } + constexpr hint(const std::uint8_t node_id, const synchronization::isolation_level isolation_level, + const synchronization::protocol preferred_protocol, + const expected_access_frequency access_frequency) noexcept + : _numa_node_id(node_id), _access_frequency(access_frequency), _isolation_level(isolation_level), + _preferred_protocol(preferred_protocol) + { + } + + constexpr hint(hint &&) noexcept = default; + + ~hint() = default; + + [[nodiscard]] bool has_numa_node_id() const noexcept + { + return _numa_node_id < std::numeric_limits::max(); + } + [[nodiscard]] std::uint8_t numa_node_id() const noexcept { return _numa_node_id; } + + [[nodiscard]] bool has_channel_id() const noexcept + { + return _channel_id < std::numeric_limits::max(); + } + [[nodiscard]] std::uint16_t channel_id() const noexcept { return _channel_id; } + [[nodiscard]] expected_access_frequency access_frequency() const noexcept { return _access_frequency; } + [[nodiscard]] expected_read_write_ratio read_write_ratio() const noexcept { return _read_write_ratio; } + [[nodiscard]] synchronization::isolation_level isolation_level() const noexcept { return _isolation_level; } + [[nodiscard]] synchronization::protocol preferred_protocol() const noexcept { return _preferred_protocol; } + + bool operator==(const synchronization::isolation_level isolation_level) const noexcept + { + return _isolation_level == isolation_level; + } + + bool operator!=(const synchronization::isolation_level isolation_level) const noexcept + { + return _isolation_level != isolation_level; + } + + bool operator==(const synchronization::protocol protocol) const noexcept { return _preferred_protocol == protocol; } + + bool operator!=(const synchronization::protocol protocol) const noexcept { return _preferred_protocol != protocol; } + +private: + hint() = default; + + // Preferred NUMA region; no preference by default. + const std::uint8_t _numa_node_id{std::numeric_limits::max()}; + + // Preferred channel; no preference by default. + const std::uint16_t _channel_id{std::numeric_limits::max()}; + + // Expected access frequency; normal by default. + const enum expected_access_frequency _access_frequency { expected_access_frequency::normal }; + + // Expected read/write ratio; normal by default. + const expected_read_write_ratio _read_write_ratio{expected_read_write_ratio::balanced}; + + // Preferred isolation level; no synchronization by default. + const synchronization::isolation_level _isolation_level{synchronization::isolation_level::None}; + + // Preferred synchronization protocol (queue, latch, ...); no synchronization by default. + const synchronization::protocol _preferred_protocol{synchronization::protocol::None}; +}; + +/** + * Information of a resource, stored within + * the pointer to the resource. + */ +class information +{ +public: + constexpr information() noexcept : _channel_id(0U), _synchronization_primitive(0U) { } + explicit information(const std::uint16_t channel_id, + const synchronization::primitive synchronization_primitive) noexcept + : _channel_id(channel_id), _synchronization_primitive(static_cast(synchronization_primitive)) + { + } + + ~information() = default; + + [[nodiscard]] std::uint16_t channel_id() const noexcept { return _channel_id; } + [[nodiscard]] synchronization::primitive synchronization_primitive() const noexcept + { + return static_cast(_synchronization_primitive); + } + + information &operator=(const information &other) = default; + +private: + std::uint16_t _channel_id : 12; + std::uint16_t _synchronization_primitive : 4; +} __attribute__((packed)); + +/** + * Pointer to a resource, stores information about + * that resource. + */ +class ptr final : public memory::tagged_ptr +{ +public: + constexpr ptr() noexcept = default; + explicit ptr(void *ptr_, const information info = {}) noexcept : memory::tagged_ptr(ptr_, info) + { + } + ~ptr() = default; + + ptr &operator=(const ptr &other) noexcept = default; + + [[nodiscard]] std::uint16_t channel_id() const noexcept { return info().channel_id(); } + [[nodiscard]] synchronization::primitive synchronization_primitive() const noexcept + { + return info().synchronization_primitive(); + } +} __attribute__((packed)); + +/** + * Casts the internal pointer of the resource pointer + * to a pointer typed by the given template parameter. + * + * @param resource Resource to cast. + * @return Pointer to the requested type. + */ +template static auto *ptr_cast(const ptr resource) noexcept +{ + return resource.template get(); +} + +} // namespace mx::resource diff --git a/repos/ealanos/src/lib/mx/resource/resource_interface.h b/repos/ealanos/src/lib/mx/resource/resource_interface.h index eed60aef7b..fc45d4ebf9 100644 --- a/repos/ealanos/src/lib/mx/resource/resource_interface.h +++ b/repos/ealanos/src/lib/mx/resource/resource_interface.h @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -26,7 +25,6 @@ public: SharedWrite, Optimistic, OLFIT, - RestrictedTransactionalMemory, }; constexpr ResourceInterface() noexcept = default; @@ -34,25 +32,6 @@ public: ResourceInterface(ResourceInterface &&) = delete; virtual ~ResourceInterface() = default; - void initialize(const SynchronizationType type) noexcept - { - switch (type) - { - case Exclusive: - case RestrictedTransactionalMemory: - _exclusive_latch.unlock(); - break; - case SharedRead: - case SharedWrite: - _rw_latch.initialize(); - break; - case Optimistic: - case OLFIT: - _optimistic_latch.initialize(); - break; - } - } - /** * Called by the epoch manager on safe reclaiming this resource. */ @@ -130,10 +109,6 @@ public: { _resource->_optimistic_latch.lock(); } - else if constexpr (T == SynchronizationType::RestrictedTransactionalMemory) - { - _is_transaction_used_latch = synchronization::MemoryTransaction::begin(_resource->_exclusive_latch); - } } inline ~scoped_latch() noexcept @@ -154,15 +129,10 @@ public: { _resource->_optimistic_latch.unlock(); } - else if constexpr (T == SynchronizationType::RestrictedTransactionalMemory) - { - synchronization::MemoryTransaction::end(_resource->_exclusive_latch, _is_transaction_used_latch); - } } private: ResourceInterface *_resource; - bool _is_transaction_used_latch; }; using scoped_exclusive_latch = scoped_latch; @@ -170,15 +140,12 @@ public: using scoped_olfit_latch = scoped_latch; template using scoped_rw_latch = scoped_latch; - using scoped_transaction = scoped_latch; private: // Encapsulated synchronization primitives. - union { - synchronization::Spinlock _exclusive_latch; - synchronization::RWSpinLock _rw_latch; - synchronization::OptimisticLock _optimistic_latch; - }; + synchronization::Spinlock _exclusive_latch; + synchronization::RWSpinLock _rw_latch; + synchronization::OptimisticLock _optimistic_latch; // Epoch and Garbage management. memory::reclamation::epoch_t _remove_epoch{0U}; diff --git a/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h b/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h deleted file mode 100644 index 18f52317a4..0000000000 --- a/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h +++ /dev/null @@ -1,81 +0,0 @@ -#pragma once - -#include "spinlock.h" -#ifdef USE_RTM -#include -#endif -namespace mx::synchronization { -class MemoryTransaction -{ -private: - [[nodiscard]] static constexpr auto max_tries() { return 10U; } - [[nodiscard]] static constexpr auto abort_because_locked_code() { return 0xFF; } - -public: - [[nodiscard]] static bool begin(Spinlock &latch) noexcept - { -#ifdef USE_RTM - auto retries = 0U; - - do - { - const auto status = _xbegin(); - if (status == _XBEGIN_STARTED) - { - if (latch.is_locked() == false) - { - /// Transaction was started successfully - /// and the latch was not acquired by another thread. - return false; - } - - /// Transaction was started, but lock was acquired from another thread. - _xabort(abort_because_locked_code()); - } - else if (status & _XABORT_EXPLICIT) - { - if (_XABORT_CODE(status) == abort_because_locked_code() && (status & _XABORT_NESTED) == false) - { - /// The transaction was aborted because another thread - /// holds the lock. Wait until the thread releases - /// the lock. - while (latch.is_locked()) - { - mx::system::builtin::pause(); - } - } - else if ((status & _XABORT_RETRY) == false) - { - /// The system tells us, that we should not retry. - /// Hence, acquire the latch. - goto acquire_fallback_lock; - } - } - } while (++retries <= max_tries()); - - acquire_fallback_lock: - latch.lock(); - return true; -#else - latch.lock(); - return true; -#endif - } - - static void end(Spinlock &latch, [[maybe_unused]] const bool has_locked) noexcept - { -#ifdef USE_RTM - if (has_locked == false) - { - _xend(); - } - else - { - latch.unlock(); - } -#else - latch.unlock(); -#endif - } -}; -} // namespace mx::synchronization \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h b/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h index 49c7567dd7..c060de014f 100644 --- a/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h +++ b/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h @@ -14,8 +14,6 @@ public: constexpr OptimisticLock() = default; ~OptimisticLock() = default; - void initialize() { _version = 0b100; } - /** * Guarantees to read a valid version by blocking until * the version is not locked. @@ -23,11 +21,11 @@ public: */ [[nodiscard]] version_t read_valid() const noexcept { - auto version = __atomic_load_n(&_version, __ATOMIC_SEQ_CST); + auto version = _version.load(std::memory_order_seq_cst); while (OptimisticLock::is_locked(version)) { system::builtin::pause(); - version = __atomic_load_n(&_version, __ATOMIC_SEQ_CST); + version = _version.load(std::memory_order_seq_cst); } return version; } @@ -40,7 +38,7 @@ public: */ [[nodiscard]] bool is_valid(const version_t version) const noexcept { - return version == __atomic_load_n(&_version, __ATOMIC_SEQ_CST); + return version == _version.load(std::memory_order_seq_cst); } /** @@ -51,8 +49,7 @@ public: { auto version = read_valid(); - return __atomic_compare_exchange_n(&_version, &version, version + 0b10, false, __ATOMIC_SEQ_CST, - __ATOMIC_SEQ_CST); + return _version.compare_exchange_strong(version, version + 0b10); } /** @@ -62,7 +59,7 @@ public: { if constexpr (SINGLE_WRITER) { - __atomic_fetch_add(&_version, 0b10, __ATOMIC_SEQ_CST); + _version.fetch_add(0b10, std::memory_order_seq_cst); } else { @@ -82,10 +79,10 @@ public: /** * Unlocks the version lock. */ - void unlock() noexcept { __atomic_fetch_add(&_version, 0b10, __ATOMIC_SEQ_CST); } + void unlock() noexcept { _version.fetch_add(0b10, std::memory_order_seq_cst); } private: - version_t _version; + std::atomic _version{0b100}; [[nodiscard]] static bool is_locked(const version_t version) noexcept { return (version & 0b10) == 0b10; } }; diff --git a/repos/ealanos/src/lib/mx/synchronization/primitive_matrix.h b/repos/ealanos/src/lib/mx/synchronization/primitive_matrix.h index bc94572c85..a7bbdabb62 100644 --- a/repos/ealanos/src/lib/mx/synchronization/primitive_matrix.h +++ b/repos/ealanos/src/lib/mx/synchronization/primitive_matrix.h @@ -2,15 +2,15 @@ #include "synchronization.h" #include #include -#include +#include namespace mx::synchronization { class PrimitiveMatrix { public: static primitive select_primitive(const isolation_level isolation_level, - const resource::expected_access_frequency access_frequency, - const resource::expected_read_write_ratio read_write_ratio) noexcept + const resource::hint::expected_access_frequency access_frequency, + const resource::hint::expected_read_write_ratio read_write_ratio) noexcept { return isolation_level != isolation_level::None ? matrix()[static_cast(isolation_level)][static_cast(read_write_ratio)] diff --git a/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h b/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h index 9da268e819..d80745acae 100644 --- a/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h +++ b/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h @@ -167,13 +167,11 @@ class RWSpinLock }; public: - constexpr RWSpinLock() noexcept = default; + constexpr RWSpinLock() : bits_(0) {} RWSpinLock(RWSpinLock const &) = delete; RWSpinLock &operator=(RWSpinLock const &) = delete; - void initialize() { _bits = 0; } - // Lockable Concept void lock() noexcept { @@ -187,7 +185,7 @@ public: void unlock() noexcept { static_assert(READER > WRITER + UPGRADED, "wrong bits!"); - __atomic_fetch_and(&_bits, ~(WRITER | UPGRADED), __ATOMIC_RELEASE); + bits_.fetch_and(~(WRITER | UPGRADED), std::memory_order_release); } // SharedLockable Concept @@ -199,12 +197,12 @@ public: } } - void unlock_shared() noexcept { __atomic_fetch_add(&_bits, -READER, __ATOMIC_RELEASE); } + void unlock_shared() noexcept { bits_.fetch_add(-READER, std::memory_order_release); } // Downgrade the lock from writer status to reader status. void unlock_and_lock_shared() noexcept { - __atomic_fetch_add(&_bits, READER, __ATOMIC_ACQUIRE); + bits_.fetch_add(READER, std::memory_order_acquire); unlock(); } @@ -217,7 +215,7 @@ public: } } - void unlock_upgrade() noexcept { __atomic_fetch_add(&_bits, -UPGRADED, __ATOMIC_ACQ_REL); } + void unlock_upgrade() noexcept { bits_.fetch_add(-UPGRADED, std::memory_order_acq_rel); } // unlock upgrade and try to acquire write lock void unlock_upgrade_and_lock() noexcept @@ -229,22 +227,22 @@ public: } // unlock upgrade and read lock atomically - void unlock_upgrade_and_lock_shared() noexcept { __atomic_fetch_add(&_bits, READER - UPGRADED, __ATOMIC_ACQ_REL); } + void unlock_upgrade_and_lock_shared() noexcept { bits_.fetch_add(READER - UPGRADED, std::memory_order_acq_rel); } // write unlock and upgrade lock atomically void unlock_and_lock_upgrade() noexcept { // need to do it in two steps here -- as the UPGRADED bit might be OR-ed at // the same time when other threads are trying do try_lock_upgrade(). - __atomic_fetch_or(&_bits, UPGRADED, __ATOMIC_ACQUIRE); - __atomic_fetch_add(&_bits, -WRITER, __ATOMIC_RELEASE); + bits_.fetch_or(UPGRADED, std::memory_order_acquire); + bits_.fetch_add(-WRITER, std::memory_order_release); } // Attempt to acquire writer permission. Return false if we didn't get it. bool try_lock() noexcept { - auto expect = std::int32_t{0}; - return __atomic_compare_exchange_n(&_bits, &expect, WRITER, false, __ATOMIC_ACQ_REL, __ATOMIC_ACQ_REL); + int32_t expect = 0; + return bits_.compare_exchange_strong(expect, WRITER, std::memory_order_acq_rel); } // Try to get reader permission on the lock. This can fail if we @@ -257,10 +255,10 @@ public: { // fetch_add is considerably (100%) faster than compare_exchange, // so here we are optimizing for the common (lock success) case. - const auto value = __atomic_fetch_add(&_bits, READER, __ATOMIC_ACQUIRE); - if (static_cast(value & (WRITER | UPGRADED))) + int32_t value = bits_.fetch_add(READER, std::memory_order_acquire); + if (value & (WRITER | UPGRADED)) { - __atomic_fetch_add(&_bits, -READER, __ATOMIC_RELEASE); + bits_.fetch_add(-READER, std::memory_order_release); return false; } return true; @@ -269,14 +267,14 @@ public: // try to unlock upgrade and write lock atomically bool try_unlock_upgrade_and_lock() noexcept { - auto expect = std::int32_t{UPGRADED}; - return __atomic_compare_exchange_n(&_bits, &expect, WRITER, false, __ATOMIC_ACQ_REL, __ATOMIC_ACQ_REL); + int32_t expect = UPGRADED; + return bits_.compare_exchange_strong(expect, WRITER, std::memory_order_acq_rel); } // try to acquire an upgradable lock. bool try_lock_upgrade() noexcept { - const auto value = __atomic_fetch_or(&_bits, UPGRADED, __ATOMIC_ACQUIRE); + int32_t value = bits_.fetch_or(UPGRADED, std::memory_order_acquire); // Note: when failed, we cannot flip the UPGRADED bit back, // as in this case there is either another upgrade lock or a write lock. @@ -286,9 +284,9 @@ public: } // mainly for debugging purposes. - [[nodiscard]] int32_t bits() const noexcept { return __atomic_load_n(&_bits, __ATOMIC_ACQUIRE); } + [[nodiscard]] int32_t bits() const noexcept { return bits_.load(std::memory_order_acquire); } private: - std::int32_t _bits; + std::atomic bits_; }; } // namespace mx::synchronization diff --git a/repos/ealanos/src/lib/mx/synchronization/spinlock.h b/repos/ealanos/src/lib/mx/synchronization/spinlock.h index 74a9db9152..3057f30238 100644 --- a/repos/ealanos/src/lib/mx/synchronization/spinlock.h +++ b/repos/ealanos/src/lib/mx/synchronization/spinlock.h @@ -19,9 +19,9 @@ public: */ void lock() noexcept { - do + while (true) { - while (_flag) + while (_flag.load(std::memory_order_relaxed)) { system::builtin::pause(); } @@ -30,7 +30,7 @@ public: { return; } - } while (true); + } } /** @@ -40,20 +40,20 @@ public: bool try_lock() noexcept { bool expected = false; - return __atomic_compare_exchange_n(&_flag, &expected, true, true, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); + return _flag.compare_exchange_weak(expected, true, std::memory_order_acquire); } /** * Unlocks the spinlock. */ - void unlock() noexcept { __atomic_store_n(&_flag, false, __ATOMIC_SEQ_CST); } + void unlock() noexcept { _flag.store(false, std::memory_order_acquire); } /** * @return True, if the lock is in use. */ - [[nodiscard]] bool is_locked() const noexcept { return __atomic_load_n(&_flag, __ATOMIC_RELAXED); } + [[nodiscard]] bool is_locked() const noexcept { return _flag.load(std::memory_order_relaxed); } private: - bool _flag; + std::atomic_bool _flag{false}; }; } // namespace mx::synchronization diff --git a/repos/ealanos/src/lib/mx/synchronization/synchronization.h b/repos/ealanos/src/lib/mx/synchronization/synchronization.h index c45ff35b72..b31ff276fe 100644 --- a/repos/ealanos/src/lib/mx/synchronization/synchronization.h +++ b/repos/ealanos/src/lib/mx/synchronization/synchronization.h @@ -17,12 +17,11 @@ enum class isolation_level : std::uint8_t */ enum class protocol : std::uint8_t { - None = 0U, // System is free to choose - Queue = 1U, // Choose primitive with queues with respect to isolation level - Latch = 2U, // Choose primitive with latches with respect to isolation level - OLFIT = 3U, // Try to choose olfit - RestrictedTransactionalMemory = 4U, // Try to choose transactional memory - Batched = 5U, // Tasks are batched + None = 0U, // System is free to choose + Queue = 1U, // Choose primitive with queues with respect to isolation level + Latch = 2U, // Choose primitive with latches with respect to isolation level + OLFIT = 3U, // Try to choose olfit + TransactionalMemory = 4U // Try to choose htm }; /** @@ -36,14 +35,12 @@ enum class protocol : std::uint8_t */ enum class primitive : std::uint8_t { - None = 0U, // Nothing will be synchronized - ExclusiveLatch = 1U, // All accesses will use a spinlock - ScheduleAll = 2U, // All accesses will be scheduled to the mapped channel - ReaderWriterLatch = 3U, // Use a reader/writer latch to enable parallel reads - ScheduleWriter = 4U, // Reads can perform anywhere, writes are scheduled to the mapped channel - OLFIT = 5U, // Read/write anywhere but use a latch for writers - RestrictedTransactionalMemory = 6U, /// Read/write transactional - Batched = 7U // Tasks are batched by using task squads + None = 0U, // Nothing will be synchronized + ExclusiveLatch = 1U, // All accesses will use a spinlock + ScheduleAll = 2U, // All accesses will be scheduled to the mapped channel + ReaderWriterLatch = 3U, // Use a reader/writer latch to enable parallel reads + ScheduleWriter = 4U, // Reads can perform anywhere, writes are scheduled to the mapped channel + OLFIT = 5U // Read/write anywhere but use a latch for writers }; /** diff --git a/repos/ealanos/src/lib/mx/system/builtin.h b/repos/ealanos/src/lib/mx/system/builtin.h index 5adf777571..4f8aa7aefb 100644 --- a/repos/ealanos/src/lib/mx/system/builtin.h +++ b/repos/ealanos/src/lib/mx/system/builtin.h @@ -22,7 +22,14 @@ public: #endif } - [[nodiscard]] static std::uint32_t clz(const std::uint32_t number) noexcept { return __builtin_clz(number); } - [[nodiscard]] static std::uint64_t clz(const std::uint64_t number) noexcept { return __builtin_clzll(number); } + [[maybe_unused]] static bool expect_false(const bool expression) noexcept + { + return __builtin_expect(expression, false); + } + + [[maybe_unused]] static bool expect_true(const bool expression) noexcept + { + return __builtin_expect(expression, true); + } }; } // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/cache.h b/repos/ealanos/src/lib/mx/system/cache.h index b63aff1848..7ca5cbcceb 100644 --- a/repos/ealanos/src/lib/mx/system/cache.h +++ b/repos/ealanos/src/lib/mx/system/cache.h @@ -1,10 +1,6 @@ #pragma once -#include -#include #include -#include -#include namespace mx::system { /** @@ -15,15 +11,11 @@ namespace mx::system { class cache { public: - [[nodiscard]] static constexpr auto line_size() noexcept { return 64U; } - enum level : std::uint8_t { - L1 = 3U, - ALL = 3U, + L1 = 1U, L2 = 2U, - L3 = 1U, - NTA = 0U + LLC = 3U }; enum access : std::uint8_t { @@ -38,96 +30,60 @@ public: * @tparam A Access to the cache line whether read or write. * @param address Address of the memory which should be prefetched. */ - template - static void prefetch(const std::int64_t *address) noexcept + template static void prefetch(void *address) noexcept { - constexpr auto items_per_cacheline = line_size() / sizeof(std::int64_t); - for (auto i = 0U; i < C * items_per_cacheline; i += items_per_cacheline) +#ifdef __x86_64 + if constexpr (A == access::write) { - __builtin_prefetch(&address[i], static_cast(A), static_cast(L)); + asm volatile("PREFETCHW (%0)\n" ::"r"(address)); } - } - - template [[nodiscard]] static std::uint64_t size() - { - /* TODO: Get cache sizes, maybe with CPUID? */ - if constexpr (L == level::L1) + else if constexpr (L == level::L1) { - if (_cache_size_cache[0U] == 0U) - { - //_cache_size_cache[0U] = sysconf(_SC_LEVEL1_DCACHE_SIZE); - } - return _cache_size_cache[0U]; + asm volatile("PREFETCHT1 (%0)\n" ::"r"(address)); } else if constexpr (L == level::L2) { - if (_cache_size_cache[1U] == 0U) - { - //_cache_size_cache[1U] = sysconf(_SC_LEVEL2_CACHE_SIZE); - } - return _cache_size_cache[1U]; - } - else if constexpr (L == level::L3) - { - if (_cache_size_cache[2U] == 0U) - { - //_cache_size_cache[2U] = sysconf(_SC_LEVEL3_CACHE_SIZE); - } - return _cache_size_cache[2U]; + asm volatile("PREFETCHT2 (%0)\n" ::"r"(address)); } else { - return 0U; + asm volatile("PREFETCHNTA (%0)\n" ::"r"(address)); } - } - - template - static void prefetch_range(const std::int64_t *address) noexcept - { - if constexpr (S <= 64U) +#elif defined(__aarch64__) + if constexpr (L == L1) { - prefetch(address); + if constexpr (A == access::read) + { + asm volatile("prfm pldl1keep, %a0\n" : : "p"(address)); + } + else + { + asm volatile("prfm pstl1keep, %a0\n" : : "p"(address)); + } } - else if constexpr (S == 128U) + else if constexpr (L == L2) { - prefetch(address); - } - else if constexpr (S == 192U) - { - prefetch(address); - } - else if constexpr (S == 256U) - { - prefetch(address); - } - else if constexpr (S == 256U) - { - prefetch(address); - } - else if constexpr (S == 320U) - { - prefetch(address); - } - else if constexpr (S == 384U) - { - prefetch(address); - } - else if constexpr (S == 448U) - { - prefetch(address); - } - else if constexpr (S == 512U) - { - prefetch(address); - } - else if constexpr (S == 1024U) - { - prefetch(address); + if constexpr (A == access::read) + { + asm volatile("prfm pldl2keep, %a0\n" : : "p"(address)); + } + else + { + asm volatile("prfm pstl2keep, %a0\n" : : "p"(address)); + } } else { - prefetch_range(address, S); + if constexpr (A == access::read) + { + asm volatile("prfm pldl3keep, %a0\n" : : "p"(address)); + } + else + { + asm volatile("prfm pstl3keep, %a0\n" : : "p"(address)); + } } +#endif } /** @@ -139,65 +95,93 @@ public: * @param size Size of the accessed memory. */ template - static void prefetch_range(const std::int64_t *address, const std::uint32_t size) noexcept + static void prefetch_range(void *address, const std::uint32_t size) noexcept { - const auto cache_lines_to_prefetch = size / cache::line_size(); - switch (cache_lines_to_prefetch) + auto addr = std::uintptr_t(address); + const auto end = addr + size; + + if ((size & 1023U) == 0U) { - case 4: - prefetch(address); - break; - case 2: - prefetch(address); - break; - case 1: - prefetch(address); - break; - case 8: - prefetch(address); - break; - case 3: - prefetch(address); - break; - case 12: - prefetch(address); - break; - case 16: - prefetch(address); - break; - case 5: - prefetch(address); - break; - case 6: - prefetch(address); - break; - case 7: - prefetch(address); - break; - case 9: - prefetch(address); - break; - case 10: - prefetch(address); - break; - case 11: - prefetch(address); - break; - case 13: - prefetch(address); - break; - case 14: - prefetch(address); - break; - case 15: - prefetch(address); - break; - default: - break; + for (; addr < end; addr += 1024U) + { + prefetch_range(reinterpret_cast(addr)); + } + } + else if ((size & 511U) == 0U) + { + for (; addr < end; addr += 512U) + { + prefetch_range(reinterpret_cast(addr)); + } + } + else if ((size & 255U) == 0U) + { + for (; addr < end; addr += 256U) + { + prefetch_range(reinterpret_cast(addr)); + } + } + else if ((size & 127U) == 0U) + { + for (; addr < end; addr += 128U) + { + prefetch_range(reinterpret_cast(addr)); + } + } + else + { + for (; addr < end; addr += 64U) + { + prefetch(reinterpret_cast(addr)); + } } } -private: - static inline std::array _cache_size_cache{{0U, 0U, 0U}}; + /** + * Prefetches a range of cache lines into the given cache level. + * + * @tparam L Wanted cache level. + * @tparam S Size of the accessed memory. + * @tparam A Access to the cache line whether read or write. + * @param address Address of the accessed memory. + */ + template static void prefetch_range(void *address) noexcept + { + static_assert(S && (!(S & (S - 1))) && "Must be power of two."); + const auto addr = std::uintptr_t(address); + if constexpr (S <= 64U) + { + prefetch(address); + } + else if constexpr (S == 128U) + { + prefetch(address); + prefetch(reinterpret_cast(addr + 64U)); + } + else if constexpr (S == 192U) + { + prefetch_range(address); + prefetch(reinterpret_cast(addr + 128U)); + } + else if constexpr (S == 256U) + { + prefetch_range(address); + prefetch_range(reinterpret_cast(addr + 128U)); + } + else if constexpr (S == 512U) + { + prefetch_range(address); + prefetch_range(reinterpret_cast(addr + 256U)); + } + else if constexpr (S == 1024U) + { + prefetch_range(address); + prefetch_range(reinterpret_cast(addr + 512U)); + } + else + { + prefetch_range(address, S); + } + } }; } // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/cpu.h b/repos/ealanos/src/lib/mx/system/cpu.h deleted file mode 100644 index 9853c87d0e..0000000000 --- a/repos/ealanos/src/lib/mx/system/cpu.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include - -namespace mx::system { -/** - * Encapsulates methods for retrieving information - * about the hardware landscape. - */ -class cpu -{ -public: - /** - * @return Core where the caller is running. - */ - [[nodiscard]] static std::uint16_t core_id() { return Tukija::Cip::cip()->get_cpu_index(); } - - /** - * Reads the NUMA region identifier of the given core. - * - * @param core_id Id of the core. - * @return Id of the NUMA region the core stays in. - */ - [[nodiscard]] static std::uint8_t node_id(const std::uint16_t core_id) - { - return Tukija::Tip::tip()->domain_of_idx(core_id); - } - - /** - * Reads the NUMA region identifier of the current core. - * - * @return Id of the NUMA region the core stays in. - */ - [[nodiscard]] static std::uint8_t node_id() { return Tukija::Tip::tip()->domain_of_loc(Genode::Thread::myself()->affinity()); } - - /** - * @return The greatest NUMA region identifier. - */ - [[nodiscard]] static std::uint8_t max_node_id() { return Tukija::Tip::tip()->num_domains(); } - - /** - * @return Number of available cores. - */ - [[nodiscard]] static std::uint16_t count_cores() { return std::uint16_t(Tukija::Cip::cip()->habitat_affinity.total()); } -private: -}; -} // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/environment.cpp b/repos/ealanos/src/lib/mx/system/environment.cpp new file mode 100644 index 0000000000..13fd6da7c5 --- /dev/null +++ b/repos/ealanos/src/lib/mx/system/environment.cpp @@ -0,0 +1,16 @@ +#include "environment.h" +#include + +using namespace mx::system; + +void Environment::set_cores(mx::util::core_set *core_set) +{ + system::Environment::get_instance()._coreset = core_set; +} + +mx::util::core_set &Environment::cores() +{ + return *Environment::get_instance()._coreset; +} + +unsigned long mx::system::Environment::tsc_freq_khz; \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/environment.d b/repos/ealanos/src/lib/mx/system/environment.d new file mode 100644 index 0000000000..d539cd808f --- /dev/null +++ b/repos/ealanos/src/lib/mx/system/environment.d @@ -0,0 +1,290 @@ +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.d: \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.cpp \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/util/meta.h \ + /home/mml/genode-igb/repos/base/include/base/env.h \ + /home/mml/genode-igb/repos/base/include/parent/parent.h \ + /home/mml/genode-igb/repos/base/include/util/attempt.h \ + /home/mml/genode-igb/repos/base/include/base/rpc.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/util/string.h \ + /home/mml/genode-igb/repos/base/include/base/stdint.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ + /home/mml/genode-igb/repos/base/include/base/output.h \ + /home/mml/genode-igb/repos/base/include/util/interface.h \ + /home/mml/genode-igb/repos/base/include/util/misc_math.h \ + /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ + /home/mml/genode-igb/repos/base/include/cpu/string.h \ + /home/mml/genode-igb/repos/base/include/base/thread.h \ + /home/mml/genode-igb/repos/base/include/base/exception.h \ + /home/mml/genode-igb/repos/base/include/base/blockade.h \ + /home/mml/genode-igb/repos/base/include/base/lock.h \ + /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ + /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ + /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ + /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/capability.h \ + /home/mml/genode-igb/repos/base/include/base/native_capability.h \ + /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ + /home/mml/genode-igb/repos/base/include/base/thread_state.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ + /home/mml/genode-igb/repos/base/include/base/signal.h \ + /home/mml/genode-igb/repos/base/include/util/list.h \ + /home/mml/genode-igb/repos/base/include/base/semaphore.h \ + /home/mml/genode-igb/repos/base/include/base/mutex.h \ + /home/mml/genode-igb/repos/base/include/util/fifo.h \ + /home/mml/genode-igb/repos/base/include/base/affinity.h \ + /home/mml/genode-igb/repos/base/include/util/xml_node.h \ + /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/base/include/util/token.h \ + /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ + /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ + /home/mml/genode-igb/repos/base/include/session/session.h \ + /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ + /home/mml/genode-igb/repos/base/include/base/session_label.h \ + /home/mml/genode-igb/repos/base/include/util/arg_string.h \ + /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ + /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/cache.h \ + /home/mml/genode-igb/repos/base/include/base/allocator.h \ + /home/mml/genode-igb/repos/base/include/util/register.h \ + /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ + /home/mml/genode-igb/repos/base/include/base/id_space.h \ + /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ + /home/mml/genode-igb/repos/base/include/session/capability.h \ + /home/mml/genode-igb/repos/base/include/root/capability.h \ + /home/mml/genode-igb/repos/base/include/root/root.h \ + /home/mml/genode-igb/repos/base/include/base/entrypoint.h \ + /home/mml/genode-igb/repos/base/include/util/reconstructible.h \ + /home/mml/genode-igb/repos/base/include/util/construct_at.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_server.h \ + /home/mml/genode-igb/repos/base/include/base/ipc.h \ + /home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h \ + /home/mml/genode-igb/repos/base/include/base/object_pool.h \ + /home/mml/genode-igb/repos/base/include/base/weak_ptr.h \ + /home/mml/genode-igb/repos/base/include/base/trace/events.h \ + /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ + /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ + /home/mml/genode-igb/repos/base/include/dataspace/client.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: + +/home/mml/genode-igb/repos/libports/include/libc/component.h: + +/home/mml/genode-igb/repos/base/include/util/meta.h: + +/home/mml/genode-igb/repos/base/include/base/env.h: + +/home/mml/genode-igb/repos/base/include/parent/parent.h: + +/home/mml/genode-igb/repos/base/include/util/attempt.h: + +/home/mml/genode-igb/repos/base/include/base/rpc.h: + +/home/mml/genode-igb/repos/base/include/base/rpc_args.h: + +/home/mml/genode-igb/repos/base/include/util/string.h: + +/home/mml/genode-igb/repos/base/include/base/stdint.h: + +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: + +/home/mml/genode-igb/repos/base/include/base/output.h: + +/home/mml/genode-igb/repos/base/include/util/interface.h: + +/home/mml/genode-igb/repos/base/include/util/misc_math.h: + +/home/mml/genode-igb/repos/base/include/util/noncopyable.h: + +/home/mml/genode-igb/repos/base/include/cpu/string.h: + +/home/mml/genode-igb/repos/base/include/base/thread.h: + +/home/mml/genode-igb/repos/base/include/base/exception.h: + +/home/mml/genode-igb/repos/base/include/base/blockade.h: + +/home/mml/genode-igb/repos/base/include/base/lock.h: + +/home/mml/genode-igb/repos/base/include/base/trace/logger.h: + +/home/mml/genode-igb/repos/base/include/base/trace/buffer.h: + +/home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h: + +/home/mml/genode-igb/repos/base/include/cpu_session/capability.h: + +/home/mml/genode-igb/repos/base/include/base/capability.h: + +/home/mml/genode-igb/repos/base/include/base/native_capability.h: + +/home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: + +/home/mml/genode-igb/repos/base/include/base/thread_state.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h: + +/home/mml/genode-igb/repos/base/include/base/signal.h: + +/home/mml/genode-igb/repos/base/include/util/list.h: + +/home/mml/genode-igb/repos/base/include/base/semaphore.h: + +/home/mml/genode-igb/repos/base/include/base/mutex.h: + +/home/mml/genode-igb/repos/base/include/util/fifo.h: + +/home/mml/genode-igb/repos/base/include/base/affinity.h: + +/home/mml/genode-igb/repos/base/include/util/xml_node.h: + +/home/mml/genode-igb/repos/base/include/base/log.h: + +/home/mml/genode-igb/repos/base/include/base/buffered_output.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: + +/home/mml/genode-igb/repos/base/include/util/token.h: + +/home/mml/genode-igb/repos/base/include/dataspace/capability.h: + +/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: + +/home/mml/genode-igb/repos/base/include/session/session.h: + +/home/mml/genode-igb/repos/base/include/base/quota_guard.h: + +/home/mml/genode-igb/repos/base/include/base/session_label.h: + +/home/mml/genode-igb/repos/base/include/util/arg_string.h: + +/home/mml/genode-igb/repos/base/include/pd_session/pd_session.h: + +/home/mml/genode-igb/repos/base/include/region_map/region_map.h: + +/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: + +/home/mml/genode-igb/repos/base/include/base/cache.h: + +/home/mml/genode-igb/repos/base/include/base/allocator.h: + +/home/mml/genode-igb/repos/base/include/util/register.h: + +/home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: + +/home/mml/genode-igb/repos/base/include/base/id_space.h: + +/home/mml/genode-igb/repos/base/include/util/avl_tree.h: + +/home/mml/genode-igb/repos/base/include/session/capability.h: + +/home/mml/genode-igb/repos/base/include/root/capability.h: + +/home/mml/genode-igb/repos/base/include/root/root.h: + +/home/mml/genode-igb/repos/base/include/base/entrypoint.h: + +/home/mml/genode-igb/repos/base/include/util/reconstructible.h: + +/home/mml/genode-igb/repos/base/include/util/construct_at.h: + +/home/mml/genode-igb/repos/base/include/base/rpc_server.h: + +/home/mml/genode-igb/repos/base/include/base/ipc.h: + +/home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h: + +/home/mml/genode-igb/repos/base/include/base/object_pool.h: + +/home/mml/genode-igb/repos/base/include/base/weak_ptr.h: + +/home/mml/genode-igb/repos/base/include/base/trace/events.h: + +/home/mml/genode-igb/repos/base/include/base/trace/policy.h: + +/home/mml/genode-igb/repos/base/include/pd_session/capability.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: + +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + +/home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: + +/home/mml/genode-igb/repos/base/include/dataspace/client.h: + +/home/mml/genode-igb/repos/base/include/base/rpc_client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: + +/home/mml/genode-igb/repos/base/include/rom_session/client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: + +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: + +/home/mml/genode-igb/repos/base/include/base/connection.h: + +/home/mml/genode-igb/repos/base/include/util/retry.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: diff --git a/repos/ealanos/src/lib/mx/system/environment.h b/repos/ealanos/src/lib/mx/system/environment.h index 0b50298cb5..0196dca549 100644 --- a/repos/ealanos/src/lib/mx/system/environment.h +++ b/repos/ealanos/src/lib/mx/system/environment.h @@ -1,20 +1,124 @@ #pragma once +#include +#include +#include +#include +#include -#include - +namespace mx::util { + class core_set; +} namespace mx::system { /** * Encapsulates functionality of the (Linux) system. */ class Environment { +private: + /** + * @brief Pointer to application's environment + * @details The application's environment grants access to core services of EalánOS, such as thread creation and memory allocation. + */ + Libc::Env *_env; + util::core_set *_coreset; + static unsigned long tsc_freq_khz; + public: + Environment() = default; + + /** + * @brief Get Enviroment of current application + * + * @return Libc::Env& environment + */ + Libc::Env &getenv() { return *_env; } + + /** + * @brief Set libc environment for MxTasking + * @details + * @param env pointer to libc enviroment object + */ + void setenv(Libc::Env *env) { _env = env; } + + /** + * @brief Set core set to be used by memory allocators and scheduler + * @param core_set the core_set to use + */ + static void set_cores(util::core_set *core_set); + + /** + * @brief returns the core set representing the physical environment MxTasking is running in + */ + static util::core_set &cores(); + + /** + * @brief Get the instance object + * + * @return Environment& singleton object of Environment + */ + static Environment &get_instance() + { + static Environment env; + return env; + } + + /** + * @brief Quick access to libc environment + * + * @return Libc::Env& + */ + static Libc::Env &env() { return Environment::get_instance().getenv(); } + + static Libc::Env *envp() { return Environment::get_instance()._env; } + + /** + * @brief Set the libc env object + * + * @details This method **must** be called before creating the MxTasking runtime, because the environment + * is vital for the initialization of the MxTasking runtime enviroment. + * @param env pointer to application's environment + */ + static void set_env(Libc::Env *env) { + Environment::get_instance().setenv(env); + } + + static void get_platform_info() + { + try { + Genode::Attached_rom_dataspace info(env(), "platform_info"); + tsc_freq_khz = + info.xml().sub_node("hardware").sub_node("tsc").attribute_value("freq_khz", 0ULL); + } catch (...) { + }; + } + + static unsigned long get_cpu_freq() + { + return tsc_freq_khz; + } + + /* + * Access methods to core sessions of the libc enviroment, MxTasking is running in + */ + static Genode::Cpu_session &cpu() { return Environment::env().cpu(); } + static Genode::Ram_allocator &ram() { return Environment::env().ram(); } + static Genode::Region_map &rm() { return Environment::env().rm(); } + + /** + * @brief Convert integral core_id to location in the affinity space of the component + * + * @param core_id The core_id to convert + * @return Genode::Affinity::Location const& corresponding location in affinity space + */ + static Genode::Affinity::Location location(std::uint16_t core_id) { return cpu().affinity_space().location_of_index(core_id); } + + /** * @return True, if NUMA balancing is enabled by the system. */ static bool is_numa_balancing_enabled() { - return false; /* EalánOS has no NUMA balancing, yet.*/ + return false; } static constexpr auto is_sse2() @@ -23,16 +127,7 @@ public: return true; #else return false; -#endif // USE_SSE2 - } - - static constexpr auto is_debug() - { -#ifdef NDEBUG - return false; -#else - return true; -#endif // NDEBUG +#endif } }; } // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/rdtscp.h b/repos/ealanos/src/lib/mx/system/rdtscp.h deleted file mode 100644 index 9c77a0d0d6..0000000000 --- a/repos/ealanos/src/lib/mx/system/rdtscp.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include - -namespace mx::system { -class RDTSCP -{ -public: - [[nodiscard]] inline static std::uint64_t begin() noexcept - { - std::uint32_t high, low; - - asm volatile("CPUID\n\t" - "RDTSC\n\t" - "mov %%edx, %0\n\t" - "mov %%eax, %1\n\t" - : "=r"(high), "=r"(low)::"%rax", "%rbx", "%rcx", "%rdx"); - - return (std::uint64_t(high) << 32) | low; - } - - [[nodiscard]] inline static std::uint64_t end() noexcept - { - std::uint32_t high, low; - - asm volatile("RDTSCP\n\t" - "mov %%edx, %0\n\t" - "mov %%eax, %1\n\t" - "CPUID\n\t" - : "=r"(high), "=r"(low)::"%rax", "%rbx", "%rcx", "%rdx"); - - return (std::uint64_t(high) << 32) | low; - } -}; -} // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/thread.h b/repos/ealanos/src/lib/mx/system/thread.h index a3f91572ee..3e0700b1eb 100644 --- a/repos/ealanos/src/lib/mx/system/thread.h +++ b/repos/ealanos/src/lib/mx/system/thread.h @@ -2,8 +2,6 @@ #include #include #include -#include -#include #include namespace mx::system { @@ -13,6 +11,26 @@ namespace mx::system { class thread { public: + /** + * Pins a thread to a given core. + * + * @param thread Thread to pin. + * @param core_id Core where the thread should be pinned. + * @return True, when pinning was successful. + */ + static bool pin(std::thread &thread, const std::uint16_t core_id) + { + cpu_set_t cpu_set; + CPU_ZERO(&cpu_set); + CPU_SET(core_id, &cpu_set); + if (pthread_setaffinity_np(thread.native_handle(), sizeof(cpu_set_t), &cpu_set) != 0) + { + std::cerr << "Can not pin thread!" << std::endl; + return false; + } + + return true; + } }; } // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/system/topology.h b/repos/ealanos/src/lib/mx/system/topology.h new file mode 100644 index 0000000000..cffbd9a047 --- /dev/null +++ b/repos/ealanos/src/lib/mx/system/topology.h @@ -0,0 +1,50 @@ +#pragma once + +#include +#include +#include + +#include +#include +#include "environment.h" + +#include + +namespace mx::system { +/** + * Encapsulates methods for retrieving information + * about the hardware landscape. + */ +class topology +{ +public: + /** + * @return Core where the caller is running. + */ + static std::uint16_t core_id() + { + return std::uint16_t(Genode::Thread::myself()->affinity().xpos()); + } + + /** + * Reads the NUMA region identifier of the given core. + * + * @param core_id Id of the core. + * @return Id of the NUMA region the core stays in. + */ + static std::uint8_t node_id(const std::uint16_t core_id) { return std::uint8_t(Tukija::Tip::tip()->domain_of_idx(core_id)); } + + /** + * @return The greatest NUMA region identifier. + */ + static std::uint8_t max_node_id() { return std::uint8_t(Tukija::Tip::tip()->num_domains()) > mx::memory::config::max_numa_nodes() ? mx::memory::config::max_numa_nodes() - 1 : std::uint8_t(Tukija::Tip::tip()->num_domains() - 1); } + + /** + * @return Number of available cores. + */ + static std::uint16_t count_cores() + { + return std::uint16_t(Tukija::Cip::cip()->habitat_affinity.total()); + } +}; +} // namespace mx::system \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/README.md b/repos/ealanos/src/lib/mx/tasking/README.md deleted file mode 100644 index c395182b92..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Tasking - -## Task -Each task has to implement the [task interface](task.h) which inherits annotation to subclasses. - -#### Annotation -Annotations provide the possibility to express runtime information about the behavior of a task to the scheduling and execution layer. -Such information include -* the [priority](priority.h) a task should run with, -* the target (a specific worker id, a [resource](../resource/resource_interface.h) that needs synchronized access, `local` or `anywhere`) the task should execute on, -* and the [resource](../resource/ptr.h) a task is accessing that could be load from memory into cache before the task executes. - -## Worker -Upon start, *MxTasking* will launch one [worker](worker.h) thread on each (specified) logical hardware thread. -The worker will fetch tasks from the task pool and executes them. - -#### Task Pool -Every worker has its own [task pool](task_pool.h) which has different backend-queues (a queue for normal priority and local dispatches, a queue for normal priority and remote dispatches from the same numa region, a queue for normal priority and dispatches from remote numa regions, a queue for low priority ...). -Tasks will be fetched from the task pool and stored in a buffer before executed. - -#### Task Buffer -The [task buffer](task_buffer.h) is a buffer for a specific amount of tasks (i.e., `64` tasks). -Whenever the buffer becomes empty, the worker will contact the task pool and fill up the buffer with tasks from the pool. -The main reason for using a buffer is to get a precise view of future-tasks. -Tasks in the pool are stored in linked lists which are very costly to iterate whereas the buffer can be accessed like an array. -This is important to *prefetch* tasks that will be executed in the near future. - -#### Task Stack -The [task stack](task_stack.h) is used to persist the state of a task before executing the task optimistically. -Executing a task optimistically may fail and the state of the task has to be reset to the state before executing (to execute again at a later time). - -## Scheduler -The [scheduler](scheduler.h) dispatches tasks to task pools on different worker threads. - -## Configuration -The configuration is specified by a [config file](config.h). -* `max_cores`: Specifies the maximal number of cores the tasking will spawn worker threads on. -* `task_size`: The size that will be allocated for every task. -* `task_buffer_size`: The size allocated in the worker-local [task buffer](task_buffer.h) which is filled by the task pools. -* `is_use_task_counter`: If enabled, *MxTasking* will collect information about the number of executed and disptached tasks. *Should be disabled for measurements.* -* `is_collect_task_traces`: If enabled, *MxTasking* will collect information about which task executed at what times at which worker thread. *Should be disabled for measurements.* -* `memory_reclamation`: Specifies if reclamation should be done periodically, after every task execution, or never. -* `worker_mode`: When running in `PowerSave` mode, every worker will sleep for a small amount of time to reduce power. *Should be `Performance` for measurements.* \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/annotation.h b/repos/ealanos/src/lib/mx/tasking/annotation.h deleted file mode 100644 index dd0cbe79fc..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/annotation.h +++ /dev/null @@ -1,139 +0,0 @@ -#pragma once - -#include "prefetch_descriptor.h" -#include "priority.h" -#include -#include -#include - -namespace mx::tasking { - -class TaskSquad; - -/** - * Container for metadata that can be annotated to every task. - * The execution engine will use the annotation for scheduling - * and synchronization of concurrent accesses to the same data - * object, done by tasks. - */ -class Annotation -{ -public: - enum execution_destination : std::uint8_t - { - anywhere = 0U, - local = 1U - }; - enum access_intention : bool - { - readonly = true, - write = false - }; - enum resource_boundness : std::uint8_t - { - memory = 0U, - compute = 1U, - mixed = 2U - }; - - constexpr Annotation() noexcept = default; - explicit constexpr Annotation(const std::uint16_t worker_id) noexcept : _destination(worker_id) {} - explicit constexpr Annotation(const execution_destination destination) noexcept : _destination(destination) {} - constexpr Annotation(const enum access_intention access_intention, const resource::ptr resource) noexcept - : _access_intention(access_intention), _destination(resource) - { - } - constexpr Annotation(const enum access_intention access_intention, const resource::ptr resource, - const PrefetchDescriptor prefetch_descriptor) noexcept - : _access_intention(access_intention), _destination(resource), - _prefetch_hint(PrefetchHint{prefetch_descriptor, resource}) - { - } - constexpr Annotation(const Annotation &) noexcept = default; - constexpr Annotation(Annotation &&) noexcept = default; - ~Annotation() = default; - - Annotation &operator=(const Annotation &) noexcept = default; - Annotation &operator=(Annotation &&) noexcept = default; - - [[nodiscard]] bool is_readonly() const noexcept { return _access_intention == access_intention::readonly; } - [[nodiscard]] priority priority() const noexcept { return _priority; } - [[nodiscard]] enum resource_boundness resource_boundness() const noexcept { return _resource_boundness; } - [[nodiscard]] std::uint16_t worker_id() const noexcept { return std::get(_destination); } - [[nodiscard]] std::uint8_t numa_node_id() const noexcept { return std::get(_destination); } - [[nodiscard]] resource::ptr resource() const noexcept { return std::get(_destination); } - [[nodiscard]] bool has_worker_id() const noexcept { return std::holds_alternative(_destination); } - [[nodiscard]] bool has_numa_node_id() const noexcept { return std::holds_alternative(_destination); } - [[nodiscard]] bool has_resource() const noexcept { return std::holds_alternative(_destination); } - [[nodiscard]] bool is_locally() const noexcept - { - return std::holds_alternative(_destination) && - std::get(_destination) == execution_destination::local; - } - [[nodiscard]] bool is_anywhere() const noexcept - { - return std::holds_alternative(_destination) && - std::get(_destination) == execution_destination::anywhere; - } - [[nodiscard]] bool has_prefetch_hint() const noexcept { return _prefetch_hint.empty() == false; } - [[nodiscard]] PrefetchHint prefetch_hint() const noexcept { return _prefetch_hint; } - [[nodiscard]] PrefetchHint &prefetch_hint() noexcept { return _prefetch_hint; } - [[nodiscard]] std::uint16_t cycles() const noexcept { return _cycles; } - - void set(const enum access_intention access_intention) noexcept { _access_intention = access_intention; } - void set(const enum priority priority) noexcept { _priority = priority; } - void set(const enum resource_boundness resource_boundness) noexcept { _resource_boundness = resource_boundness; } - void set(const std::uint16_t worker_id) noexcept { _destination = worker_id; } - void set(const std::uint8_t numa_id) noexcept { _destination = numa_id; } - void set(const resource::ptr resource) noexcept { _destination = resource; } - void set(const enum execution_destination execution_destination) noexcept { _destination = execution_destination; } - void set(const PrefetchDescriptor prefetch_descriptor, const resource::ptr object) noexcept - { - _prefetch_hint = PrefetchHint{prefetch_descriptor, object}; - } - void set(const PrefetchHint prefetch_hint) noexcept { _prefetch_hint = prefetch_hint; } - void cycles(const std::uint16_t cycles) noexcept { _cycles = cycles; } - - bool operator==(const Annotation &other) const noexcept - { - return _access_intention == other._access_intention && _priority == other._priority && - _destination == other._destination && _prefetch_hint == other._prefetch_hint; - } - -private: - /// Access intention: Reading or writing the object? - /// Per default, a task is annotated as a "writer". - enum access_intention _access_intention - { - access_intention::write - }; - - /// Priority of a task. Low priority tasks will only be - /// executed, whenever a worker has no higher-priorized - /// tasks in his pool. - enum priority _priority - { - priority::normal - }; - - enum resource_boundness _resource_boundness - { - resource_boundness::mixed - }; - - /// Cycles used for execution of this task. - std::uint16_t _cycles{500U}; - - /// Target the task will run on. - /// The target can be a specific worker id, a NUMA node id, - /// a specific data object (that may have a worker_id) or - /// a hint like "local" or "anywhere". - std::variant _destination{ - execution_destination::local}; - - /// The prefetch hint is a data object that will be accessed - /// by the task and a mask that identifies the cache lines, - /// which should be prefetched. - PrefetchHint _prefetch_hint{}; -} __attribute__((packed)); -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/channel.h b/repos/ealanos/src/lib/mx/tasking/channel.h new file mode 100644 index 0000000000..72addc1fc5 --- /dev/null +++ b/repos/ealanos/src/lib/mx/tasking/channel.h @@ -0,0 +1,211 @@ +#pragma once + +#include "channel_occupancy.h" +#include "load.h" +#include "task.h" +#include "task_buffer.h" +#include +#include +#include +#include +#include +#include +#include + +namespace mx::tasking { +/** + * The channel is the central data structure where tasks are scheduled to pass tasks + * between worker threads. Every worker thread owns his own channel, where tasks + * are popped by only this channel. Every worker thread (or task) can push further + * tasks to the channel. + * + * Every channel consists of a handful of queues, where the tasks are really stored, + * different queues have different guarantees regarding concurrency and locality. + * + * In addition, every channel has its own buffer, where tasks are transferred from the + * queues. If the buffer is empty, the worker thread will fill it with tasks from backend + * queues. + * + * The buffer enables the worker thread to have a view to tasks that are ready for execution; + * this is used e.g. for prefetching. + */ +class Channel +{ +public: + constexpr Channel(const std::uint16_t id, const std::uint8_t numa_node_id, + const std::uint8_t prefetch_distance) noexcept + : _remote_queues({}), _local_queues({}), _task_buffer(prefetch_distance), _id(id), _numa_node_id(numa_node_id) + { + } + ~Channel() noexcept = default; + + + /** + * @return Identifier of the channel. + */ + [[nodiscard]] std::uint16_t id() const noexcept { return _id; } + + /** + * @return The next task to be executed. + */ + TaskInterface *next_task() noexcept { return _task_buffer.next(); } + + Channel *next() noexcept { return _next; } + void next(Channel *c) { _next = c; } + + /** + * Schedules the task to thread-safe queue with regard to the NUMA region + * of the producer. Producer of different NUMA regions should not share + * a single queue. + * @param task Task to be scheduled. + * @param numa_node_id NUMA region of the producer. + */ + void push_back_remote(TaskInterface *task, const std::uint8_t numa_node_id) noexcept + { + _remote_queues[task->priority()][numa_node_id].push_back(task); + } + + /** + * Schedules a task to the local queue, which is not thread-safe. Only + * the channel owner should spawn tasks this way. + * @param task Task to be scheduled. + */ + void push_back_local(TaskInterface *task) noexcept { _local_queues[task->priority()].push_back(task); } + + /** + * Fill the task buffer with tasks from the backend queues. + * @return Size of the buffer after filling it. + */ + std::uint16_t fill() noexcept + { + // Fill with normal prioritized. + auto size = fill(_task_buffer.available_slots()); + + // Fill with low prioritized. + if (this->_task_buffer.empty()) + { + size = fill(config::task_buffer_size()); + } + _size = size; + + return size; + } + + /** + * Fills the task buffer with tasks scheduled with a given priority. + * + * @tparam P Priority of the tasks. + * @return Size of the task buffer after filling. + */ + template std::uint16_t fill() noexcept { return fill

(_task_buffer.available_slots()); } + + /** + * @return Number of tasks available in the buffer and ready for execution. + */ + [[nodiscard]] std::uint16_t size() const noexcept { return _task_buffer.size(); } + + /** + * @return True, when the task buffer is empty. Backend queues may be have tasks. + */ + [[nodiscard]] bool empty() const noexcept { return _task_buffer.empty(); } + + /** + * Adds usage prediction of a resource to this channel. + * @param usage Predicted usage. + */ + void predict_usage(const resource::hint::expected_access_frequency usage) noexcept { _occupancy.predict(usage); } + + /** + * Updates the usage prediction of this channel. + * @param old_prediction So far predicted usage. + * @param new_prediction New predicted usage. + */ + void modify_predicted_usage(const resource::hint::expected_access_frequency old_prediction, + const resource::hint::expected_access_frequency new_prediction) noexcept + { + _occupancy.revoke(old_prediction); + _occupancy.predict(new_prediction); + } + + /** + * @return Aggregated predicted usage. + */ + [[nodiscard]] resource::hint::expected_access_frequency predicted_usage() const noexcept + { + return static_cast(_occupancy); + } + + /** + * @return True, whenever min. one prediction was "excessive". + */ + [[nodiscard]] bool has_excessive_usage_prediction() const noexcept + { + return _occupancy.has_excessive_usage_prediction(); + } + + std::uint8_t numa_node_id() { return _numa_node_id; } + + std::uint32_t size() { return _size; } + + std::uint32_t decrement() { return --_size; } + + tasking::priority phase() { return _phase; } + void switch_phase() { _phase = _phase == priority::normal ? priority::low : priority::normal; } + void phase(tasking::priority phase) { _phase = phase; } + + std::uint16_t id() { return _id; } + +private: + // Backend queues for multiple produces in different NUMA regions and different priorities, + alignas(64) + std::array, memory::config::max_numa_nodes()>, 2> _remote_queues{}; + + // Backend queues for a single producer (owning worker thread) and different priorities. + alignas(64) std::array, 2> _local_queues{}; + + // Buffer for ready-to-execute tasks. + alignas(64) TaskBuffer _task_buffer; + + // Id of this channel. + const std::uint16_t _id; + + // Size of this channel + std::int32_t _size{0U}; + + // NUMA id of the worker thread owning this channel. + const std::uint8_t _numa_node_id; + + // Holder of resource predictions of this channel. + alignas(64) ChannelOccupancy _occupancy{}; + + // Is the channel currently processed by a worker + alignas(64) std::atomic _phase{priority::normal}; + + alignas(64) Channel *_next{nullptr}; + + /** + * Fills the task buffer with tasks scheduled with a given priority. + * + * @tparam P Priority. + * @param available Number of maximal tasks to fill the task buffer. + * @return Size of the task buffer after filling. + */ + template std::uint16_t fill(std::uint16_t available) noexcept + { + // 1) Fill up from the local queue. + available -= _task_buffer.fill(_local_queues[P], available); + + if (available > 0U) + { + // 2) Fill up from remote queues; start with the NUMA-local one. + for (auto i = 0U; i < _remote_queues[P].max_size(); ++i) + { + const auto numa_node_id = (_numa_node_id + i) & (_remote_queues[P].max_size() - 1U); + available -= _task_buffer.fill(_remote_queues[P][numa_node_id], available); + } + } + + return _task_buffer.max_size() - available; + } +}; +} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h b/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h similarity index 52% rename from repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h rename to repos/ealanos/src/lib/mx/tasking/channel_occupancy.h index 274ce037bb..74f9c829b2 100644 --- a/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h +++ b/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h @@ -2,24 +2,23 @@ #include #include -#include -#include +#include namespace mx::tasking { /** * Stores usage predictions. */ -class TaskPoolOccupancy +class ChannelOccupancy { public: - constexpr TaskPoolOccupancy() = default; - ~TaskPoolOccupancy() = default; + constexpr ChannelOccupancy() = default; + ~ChannelOccupancy() = default; /** * Adds the given predicted usage. * @param predicted_usage Predicted usage. */ - void predict(const mx::resource::expected_access_frequency predicted_usage) noexcept + void predict(const resource::hint::expected_access_frequency predicted_usage) noexcept { _predicted_usage_counter[static_cast(predicted_usage)].fetch_add(1, std::memory_order_relaxed); } @@ -28,7 +27,7 @@ public: * Subtracts the given predicted usage. * @param predicted_usage Predicted usage. */ - void revoke(const mx::resource::expected_access_frequency predicted_usage) noexcept + void revoke(const resource::hint::expected_access_frequency predicted_usage) noexcept { _predicted_usage_counter[static_cast(predicted_usage)].fetch_sub(1, std::memory_order_relaxed); } @@ -38,30 +37,30 @@ public: */ [[nodiscard]] bool has_excessive_usage_prediction() const noexcept { - return has_at_least_one(); + return has_at_least_one(); } /** * @return The highest predicted usage. */ - explicit operator mx::resource::expected_access_frequency() const noexcept + explicit operator resource::hint::expected_access_frequency() const noexcept { - if (has_at_least_one()) + if (has_at_least_one()) { - return mx::resource::expected_access_frequency::excessive; + return resource::hint::expected_access_frequency::excessive; } - if (has_at_least_one()) + if (has_at_least_one()) { - return mx::resource::expected_access_frequency::high; + return resource::hint::expected_access_frequency::high; } - if (has_at_least_one()) + if (has_at_least_one()) { - return mx::resource::expected_access_frequency::normal; + return resource::hint::expected_access_frequency::normal; } - return mx::resource::expected_access_frequency::unused; + return resource::hint::expected_access_frequency::unused; } private: @@ -71,7 +70,7 @@ private: /** * @return True, when at least one usage as given by the template was predicted. */ - template [[nodiscard]] bool has_at_least_one() const noexcept + template [[nodiscard]] bool has_at_least_one() const noexcept { return _predicted_usage_counter[static_cast(U)].load(std::memory_order_relaxed) > 0; } diff --git a/repos/ealanos/src/lib/mx/tasking/config.h b/repos/ealanos/src/lib/mx/tasking/config.h index 5f26741e82..2bce77cfdf 100644 --- a/repos/ealanos/src/lib/mx/tasking/config.h +++ b/repos/ealanos/src/lib/mx/tasking/config.h @@ -4,70 +4,30 @@ namespace mx::tasking { class config { public: - enum queue_backend - { - Single, /// Each worker has a single queue. - NUMALocal, /// Each worker has a queue for each NUMA domain and a local queue. - WorkerLocal /// Each worker has a queue for each worker. - }; - enum memory_reclamation_scheme { - None = 0U, /// No memory reclamation at all. - UpdateEpochOnRead = 1U, /// End the epoch after every reading task. - UpdateEpochPeriodically = 2U /// End the epoch after a static amount of time. + None = 0U, + UpdateEpochOnRead = 1U, + UpdateEpochPeriodically = 2U }; - enum worker_mode - { - Performance = 0U, /// The worker contact the task pool when no task was found. - PowerSave = 1U /// The worker will sleep a static amount of time when no task was found. - }; + // Maximal number of supported cores. + static constexpr auto max_cores() { return 128U; } - /// Maximal number of supported cores. - static constexpr auto max_cores() { return 64U; } - - /// Backend of the queues. - static constexpr auto queue() { return queue_backend::NUMALocal; } - - /// Maximal number of supported simultaneous multithreading threads. - static constexpr auto max_smt_threads() { return 2U; } - - /// Maximal size for a single task, will be used for task allocation. + // Maximal size for a single task, will be used for task allocation. static constexpr auto task_size() { return 128U; } - /// The task buffer will hold a set of tasks, fetched from - /// queues. This is the size of the buffer. + // The task buffer will hold a set of tasks, fetched from + // queues. This is the size of the buffer. static constexpr auto task_buffer_size() { return 64U; } - /// If enabled, the worker will sample task cycles during execution - /// and use that stats for approximating the prefetch distance for each - /// task. - /// If disabled, automatic prefetching will fall back to task annotations. - static constexpr auto is_monitor_task_cycles_for_prefetching() { return false; } + // If enabled, will record the number of execute tasks, + // scheduled tasks, reader and writer per core and more. + static constexpr auto task_statistics() { return false; } - /// If enabled, will record the number of execute tasks, - /// scheduled tasks, reader and writer per core and more. - static constexpr auto is_use_task_counter() { return false; } - - /// If enabled, the runtime of each task will be recorded. - static constexpr auto is_collect_task_traces() { return false; } - - /// If enabled, the dataflow graph will collect statistics which node - /// emitted which amount of data. - static constexpr auto is_count_graph_emits() { return false; } - - /// If enabled, the dataflow graph will collect start times of - /// pipelines and finish times of nodes. - static constexpr auto is_record_graph_times() { return false; } - - /// If enabled, memory will be reclaimed while using optimistic - /// synchronization by epoch-based reclamation. Otherwise, freeing - /// memory is unsafe. + // If enabled, memory will be reclaimed while using optimistic + // synchronization by epoch-based reclamation. Otherwise, freeing + // memory is unsafe. static constexpr auto memory_reclamation() { return memory_reclamation_scheme::None; } - - /// Switch between performance and power saving mode. - /// Set to 'worker_mode::Performance' for measurements. - static constexpr auto worker_mode() { return worker_mode::Performance; } }; } // namespace mx::tasking diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/annotation.h b/repos/ealanos/src/lib/mx/tasking/dataflow/annotation.h deleted file mode 100644 index 9c932b96a2..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/annotation.h +++ /dev/null @@ -1,97 +0,0 @@ -#pragma once -#include "token.h" -#include "token_generator.h" -#include -#include -#include -#include - -namespace mx::tasking::dataflow { -template class annotation -{ -public: - using value_type = T; - - enum FinalizationType : std::uint8_t - { - sequential, - parallel, - reduce, - none - }; - - class CompletionCallbackInterface - { - public: - constexpr CompletionCallbackInterface() noexcept = default; - constexpr virtual ~CompletionCallbackInterface() noexcept = default; - - [[nodiscard]] virtual bool is_complete() noexcept = 0; - }; - - annotation() noexcept = default; - annotation(annotation &&) noexcept = default; - ~annotation() noexcept = default; - - annotation &operator=(annotation &&) noexcept = default; - - void is_parallel(const bool is_parallel) noexcept { _is_parallel = is_parallel; } - - void produces(std::unique_ptr> &&generator) noexcept { _token_generator = std::move(generator); } - - void resource_boundness(const enum tasking::annotation::resource_boundness resource_boundness) noexcept - { - _resource_boundness = resource_boundness; - } - - void finalization_type(const FinalizationType type) noexcept { _finalization_type = type; } - void finalizes(std::vector &&data) { _finalized_data = std::move(data); } - - void is_finalizes_pipeline(const bool is_finalizes_pipeline) noexcept - { - _is_finalizes_pipeline = is_finalizes_pipeline; - } - - void completion_callback(std::unique_ptr &&callback) noexcept - { - _complection_callback = std::move(callback); - } - - [[nodiscard]] bool is_parallel() const noexcept { return _is_parallel; } - [[nodiscard]] std::unique_ptr> &token_generator() noexcept { return _token_generator; } - [[nodiscard]] enum tasking::annotation::resource_boundness resource_boundness() const noexcept - { - return _resource_boundness; - } - - [[nodiscard]] bool is_producing() const noexcept { return _token_generator != nullptr; } - - [[nodiscard]] FinalizationType finalization_type() const noexcept { return _finalization_type; } - [[nodiscard]] const std::vector &finalize_sequence() const noexcept { return _finalized_data; } - [[nodiscard]] bool is_finalizes_pipeline() const noexcept { return _is_finalizes_pipeline; } - - [[nodiscard]] const std::unique_ptr &completion_callback() const noexcept - { - return _complection_callback; - } - [[nodiscard]] bool has_completion_callback() const noexcept { return _complection_callback != nullptr; } - -private: - bool _is_parallel{false}; - std::unique_ptr> _token_generator; - - enum tasking::annotation::resource_boundness _resource_boundness{tasking::annotation::resource_boundness::mixed}; - - FinalizationType _finalization_type{FinalizationType::sequential}; - std::vector _finalized_data; - - /// Pipelines are finalized, when the last node is finished. - /// However, a node may finalize the pipeline premature. - bool _is_finalizes_pipeline{false}; - - /// Callback that evalutes if a node is "completed". - /// Some nodes may spawn further tasks during finalization. - /// They will complete only after executing those tasks. - std::unique_ptr _complection_callback{nullptr}; -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/barrier_task.h b/repos/ealanos/src/lib/mx/tasking/dataflow/barrier_task.h deleted file mode 100644 index f294b921ed..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/barrier_task.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "node.h" -#include "producer.h" -#include -#include -#include -#include - -namespace mx::tasking::dataflow { -/** - * The finalization barrier is spawned on every channel that executed - * at least one task of the TaskNode. - * After the last finalization barrier was hit, the graph will finalize the node. - */ -template class FinalizationBarrierTask final : public TaskInterface -{ -public: - FinalizationBarrierTask(std::atomic_int16_t &counter, EmitterInterface &graph, NodeInterface *node) noexcept - : _count_pending_workers(counter), _graph(graph), _node(node) - { - } - - ~FinalizationBarrierTask() override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - const auto pending_workers = _count_pending_workers.fetch_sub(1); - if (pending_workers == 0) - { - _graph.finalize(worker_id, _node); - } - - return TaskResult::make_remove(); - } - - [[nodiscard]] std::uint64_t trace_id() const noexcept override { return _node->trace_id(); } - -private: - std::atomic_int16_t &_count_pending_workers; - EmitterInterface &_graph; - NodeInterface *_node; -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/finalize_counter.h b/repos/ealanos/src/lib/mx/tasking/dataflow/finalize_counter.h deleted file mode 100644 index 14ce48cb0d..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/finalize_counter.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once -#include -#include - -namespace mx::tasking::dataflow { -class ParallelProducingFinalizeCounter -{ -public: - ParallelProducingFinalizeCounter(std::atomic_uint16_t *worker_counter, std::atomic_uint64_t *task_counter) noexcept - : _task_counter(task_counter), _worker_counter(worker_counter) - { - } - - ParallelProducingFinalizeCounter(const ParallelProducingFinalizeCounter &) noexcept = default; - ParallelProducingFinalizeCounter(ParallelProducingFinalizeCounter &&) noexcept = default; - - ~ParallelProducingFinalizeCounter() noexcept = default; - - [[nodiscard]] bool tick() noexcept - { - if (_task_counter->fetch_sub(1U) == 1U) - { - std::free(_task_counter); - - if (_worker_counter->fetch_sub(1U) == 1U) - { - std::free(_worker_counter); - return true; - } - } - - return false; - } - -private: - std::atomic_uint64_t *_task_counter; - - std::atomic_uint16_t *_worker_counter; -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/graph.h b/repos/ealanos/src/lib/mx/tasking/dataflow/graph.h deleted file mode 100644 index f8b0b93467..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/graph.h +++ /dev/null @@ -1,994 +0,0 @@ -#pragma once - -#include "barrier_task.h" -#include "finalize_counter.h" -#include "node.h" -#include "pipeline.h" -#include "producer.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace mx::tasking::dataflow { - -template class Graph; - -/** - * The SequentialProducingTask takes a graph node and calls the nodes produce() - * method for an annotated amount or until the produce() call returns false. - * The task will only spawned once; produced will be called in a loop. - */ -template class SequentialProducingTask final : public TaskInterface -{ -public: - SequentialProducingTask(Graph *graph, NodeInterface *node) noexcept : _graph(graph), _node(node) {} - ~SequentialProducingTask() noexcept override = default; - - TaskResult execute(std::uint16_t worker_id) override; - - [[nodiscard]] std::uint64_t trace_id() const noexcept override { return _node->trace_id(); } - -private: - Graph *_graph; - NodeInterface *_node; -}; - -/** - * The ParallelProducingTask takes a node that is annotated to produce data - * in parallel. The node has to provide a set of resource annotations that - * are used to produce data or a annotated number how often the node should - * produce(). - * For each sequence, one ParallelProducingTask will be spawned. - */ -template class ParallelProducingTask final : public TaskInterface -{ -public: - ParallelProducingTask(Graph *graph, NodeInterface *node, T &&data, - ParallelProducingFinalizeCounter finalize_counter) noexcept - : _graph(graph), _node(node), _data(std::move(data)), _finalize_counter(finalize_counter) - { - } - ~ParallelProducingTask() noexcept override = default; - - TaskResult execute(std::uint16_t worker_id) override; - - [[nodiscard]] std::uint64_t trace_id() const noexcept override { return _node->trace_id(); } - -private: - Graph *_graph; - NodeInterface *_node; - T _data; - ParallelProducingFinalizeCounter _finalize_counter; -}; - -/** - * Since the produced data may become very large, a single task that spawns - * all parallel producing tasks may block a worker for a long time. - * The SpawnParallelProducingTask will be spawned on every worker and spawn - * parallel producing tasks for a partition of the data. - */ -template class SpawnParallelProducingTask final : public TaskInterface -{ -public: - SpawnParallelProducingTask(Graph *graph, NodeInterface *node, - std::atomic_uint16_t *spawned_worker_counter) noexcept - : _graph(graph), _node(node), _spawned_worker_counter(spawned_worker_counter) - { - } - ~SpawnParallelProducingTask() noexcept override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - auto &generator = _node->annotation().token_generator(); - if (generator != nullptr) [[likely]] - { - /// Data spawned for this worker by this task. - auto data = generator->generate(worker_id); - - if (data.empty() == false) [[likely]] - { - /// Counter of tasks spawned by this worker. - /// Hopefully, they will be spawned at the same core. - auto *finalize_counter = - new (std::aligned_alloc(system::cache::line_size(), sizeof(std::atomic_uint64_t))) - std::atomic_uint64_t(data.size()); - - for (auto &&token : data) - { - /// Spawn producing tasks with - auto *source_task = runtime::new_task>( - worker_id, _graph, _node, std::move(token.data()), - ParallelProducingFinalizeCounter{_spawned_worker_counter, finalize_counter}); - - source_task->annotate(token.annotation()); - runtime::spawn(*source_task, worker_id); - } - } - - /// It may happen, that a worker has no data. In this case, - /// we may finalize the graph if all other tasks have - /// already executed. - else if (_spawned_worker_counter->fetch_sub(1U) == 1U) - { - _graph->finalize(worker_id, _node); - } - } - - return TaskResult::make_remove(); - } - -private: - Graph *_graph; - NodeInterface *_node; - std::atomic_uint16_t *_spawned_worker_counter; -}; - -/** - * Since there are multiple ways to finalize a node (sequential, parallel, reduce), - * we need different sort of finalize tasks. This is the abstract finalize task - * that implements a function that calls the in_complete of the following node - * and starts pipelines of the graph if needed. - */ -template class AbstractFinalizeTask; - -/** - * The graph is a set of nodes that produce and consume data. - * Every time, a node emits data to the graph, the graph makes sure - * that the nodes successor will consume the data. - * - * Further, the nodes are arranged in pipelines to solve dependencies - * between nodes. Everytime a pipeline finishes, the graph will start - * depending pipelines. - * - * After executing the last node of the graph, all nodes and pipelines - * will be removed. - */ -template class Graph : public EmitterInterface -{ -public: - friend class AbstractFinalizeTask; - - Graph(const bool is_record_times = false) : _is_record_times(is_record_times) - { - _pipelines.reserve(1U << 3U); - _node_pipelines.reserve(1U << 6U); - _pipeline_dependencies.reserve(1U << 3U); - _pipeline_dependencies_lock.unlock(); - - if constexpr (config::is_record_graph_times()) - { - if (_is_record_times) - { - _pipeline_start_times.reserve(_pipelines.capacity()); - _node_finish_times.reserve(1U << 6U); - } - } - } - - ~Graph() override - { - std::for_each(_pipelines.begin(), _pipelines.end(), [](auto *pipeline) { - pipeline->~Pipeline(); - std::free(pipeline); - }); - } - - /** - * @return All pipelines of the graph. - */ - [[nodiscard]] const std::vector *> &pipelines() const noexcept { return _pipelines; } - - /** - * @return A list of node pairs (A,B) where A depends on B. A will be started when B finishes. - */ - [[nodiscard]] const std::vector *, NodeInterface *>> &node_dependencies() - const noexcept - { - return _node_dependencies; - } - - /** - * Emit data to the graph. The data will be consumed by the successor of the given node. - * - * @param worker_id Worker where emit() is called. - * @param node The node emitting data. - * @param data The emitted data. - */ - void emit(const std::uint16_t worker_id, NodeInterface *node, Token &&data) override - { - if (_is_active) [[likely]] - { - node->out()->consume(worker_id, *this, std::move(data)); - - if constexpr (config::is_count_graph_emits()) - { - ++this->_emit_counter.at(node)[worker_id].value(); - } - } - } - - /** - * Finalizes a given node. When a node with dependencies finalizes, - * the graph will start depending pipelines. - * When the last node of the graph finalizes, the graph will be freed - * from memory. - * - * @param worker_id Worker where the node finalizes. - * @param node Node that finalizes. - */ - void finalize(std::uint16_t worker_id, NodeInterface *node) override; - - void for_each_node(std::function *)> &&callback) const override - { - for (auto *pipeline : _pipelines) - { - for (auto *node : pipeline->nodes()) - { - callback(node); - } - } - } - - /** - * Adds a single node to the graph. - * - * @param node Node to add. - */ - void add(NodeInterface *node) - { - auto *pipeline = make_pipeline(); - pipeline->emplace(node); - - _node_pipelines.template insert(std::make_pair(node, pipeline)); - } - - /** - * Adds two nodes to the graph (if not added, yet) and - * creates an edge between the nodes. Whenever the from node - * emits data to the graph, to will consume this data. - * - * @param from Node that will produce data. - * @param to Node that will consume the data emitted by from. - */ - void make_edge(NodeInterface *from_node, NodeInterface *to_node) - { - if (_node_pipelines.contains(from_node) == false && _node_pipelines.contains(to_node) == false) - { - /// Both nodes will be in the same pipeline - auto *pipeline = make_pipeline(); - pipeline->emplace(from_node); - pipeline->emplace(to_node); - - _node_pipelines.template insert(std::make_pair(from_node, pipeline)); - _node_pipelines.template insert(std::make_pair(to_node, _node_pipelines.at(from_node))); - } - else if (_node_pipelines.contains(to_node) == false) - { - /// From is already part of a pipeline. Add "to" to the same. - auto *pipeline = _node_pipelines.at(from_node); - _node_pipelines.template insert(std::make_pair(to_node, pipeline)); - pipeline->emplace(to_node); - } - else if (_node_pipelines.contains(from_node) == false) - { - /// To is already part of a pipeline. Add "from" to the same. - auto *pipeline = _node_pipelines.at(to_node); - _node_pipelines.template insert(std::make_pair(from_node, pipeline)); - pipeline->emplace(from_node); - } - - from_node->out(to_node); - to_node->add_in(from_node); - } - - /** - * Creates a dependency between the node pair (A,B) where A will be - * started only when B finishes. - * - * @param node Node with dependency. - * @param node_to_wait_for Node that has to finish. - */ - void make_dependency(NodeInterface *node, NodeInterface *node_to_wait_for) - { - _node_dependencies.template emplace_back(std::make_pair(node, node_to_wait_for)); - - auto *node_pipeline = _node_pipelines.at(node); - auto *wait_for_pipeline = _node_pipelines.at(node_to_wait_for); - - if (node_pipeline == wait_for_pipeline) - { - auto *new_pipeline = make_pipeline(); - change_pipeline(node_to_wait_for, node_pipeline, new_pipeline); - _pipeline_dependencies.at(node_pipeline).template emplace_back(new_pipeline); - } - else - { - _pipeline_dependencies.at(node_pipeline).template emplace_back(wait_for_pipeline); - } - } - - /** - * Starts the graph by spawning tasks that call produce() for all - * nodes assigned to a pipeline without dependencies. - * - * @param worker_id Worker where the graph is started. - */ - void start(const std::uint16_t worker_id) - { - if constexpr (config::is_count_graph_emits()) - { - this->for_each_node([&emits = this->_emit_counter](auto *node) { - emits.insert(std::make_pair(node, std::array, config::max_cores()>{})); - emits.at(node).fill(util::aligned_t{0U}); - }); - } - - /// Start all tasks for preparatory work. - for (auto *task : _preparatory_tasks) - { - runtime::spawn(*task, worker_id); - } - _preparatory_tasks.clear(); - - /// Collect pipelines without dependencies and start them. - auto pipelines_to_start = std::vector *>{}; - for (auto &[pipeline, dependencies] : _pipeline_dependencies) - { - if (dependencies.empty()) - { - pipelines_to_start.emplace_back(pipeline); - } - } - - for (auto *pipeline : pipelines_to_start) - { - _pipeline_dependencies.erase(pipeline); - start(worker_id, pipeline); - } - } - - void interrupt() override { _is_active = false; } - - void add(std::vector &&preparatory_tasks) - { - std::move(preparatory_tasks.begin(), preparatory_tasks.end(), std::back_inserter(_preparatory_tasks)); - } - - [[nodiscard]] std::uint64_t count_emitted(NodeInterface *node) const noexcept - { - if constexpr (config::is_count_graph_emits()) - { - const auto &iterator = this->_emit_counter.at(node); - return std::accumulate(iterator.begin(), iterator.end(), 0U, - [](const auto sum, const auto count) { return sum + count.value(); }); - } - else - { - return 0U; - } - } - - [[nodiscard]] std::optional start_time(Pipeline *pipeline) const noexcept - { - if (auto iterator = _pipeline_start_times.find(pipeline); iterator != _pipeline_start_times.end()) - { - return std::make_optional(iterator->second); - } - - return std::nullopt; - } - - [[nodiscard]] std::optional finish_time( - NodeInterface *node) const noexcept - { - if (auto iterator = _node_finish_times.find(node); iterator != _node_finish_times.end()) - { - return std::make_optional(iterator->second); - } - - return std::nullopt; - } - - [[nodiscard]] std::vector *, std::chrono::nanoseconds>> node_times() const - { - auto times = std::vector *, std::chrono::nanoseconds>>{}; - - for (auto *pipeline : _pipelines) - { - if (auto pipeline_iterator = _pipeline_start_times.find(pipeline); - pipeline_iterator != _pipeline_start_times.end()) - { - auto last_start = pipeline_iterator->second; - - for (auto *node : pipeline->nodes()) - { - if (auto node_iterator = _node_finish_times.find(node); node_iterator != _node_finish_times.end()) - { - auto node_finish = node_iterator->second; - times.template emplace_back(std::make_pair( - node, std::chrono::duration_cast(node_finish - last_start))); - last_start = node_finish; - } - } - } - } - - return times; - } - -private: - /// All pipelines of the graph. - std::vector *> _pipelines; - - /// Map to assign each node a specific pipeline. - std::unordered_map *, Pipeline *> _node_pipelines; - - /// Dependencies between pipelines. Each pipeline might have multiple dependencies. - std::unordered_map *, std::vector *>> _pipeline_dependencies; - - /// List of node pairs (A,B) where A has to wait until B finishes. - std::vector *, NodeInterface *>> _node_dependencies; - - /// Tasks that should be executed before executing the graph to set up i.e. data structures. - std::vector _preparatory_tasks; - - /// Record execution times? - bool _is_record_times; - - /// Start time of each pipeline. - std::unordered_map *, std::chrono::system_clock::time_point> _pipeline_start_times; - - /// End time of each node. - std::unordered_map *, std::chrono::system_clock::time_point> _node_finish_times; - - /// Lock for pipeline dependencies. Will be locked whenever a pipeline finishes. - alignas(64) synchronization::Spinlock _pipeline_dependencies_lock; - std::atomic_uint32_t _finished_pipelines{0U}; - - alignas(64) bool _is_active{true}; - - alignas(64) std::unordered_map *, - std::array, config::max_cores()>> _emit_counter; - - [[nodiscard]] bool complete(std::uint16_t worker_id, NodeInterface *node); - - /** - * @return A new pipeline. - */ - Pipeline *make_pipeline() - { - auto *pipeline = _pipelines.template emplace_back( - new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(Pipeline))) Pipeline()); - _pipeline_dependencies.insert(std::make_pair(pipeline, std::vector *>{})); - - return pipeline; - } - - /** - * Moves a given node from a pipeline to another one. - * All predecessors will be moved, too. - * - * @param node Node to move from one to another pipeline. - * @param original_pipeline The original pipeline of the node. - * @param new_pipeline The new pipeline of the node and its predecessors. - */ - void change_pipeline(NodeInterface *node, Pipeline *original_pipeline, Pipeline *new_pipeline) - { - if (_node_pipelines.at(node) == original_pipeline) - { - _node_pipelines.at(node) = new_pipeline; - - for (auto *node_in : node->in()) - { - change_pipeline(node_in, original_pipeline, new_pipeline); - } - } - } - - /** - * Starts a given pipeline. This will spawn the produce tasks for the first node of the pipeline. - * - * @param worker_id Worker where start() is called. - * @param pipeline Pipeline to start. - */ - void start(const std::uint16_t worker_id, Pipeline *pipeline) - { - auto *node = pipeline->nodes().front(); - - if constexpr (config::is_record_graph_times()) - { - if (this->_is_record_times) - { - this->_pipeline_start_times.insert(std::make_pair(pipeline, std::chrono::system_clock::now())); - } - } - - if (node->annotation().is_parallel() && node->annotation().is_producing()) - { - const auto count_workers = runtime::workers(); - - auto *spawned_worker_counter = - new (std::aligned_alloc(system::cache::line_size(), sizeof(std::atomic_uint16_t))) - std::atomic_uint16_t(count_workers); - - for (auto target_worker_id = std::uint16_t(0U); target_worker_id < count_workers; ++target_worker_id) - { - auto *spawn_task = - runtime::new_task>(worker_id, this, node, spawned_worker_counter); - - spawn_task->annotate(std::uint16_t(target_worker_id)); - runtime::spawn(*spawn_task, worker_id); - } - } - else if (node->annotation().is_producing()) /// Produce sequential. - { - auto *source_task = runtime::new_task>(worker_id, this, node); - runtime::spawn(*source_task, worker_id); - } - else - { - this->finalize(worker_id, node); - } - } -}; - -template class AbstractFinalizeTask : public TaskInterface -{ -public: - constexpr AbstractFinalizeTask(Graph *graph, NodeInterface *node) noexcept : _graph(graph), _node(node) {} - - ~AbstractFinalizeTask() noexcept override = default; - - void complete(const std::uint16_t worker_id) - { - if (_graph->complete(worker_id, _node)) - { - _graph = nullptr; - _node = nullptr; - } - } - - [[nodiscard]] std::uint64_t trace_id() const noexcept override - { - if (_node != nullptr) [[likely]] - { - return _node->trace_id(); - } - - return TaskInterface::trace_id(); - } - -protected: - Graph *_graph; - NodeInterface *_node; -}; - -/** - * The sequentual finalize task will call "finalize" of a node once. - */ -template class SequentialFinalizeTask final : public AbstractFinalizeTask -{ -public: - constexpr SequentialFinalizeTask(Graph *graph, NodeInterface *node) noexcept - : AbstractFinalizeTask(graph, node) - { - } - ~SequentialFinalizeTask() noexcept override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - const auto ressource = this->annotation().has_resource() ? this->annotation().resource() : nullptr; - - AbstractFinalizeTask::_node->finalize(worker_id, *AbstractFinalizeTask::_graph, true, ressource, nullptr); - AbstractFinalizeTask::complete(worker_id); - - return TaskResult::make_remove(); - } -}; - -template class ParallelCompletionTask final : public AbstractFinalizeTask -{ -public: - ParallelCompletionTask(Graph *graph, NodeInterface *node, - std::atomic_uint16_t *count_finalized_cores) noexcept - : AbstractFinalizeTask(graph, node), _count_finalized_workers(count_finalized_cores) - { - } - - ~ParallelCompletionTask() noexcept override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - const auto is_last = _count_finalized_workers->fetch_sub(1U) == 1U; - if (is_last) - { - const auto is_completed = this->_node->annotation().completion_callback()->is_complete(); - if (is_completed) - { - std::free(_count_finalized_workers); - AbstractFinalizeTask::complete(worker_id); - } - else - { - _count_finalized_workers->store(this->_node->annotation().finalize_sequence().size()); - for (const auto finalize_data : this->_node->annotation().finalize_sequence()) - { - const auto target_worker_id = finalize_data.worker_id(); - auto *completion_task = mx::tasking::runtime::new_task>( - worker_id, this->_graph, this->_node, _count_finalized_workers); - completion_task->annotate(target_worker_id); - mx::tasking::runtime::spawn(*completion_task, worker_id); - } - } - } - - return TaskResult::make_remove(); - } - -private: - std::atomic_uint16_t *_count_finalized_workers{nullptr}; -}; - -/** - * The parallel finalize task will be spawned on every worker and call - * the finalize of a node in parallel. Only the last executed finalize task - * will call the in_complete of the follow-up node, keeping track by a atomic - * counter. - */ -template class ParallelFinalizeTask final : public AbstractFinalizeTask -{ -public: - constexpr ParallelFinalizeTask(Graph *graph, NodeInterface *node, - std::atomic_uint16_t *count_finalized_cores) noexcept - : AbstractFinalizeTask(graph, node), _count_finalized_workers(count_finalized_cores) - { - } - - ~ParallelFinalizeTask() noexcept override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - const auto is_last = _count_finalized_workers->fetch_sub(1U) == 1U; - - /// Let the node finalize it's results. Maybe, the node will emit some data to the graph. - AbstractFinalizeTask::_node->finalize(worker_id, *AbstractFinalizeTask::_graph, is_last, - this->annotation().resource(), nullptr); - - if (is_last) - { - if (this->_node->annotation().has_completion_callback() && - this->_node->annotation().completion_callback()->is_complete() == false) - { - const auto &finalize_sequence = this->_node->annotation().finalize_sequence(); - _count_finalized_workers->store(finalize_sequence.size()); - for (const auto finalize_data : finalize_sequence) - { - const auto target_worker_id = finalize_data.worker_id(); - auto *completion_task = mx::tasking::runtime::new_task>( - worker_id, this->_graph, this->_node, _count_finalized_workers); - completion_task->annotate(target_worker_id); - mx::tasking::runtime::spawn(*completion_task, worker_id); - } - } - else - { - std::free(_count_finalized_workers); - AbstractFinalizeTask::complete(worker_id); - } - } - - return TaskResult::make_remove(); - } - -private: - std::atomic_uint16_t *_count_finalized_workers{nullptr}; -}; - -template class ReduceFinalizeTask final : public AbstractFinalizeTask -{ -public: - constexpr ReduceFinalizeTask(Graph *graph, NodeInterface *node, const mx::resource::ptr reduced_data) noexcept - : AbstractFinalizeTask(graph, node), _reduced_data(reduced_data) - { - } - - ~ReduceFinalizeTask() noexcept override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - AbstractFinalizeTask::_node->finalize(worker_id, *AbstractFinalizeTask::_graph, false, - this->annotation().resource(), _reduced_data); - - if (auto *next_task = dynamic_cast *>(_follow_up_task)) - { - if (next_task->_pending_preceding_counter.fetch_sub(1U) == 1U) - { - return TaskResult::make_succeed_and_remove(next_task); - } - } - else if (auto *sequential_finalize_task = dynamic_cast *>(_follow_up_task)) - { - return TaskResult::make_succeed_and_remove(sequential_finalize_task); - } - - return TaskResult::make_remove(); - } - - void follow_up_task(AbstractFinalizeTask *task) noexcept { _follow_up_task = task; } - - [[nodiscard]] resource::ptr reduced_resource() const noexcept { return _reduced_data; } - -private: - /// The task that will reduce next. - AbstractFinalizeTask *_follow_up_task; - - /// The worker id that will be reduced. - resource::ptr _reduced_data; - - /// Counts how many reduce tasks are pending. - std::atomic_uint8_t _pending_preceding_counter{2U}; -}; - -/** - * Calls consume of a node for every object if the data sequentially. - */ -template TaskResult SequentialProducingTask::execute(const std::uint16_t worker_id) -{ - auto sequence = 0ULL; - - for (auto &data : this->_node->annotation().token_generator()->generate(worker_id)) - { - this->_node->consume(worker_id, *_graph, std::move(data)); - } - - auto *finalize_task = mx::tasking::runtime::new_task>(worker_id, _graph, _node); - finalize_task->annotate(worker_id); - return TaskResult::make_succeed_and_remove(finalize_task); -} - -/** - * For every part of the data, a single parallel producing task will be spawned. - * Keeping track using an atomic counter, the last task will call finalize for the node. - */ -template TaskResult ParallelProducingTask::execute(const std::uint16_t worker_id) -{ - _node->consume(worker_id, *_graph, Token{std::move(this->_data), this->annotation()}); - if (_finalize_counter.tick()) - { - _graph->finalize(worker_id, _node); - } - - return TaskResult::make_remove(); -} - -class FinalizeReduceCalculator -{ -public: - [[nodiscard]] static std::pair>>, resource::ptr> - pairs(const std::vector &data) - { - auto pairs = std::vector>>{}; - - auto reduced_data = data; - while (reduced_data.size() > 1U) - { - reduced_data = FinalizeReduceCalculator::reduce(pairs, std::move(reduced_data)); - } - - return std::make_pair(std::move(pairs), reduced_data.front()); - } - -private: - [[nodiscard]] static std::vector reduce( - std::vector>> &reduce_passes, - std::vector &&to_reduce) - { - /// Pairs to reduce. - auto pairs = std::vector>{}; - pairs.reserve(to_reduce.size() / 2U); - - /// Data that will be reduced in the next step. - auto to_reduce_next = std::vector{}; - to_reduce_next.reserve((to_reduce.size() / 2U) + 1U); - - const auto is_odd = to_reduce.size() % 2U != 0U; - for (auto i = 0U; i < to_reduce.size() - static_cast(is_odd); i += 2U) - { - pairs.emplace_back(std::make_pair(to_reduce[i], to_reduce[i + 1U])); - to_reduce_next.emplace_back(to_reduce[i]); - } - - if (is_odd) - { - to_reduce_next.emplace_back(to_reduce.back()); - } - - if (pairs.empty() == false) - { - reduce_passes.emplace_back(std::move(pairs)); - } - - return to_reduce_next; - } -}; - -template void Graph::finalize(const std::uint16_t worker_id, NodeInterface *node) -{ - const auto finalization_type = node->annotation().finalization_type(); - if (finalization_type == annotation::FinalizationType::parallel) - { - auto *finalized_worker_counter = - new (std::aligned_alloc(system::cache::line_size(), sizeof(std::atomic_uint16_t))) - std::atomic_uint16_t(node->annotation().finalize_sequence().size()); - for (auto data : node->annotation().finalize_sequence()) - { - data.reset(resource::information{data.worker_id(), synchronization::primitive::ScheduleAll}); - auto *finalize_task = - runtime::new_task>(worker_id, this, node, finalized_worker_counter); - finalize_task->annotate(data); - runtime::spawn(*finalize_task, worker_id); - } - } - else if (finalization_type == annotation::FinalizationType::reduce) - { - /// List of list of resource pairs to reduce. - auto reduce_resource_pairs = FinalizeReduceCalculator::pairs(node->annotation().finalize_sequence()); - auto &pair_lists = std::get<0>(reduce_resource_pairs); - - /// The resource with the final finalization task (that will be a sequential finalization task). - const auto last_resource = std::get<1>(reduce_resource_pairs); - - /// Create the last and final finalization task. - auto *last_finalization_task = runtime::new_task>(worker_id, this, node); - last_finalization_task->annotate(last_resource); - if (pair_lists.empty()) - { - runtime::spawn(*last_finalization_task, worker_id); - return; - } - - /// Reduce tasks, one map (main worker id -> finalization task) per "reduce stage". - auto tasks = std::vector *>>{}; - tasks.reserve(pair_lists.size()); - - /// Create all reduce tasks. - for (auto &pair_list : pair_lists) - { - auto task_map = std::unordered_map *>{}; - task_map.reserve(pair_list.size()); - - for (auto &pair : pair_list) - { - const auto main_resource = std::get<0>(pair); - const auto reduced_resource = std::get<1>(pair); - auto *reduce_task = runtime::new_task>(worker_id, this, node, reduced_resource); - reduce_task->annotate(main_resource); - task_map.insert(std::make_pair(main_resource, reduce_task)); - } - - tasks.template emplace_back(std::move(task_map)); - } - - /// Setup the last reduce step. - if (auto iterator = tasks.back().find(last_resource); iterator != tasks.back().end()) - { - iterator->second->follow_up_task(last_finalization_task); - } - - /// Setup all follow up tasks. - for (auto stage = tasks.size() - 1U; stage > 0U; --stage) - { - for (auto [main_resource, task] : tasks[stage]) - { - /// The task for the main worker will be in the last stage. - if (auto main_resource_task = tasks[stage - 1U].find(main_resource); - main_resource_task != tasks[stage - 1U].end()) - { - main_resource_task->second->follow_up_task(task); - } - - /// The task for the reduced worker may be in any stage before. - const auto reduced_resource = task->reduced_resource(); - for (auto reduced_stage = stage - 1U; reduced_stage >= 0U; --reduced_stage) - { - if (auto reduced_resource_task = tasks[reduced_stage].find(reduced_resource); - reduced_resource_task != tasks[reduced_stage].end()) - { - reduced_resource_task->second->follow_up_task(task); - break; - } - } - } - } - - /// Spawn tasks of the first stage. - for (auto [_, finalization_task] : tasks[0]) - { - runtime::spawn(*finalization_task, worker_id); - } - } - else if (finalization_type == annotation::FinalizationType::none) - { - node->finalize(worker_id, *this, true, nullptr, nullptr); - this->complete(worker_id, node); - } - else - { - auto *finalize_task = runtime::new_task>(worker_id, this, node); - finalize_task->annotate(mx::tasking::annotation::local); - runtime::spawn(*finalize_task, worker_id); - } -} - -template bool Graph::complete(std::uint16_t worker_id, NodeInterface *node) -{ - if constexpr (config::is_record_graph_times()) - { - if (this->_is_record_times) - { - this->_node_finish_times.insert(std::make_pair(node, std::chrono::system_clock::now())); - } - } - - /// Tell the next node, that this node has completed. - Pipeline *next_node_pipeline{nullptr}; - if (node->out() != nullptr) - { - node->out()->in_completed(worker_id, *this, *node); - next_node_pipeline = this->_node_pipelines.at(node->out()); - } - - /// Maybe, the node was the last one in it's pipeline. - /// If so, we may trigger one or multiple pipelines that depended on the nodes pipeline. - auto *node_pipeline = this->_node_pipelines.at(node); - auto pipelines_to_start = std::vector *>{}; - if (node_pipeline != next_node_pipeline || node->annotation().is_finalizes_pipeline()) - { - this->_pipeline_dependencies_lock.lock(); - - /// Remove the nodes pipeline from the dependency list of all other pipelines. - /// If, after removing the pipeline from dependencies, there are pipelines without - /// dependency, we can start that pipelines. - for (auto &[pipeline, dependencies] : this->_pipeline_dependencies) - { - auto dependency_iterator = std::find(dependencies.begin(), dependencies.end(), node_pipeline); - if (dependency_iterator != dependencies.end()) - { - dependencies.erase(dependency_iterator); - } - - if (dependencies.empty()) - { - pipelines_to_start.emplace_back(pipeline); - } - } - - /// Start all pipelines without dependency. - for (auto *pipeline : pipelines_to_start) - { - this->_pipeline_dependencies.erase(pipeline); - this->start(worker_id, pipeline); - } - - this->_pipeline_dependencies_lock.unlock(); - } - - /// If the node was has no successor and we did not start any pipeline, we finished. - if (node->out() == nullptr) - { - if (this->_finished_pipelines.fetch_add(1U) == (this->_pipelines.size() - 1U)) - { - delete this; - return true; - } - } - - return false; -} -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/node.h b/repos/ealanos/src/lib/mx/tasking/dataflow/node.h deleted file mode 100644 index 469a3e4ac9..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/node.h +++ /dev/null @@ -1,134 +0,0 @@ -#pragma once - -#include "annotation.h" -#include "producer.h" -#include "token.h" -#include -#include -#include - -namespace mx::tasking::dataflow { -template class NodeInterface -{ -public: - NodeInterface() = default; - virtual ~NodeInterface() = default; - - /** - * Updates the successor. - * - * @param out New successor. - */ - virtual void out(NodeInterface *out) noexcept { _out = out; } - - /** - * @return The successor of this node. - */ - [[nodiscard]] NodeInterface *out() const noexcept { return _out; } - - /** - * Inserts the given node as a predecessor of this node. - * - * @param incomeing Node to insert in the predecessor list. - */ - virtual void add_in(NodeInterface *incomeing) noexcept { _in.emplace_back(incomeing); } - - /** - * @return A list of predecessors of this node. - */ - [[nodiscard]] const std::vector &in() const noexcept { return _in; } - - /** - * Updates the annotation of this node. - * - * @param annotation New annotation. - */ - void annotate(dataflow::annotation &&annotation) noexcept { _annotation = std::move(annotation); } - - /** - * @return The annotation of the node. - */ - [[nodiscard]] const dataflow::annotation &annotation() const noexcept { return _annotation; } - - /** - * @return The annotation of the node. - */ - [[nodiscard]] dataflow::annotation &annotation() noexcept { return _annotation; } - - /** - * Consumes data and may emit data to the graph. This function is called - * by the graph when a predecessor emits data to the graph. - * - * @param worker_id Worker, where the data is consumed. - * @param emitter Emitter that takes data when the node wants to emit data. - * @param data Data that is consumed. - */ - virtual void consume(std::uint16_t worker_id, EmitterInterface &emitter, Token &&data) = 0; - - /** - * Callback that is called by the graph when one of the - * incoming nodes completes its execution. - * - * @param worker_id Worker, where the incoming node completed. - * @param emitter Emitter that takes data when the node wants to emit data. - * @param in_node Node that completed. - */ - virtual void in_completed(std::uint16_t worker_id, EmitterInterface &emitter, NodeInterface &in_node) = 0; - - /** - * Callback that is called by the graph, when a nodes completes. - * - * @param worker_id Worker, where the node closes. - * @param emitter Emitter that takes data when the node wants to emit data. - * @param is_last True, if this is the last finalization call (may be interesting for parallel finalization). - * @param data Data that is finalized, may be nullptr. - * @param reduced_data Data that is reduced, may be nullptr. - */ - virtual void finalize(const std::uint16_t /*worker_id*/, EmitterInterface & /*emitter*/, const bool /*is_last*/, - const mx::resource::ptr /*data*/, const mx::resource::ptr /*reduced_data*/) - { - } - - [[nodiscard]] virtual std::string to_string() const noexcept = 0; - - [[nodiscard]] virtual std::uint64_t trace_id() const noexcept { return 0U; } - -private: - /// Node where data is emitted to. - NodeInterface *_out{nullptr}; - /// Nodes from where data is consumed. - std::vector *> _in; - - /// Annotation. - dataflow::annotation _annotation; -}; - -template class ProducingNodeInterface : public NodeInterface -{ -public: - ProducingNodeInterface() = default; - ~ProducingNodeInterface() override = default; - - void in_completed(const std::uint16_t /*worker_id*/, EmitterInterface & /*emitter*/, - NodeInterface & /*in_node*/) override - { - } -}; - -template class EmptyNode final : public NodeInterface -{ -public: - EmptyNode() = default; - ~EmptyNode() override = default; - - void consume(const std::uint16_t /*worker_id*/, EmitterInterface & /*emitter*/, Token && /*data*/) override {} - - void in_completed(const std::uint16_t worker_id, EmitterInterface &emitter, - NodeInterface & /*in_node*/) override - { - emitter.finalize(worker_id, this); - } - - [[nodiscard]] std::string to_string() const noexcept override { return "Empty Node"; } -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/pipeline.h b/repos/ealanos/src/lib/mx/tasking/dataflow/pipeline.h deleted file mode 100644 index 56d87fe401..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/pipeline.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include "node.h" -#include -#include - -namespace mx::tasking::dataflow { -template class alignas(64) Pipeline -{ -public: - Pipeline() { _nodes.reserve(1U << 4U); } - - ~Pipeline() - { - std::for_each(_nodes.begin(), _nodes.end(), [](auto node) { delete node; }); - } - - void emplace(NodeInterface *node) { _nodes.template emplace_back(node); } - [[nodiscard]] const std::vector *> &nodes() const noexcept { return _nodes; } - - [[nodiscard]] std::atomic_uint16_t &finalization_barrier_counter() noexcept - { - return _finalization_barrier_counter; - } - -private: - std::vector *> _nodes; - alignas(64) std::atomic_uint16_t _finalization_barrier_counter; -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/producer.h b/repos/ealanos/src/lib/mx/tasking/dataflow/producer.h deleted file mode 100644 index fcb59cfd10..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/producer.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "token.h" -#include - -namespace mx::tasking::dataflow { -template class NodeInterface; -template class EmitterInterface -{ -public: - constexpr EmitterInterface() noexcept = default; - virtual ~EmitterInterface() noexcept = default; - - virtual void emit(std::uint16_t worker_id, NodeInterface *node, Token &&data) = 0; - virtual void finalize(std::uint16_t worker_id, NodeInterface *node) = 0; - virtual void interrupt() = 0; - virtual void for_each_node(std::function *)> &&callback) const = 0; -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/task_node.h b/repos/ealanos/src/lib/mx/tasking/dataflow/task_node.h deleted file mode 100644 index 8848be596c..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/task_node.h +++ /dev/null @@ -1,149 +0,0 @@ -#pragma once - -#include "barrier_task.h" -#include "node.h" -#include "producer.h" -#include "token.h" -#include -#include -#include -#include -#include -#include -#include - -namespace mx::tasking::dataflow { -/** - * Task that consumes and produces data in context of nodes. - */ -template class DataTaskInterface -{ -public: - using value_type = T; - - constexpr DataTaskInterface() noexcept = default; - virtual ~DataTaskInterface() noexcept = default; - - /** - * Consumes the given data. - * New data may be emitted to the given node. - * - * @param worker_id Local worker id where the task is executed. - * @param node Node that executes that task. - * @param emitter Emitter that can emit new data. - * @param data Data that is consumed by that task. - */ - virtual void execute(std::uint16_t worker_id, NodeInterface *node, EmitterInterface &emitter, - Token &&data) = 0; -}; - -enum input_cardinality -{ - single, - multiple -}; - -template class NodeTask; -template class TaskNode : public NodeInterface -{ - friend NodeTask; - -public: - using value_type = typename DataTask::value_type; - - TaskNode() noexcept = default; - - ~TaskNode() noexcept override = default; - - void add_in(NodeInterface *in_node) noexcept override - { - _count_nodes_in.fetch_add(1); - NodeInterface::add_in(in_node); - } - - /** - * Consumes the data by spawning a task of type TASK_TYPE. - * - * @param worker_id Worker where consume is called. - * @param graph Graph where the node is located in. - * @param token Data that is consumed. - */ - void consume(std::uint16_t worker_id, EmitterInterface &graph, Token &&token) override; - - /** - * Called whenever the succeeding node was finalized. - * - * @param worker_id Core where consume is called. - * @param graph Graph where the node is located in. - */ - void in_completed(const std::uint16_t worker_id, EmitterInterface &graph, - NodeInterface & /*in_node*/) override - { - if (_count_nodes_in.fetch_sub(1) == 1) - { - const auto count_workers = mx::tasking::runtime::workers(); - _count_pending_workers = count_workers - 1; - for (auto target_worker_id = std::uint16_t(0U); target_worker_id < count_workers; ++target_worker_id) - { - auto *barrier_task = mx::tasking::runtime::new_task>( - worker_id, _count_pending_workers, graph, this); - barrier_task->annotate(target_worker_id); - mx::tasking::runtime::spawn(*barrier_task, worker_id); - } - } - } - - [[nodiscard]] std::string to_string() const noexcept override - { - return std::string{"Task Skeleton ["} + typeid(DataTask).name() + "]"; - } - -private: - std::atomic_int16_t _count_nodes_in{0U}; - std::atomic_int16_t _count_pending_workers{0U}; -}; - -/** - * The NodeTask executes ("wraps") the DataTask of the given node and executed the node logic. - * @tparam DataTask - */ -template class NodeTask final : public TaskInterface -{ -public: - NodeTask(TaskNode *owning_node, EmitterInterface &graph, - Token &&token) noexcept - : _owning_node(owning_node), _graph(graph), _token_data(std::move(token.data())) - { - } - ~NodeTask() noexcept override = default; - - TaskResult execute(const std::uint16_t worker_id) override - { - DataTask{}.execute(worker_id, _owning_node, _graph, - Token{std::move(_token_data), annotation()}); - - return TaskResult::make_remove(); - } - - [[nodiscard]] std::uint64_t trace_id() const noexcept override { return _owning_node->trace_id(); } - -private: - TaskNode *_owning_node; - EmitterInterface &_graph; - - /// Data that was consumed by the node. - typename DataTask::value_type _token_data; -}; - -template -void TaskNode::consume(const std::uint16_t worker_id, EmitterInterface &graph, - Token &&token) -{ - // _task_counter.add(worker_id, 1); - const auto annotation = token.annotation(); - auto *node_task = runtime::new_task>(worker_id, this, graph, std::move(token)); - node_task->annotate(annotation); - - runtime::spawn(*node_task, worker_id); -} -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/token.h b/repos/ealanos/src/lib/mx/tasking/dataflow/token.h deleted file mode 100644 index d3282cedfb..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/token.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - -#include - -namespace mx::tasking::dataflow { -template class Token -{ -public: - Token() noexcept = default; - explicit Token(T &&data) noexcept : _data(std::move(data)) {} - explicit Token(const T &data) noexcept : _data(data) {} - Token(T &&data, tasking::annotation annotation) noexcept - : _data(std::move(data)), _annotation(std::move(annotation)) - { - } - Token(const T &data, tasking::annotation annotation) noexcept : _data(data), _annotation(std::move(annotation)) {} - Token(Token &&other) noexcept : _data(std::move(other._data)), _annotation(std::move(other._annotation)) {} - ~Token() noexcept = default; - - Token &operator=(Token &&other) noexcept - { - _data = std::move(other._data); - _annotation = other._annotation; - return *this; - } - - [[nodiscard]] const T &data() const noexcept { return _data; } - [[nodiscard]] T &data() noexcept { return _data; } - [[nodiscard]] tasking::annotation annotation() const noexcept { return _annotation; } - [[nodiscard]] tasking::annotation &annotation() noexcept { return _annotation; } - -private: - T _data; - class tasking::annotation _annotation - { - }; -}; - -template static inline Token make_token(T &&data) noexcept -{ - return Token{std::move(data)}; -} - -template static inline Token make_token(const T &data) noexcept -{ - return Token{data}; -} - -template static inline Token make_token(T &&data, tasking::annotation annotation) noexcept -{ - return Token{std::move(data), annotation}; -} - -template static inline Token make_token(const T &data, tasking::annotation annotation) noexcept -{ - return Token{data, annotation}; -} -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/dataflow/token_generator.h b/repos/ealanos/src/lib/mx/tasking/dataflow/token_generator.h deleted file mode 100644 index 3619c17e74..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/dataflow/token_generator.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "token.h" -#include -#include -#include - -namespace mx::tasking::dataflow { -template class TokenGenerator -{ -public: - constexpr TokenGenerator() noexcept = default; - virtual ~TokenGenerator() noexcept = default; - - [[nodiscard]] virtual std::vector> generate(std::uint16_t worker_id) = 0; - [[nodiscard]] virtual std::uint64_t count() = 0; -}; -} // namespace mx::tasking::dataflow \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/load.h b/repos/ealanos/src/lib/mx/tasking/load.h index 53953c4cd6..9b3b86db6a 100644 --- a/repos/ealanos/src/lib/mx/tasking/load.h +++ b/repos/ealanos/src/lib/mx/tasking/load.h @@ -1,5 +1,4 @@ #pragma once -#include "config.h" #include #include @@ -13,14 +12,29 @@ public: constexpr Load() = default; ~Load() = default; - void set(const std::uint16_t count_withdrawed_task) noexcept + Load &operator+=(const bool hit) noexcept { - _load = count_withdrawed_task / float(config::task_buffer_size()); + _hits <<= 1; + _hits.set(0, hit); + return *this; } - [[nodiscard]] float get() const noexcept { return _load; } + Load &operator|=(const Load &other) noexcept + { + _hits |= other._hits; + return *this; + } + + /** + * @return Number of successful requests. + */ + [[nodiscard]] std::size_t count() const noexcept { return _hits.count(); } + + bool operator<(const Load &other) const noexcept { return _hits.count() < other._hits.count(); } + bool operator<(const std::size_t other) const noexcept { return _hits.count() < other; } private: - float _load{0U}; + // Bitvector of the last 64 requests. + std::bitset<64> _hits{0U}; }; } // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h b/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h deleted file mode 100644 index 6e74fdcf87..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h +++ /dev/null @@ -1,296 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace mx::tasking { - -class PrefetchDescriptor -{ -public: - using data_t = std::uint64_t; - - enum ExecuteType : std::uint8_t - { - Size = 0b01, - Callback = 0b10, - Mask = 0b11, - }; - - enum PrefetchType : std::uint8_t - { - Temporal = 0b01, - NonTemporal = 0b10, - Write = 0b11, - }; - - enum Type : std::uint8_t - { - None = 0b0000, - - SizeTemporal = (ExecuteType::Size << 2U) | PrefetchType::Temporal, - SizeNonTemporal = (ExecuteType::Size << 2U) | PrefetchType::NonTemporal, - SizeWrite = (ExecuteType::Size << 2U) | PrefetchType::Write, - - CallbackAny = ExecuteType::Callback << 2U, - - MaskTemporal = (ExecuteType::Mask << 2U) | PrefetchType::Temporal, - MaskNonTemporal = (ExecuteType::Mask << 2U) | PrefetchType::NonTemporal, - MaskWrite = (ExecuteType::Mask << 2U) | PrefetchType::Write, - }; - -private: - static inline constexpr auto BITS = sizeof(data_t) * 8U; - static inline constexpr auto RESERVED_BITS = 4U; - static inline constexpr auto DATA_BITS = BITS - RESERVED_BITS; - static inline constexpr auto CLEAR_TYPE_MASK = std::numeric_limits::max() >> RESERVED_BITS; - -public: - [[nodiscard]] static constexpr auto capacity() { return DATA_BITS; } - [[nodiscard]] static constexpr auto bits() { return BITS; } - - [[nodiscard]] static PrefetchDescriptor make_size(const PrefetchType type, const data_t data) noexcept - { - return PrefetchDescriptor{((data_t(ExecuteType::Size << 2U) | type) << DATA_BITS) | data}; - } - - [[nodiscard]] static PrefetchDescriptor make_mask(const PrefetchType type, const data_t data) noexcept - { - return PrefetchDescriptor{((data_t(ExecuteType::Mask << 2U) | type) << DATA_BITS) | data}; - } - - [[nodiscard]] static PrefetchDescriptor make_callback(const data_t data) noexcept - { - return PrefetchDescriptor{(data_t(ExecuteType::Callback << 2U) << DATA_BITS) | data}; - } - - constexpr PrefetchDescriptor() noexcept = default; - constexpr explicit PrefetchDescriptor(const data_t data) noexcept : _data(data) {} - ~PrefetchDescriptor() noexcept = default; - - /** - * @return The type if the descriptor. - */ - [[nodiscard]] Type id() const noexcept { return static_cast(_data >> DATA_BITS); } - - [[nodiscard]] bool empty() const noexcept { return (_data & CLEAR_TYPE_MASK) == 0U; } - - [[nodiscard]] data_t data() const noexcept { return _data; } - [[nodiscard]] data_t &data() noexcept { return _data; } - [[nodiscard]] data_t data_without_descriptor_bits() const noexcept { return _data & CLEAR_TYPE_MASK; } - - PrefetchDescriptor operator|(const PrefetchDescriptor other) const noexcept - { - return PrefetchDescriptor{_data | other._data}; - } - PrefetchDescriptor &operator|=(const PrefetchDescriptor other) noexcept - { - _data |= other._data; - return *this; - } - bool operator==(const PrefetchDescriptor other) const noexcept { return _data == other._data; } - -private: - data_t _data{0U}; -}; - -class PrefetchSizeView -{ -public: - constexpr PrefetchSizeView(const PrefetchDescriptor::data_t data) noexcept : _data(data) {} - PrefetchSizeView(const PrefetchDescriptor data) noexcept : _data(data.data_without_descriptor_bits()) {} - ~PrefetchSizeView() noexcept = default; - - PrefetchSizeView &operator=(PrefetchSizeView &&) noexcept = default; - PrefetchSizeView &operator=(const PrefetchSizeView &) noexcept = default; - - /** - * @return The size to prefetch. - */ - [[nodiscard]] std::uint64_t get() const noexcept { return _data; } - -private: - PrefetchDescriptor::data_t _data; -}; - -class PrefetchMaskView -{ -public: - constexpr PrefetchMaskView(const PrefetchDescriptor::data_t data) noexcept : _data(data) {} - PrefetchMaskView(const PrefetchDescriptor data) noexcept : _data(data.data_without_descriptor_bits()) {} - ~PrefetchMaskView() noexcept = default; - - PrefetchMaskView &operator=(PrefetchMaskView &&) noexcept = default; - PrefetchMaskView &operator=(const PrefetchMaskView &) noexcept = default; - - /** - * @return Number of cache lines that can be stored within the mask. - */ - [[nodiscard]] static constexpr auto capacity() { return PrefetchDescriptor::capacity(); } - - /** - * @return Number of set bits. - */ - [[nodiscard]] std::uint8_t count() const noexcept { return std::popcount(_data); } - - /** - * @return True, if the data is empty. - */ - [[nodiscard]] bool empty() const noexcept { return _data == 0U; } - - /** - * Tests if a given index is set. - * - * @param index Index to test. - * @return True, if the given index is set. - */ - [[nodiscard]] bool test(const std::uint8_t index) const noexcept - { - return static_cast(_data & (PrefetchDescriptor::data_t{1U} << index)); - } - -private: - PrefetchDescriptor::data_t _data; -}; - -class PrefetchCallbackView -{ -public: - using callback_t = void (*)(void *); - [[nodiscard]] static constexpr auto bits_for_size() { return 8U; } - [[nodiscard]] static constexpr auto bits_for_pointer() { return PrefetchDescriptor::capacity() - bits_for_size(); } - - constexpr PrefetchCallbackView(const PrefetchDescriptor::data_t data) noexcept : _data(data) {} - PrefetchCallbackView(const PrefetchDescriptor data) noexcept : _data(data.data_without_descriptor_bits()) {} - ~PrefetchCallbackView() noexcept = default; - - PrefetchCallbackView &operator=(PrefetchCallbackView &&) noexcept = default; - PrefetchCallbackView &operator=(const PrefetchCallbackView &) noexcept = default; - - /** - * @return The number of cache lines that will be prefetched by the callback. - */ - [[nodiscard]] std::uint8_t size() const noexcept { return _data >> bits_for_pointer(); } - - /** - * @return The callback for prefetching. - */ - [[nodiscard]] callback_t get() const noexcept - { - return reinterpret_cast(_data & PrefetchDescriptor::data_t(std::pow(2, bits_for_pointer()) - 1)); - } - -private: - PrefetchDescriptor::data_t _data; -}; - -class PrefetchSize -{ -public: - [[nodiscard]] static PrefetchDescriptor make(const PrefetchDescriptor::PrefetchType type, - const std::uint64_t size) noexcept - { - return PrefetchDescriptor::make_size(type, size); - } -}; - -class PrefetchMask -{ -public: - constexpr PrefetchMask() noexcept = default; - ~PrefetchMask() noexcept = default; - - void set(const std::uint8_t index) noexcept { _data |= (1U << index); } - - [[nodiscard]] PrefetchDescriptor make(const PrefetchDescriptor::PrefetchType type) const noexcept - { - return PrefetchDescriptor::make_mask(type, _data); - } - - [[nodiscard]] static PrefetchDescriptor make(const PrefetchDescriptor::PrefetchType type, - PrefetchDescriptor::data_t data) noexcept - { - return PrefetchDescriptor::make_mask(type, data); - } - -private: - PrefetchDescriptor::data_t _data{0U}; -}; - -class PrefetchCallback -{ -public: - constexpr PrefetchCallback() noexcept = default; - ~PrefetchCallback() noexcept = default; - - [[nodiscard]] static PrefetchDescriptor make(const std::uint8_t size, const std::uintptr_t callback) noexcept - { - const auto data = - (PrefetchDescriptor::data_t(size) << PrefetchCallbackView::bits_for_pointer()) | - (callback & PrefetchDescriptor::data_t(std::pow(2, PrefetchCallbackView::bits_for_pointer()) - 1)); - return PrefetchDescriptor::make_callback(data); - } -}; - -class PrefetchHint -{ -public: - [[nodiscard]] static PrefetchHint make_size(const PrefetchDescriptor::PrefetchType type, const std::uint64_t size, - const resource::ptr resource) noexcept - { - return PrefetchHint{PrefetchSize::make(type, size), resource}; - } - - [[nodiscard]] static PrefetchHint make_callback(const std::uint8_t size, const std::uintptr_t callback, - const resource::ptr resource) noexcept - { - return PrefetchHint{PrefetchCallback::make(size, callback), resource}; - } - - constexpr PrefetchHint() noexcept = default; - constexpr PrefetchHint(const PrefetchDescriptor descriptor, const resource::ptr resource) noexcept - : _descriptor(descriptor), _resource(resource) - { - } - - constexpr PrefetchHint(const PrefetchHint &) noexcept = default; - constexpr PrefetchHint(PrefetchHint &&) noexcept = default; - - ~PrefetchHint() noexcept = default; - - PrefetchHint &operator=(const PrefetchHint &) = default; - PrefetchHint &operator=(PrefetchHint &&) = default; - - [[nodiscard]] bool empty() const noexcept { return _descriptor.empty(); } - [[nodiscard]] PrefetchDescriptor descriptor() const noexcept { return _descriptor; } - [[nodiscard]] PrefetchMaskView as_mask() const noexcept - { - return PrefetchMaskView{_descriptor.data_without_descriptor_bits()}; - } - - [[nodiscard]] PrefetchSizeView as_size() const noexcept - { - return PrefetchSizeView{_descriptor.data_without_descriptor_bits()}; - } - - [[nodiscard]] resource::ptr resource() const noexcept { return _resource; } - - bool operator==(const PrefetchHint &other) const noexcept - { - return _resource == other._resource && _descriptor == other._descriptor; - } - -private: - PrefetchDescriptor _descriptor; - resource::ptr _resource; -}; -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h b/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h deleted file mode 100644 index 413151d41e..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once -#include -#include - -namespace mx::tasking { -class PrefetchDistance -{ -public: - [[nodiscard]] constexpr static PrefetchDistance make_automatic() noexcept - { - return PrefetchDistance{std::numeric_limits::max()}; - } - - constexpr explicit PrefetchDistance(const std::uint8_t prefetch_distance) noexcept - : _prefetch_distance(prefetch_distance) - { - } - - constexpr PrefetchDistance(const PrefetchDistance &) noexcept = default; - - ~PrefetchDistance() noexcept = default; - - PrefetchDistance &operator=(PrefetchDistance &&) noexcept = default; - - [[nodiscard]] bool is_enabled() const noexcept { return _prefetch_distance > 0U; } - - [[nodiscard]] bool is_automatic() const noexcept - { - return _prefetch_distance == std::numeric_limits::max(); - } - - [[nodiscard]] bool is_fixed() const noexcept { return is_enabled() && is_automatic() == false; } - - [[nodiscard]] std::uint8_t fixed_distance() const noexcept { return _prefetch_distance; } - -private: - std::uint8_t _prefetch_distance; -}; -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/prefetch_slot.cpp b/repos/ealanos/src/lib/mx/tasking/prefetch_slot.cpp deleted file mode 100644 index de19724341..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/prefetch_slot.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "prefetch_slot.h" -#include -#include - -using namespace mx::tasking; - -void PrefetchSlot::assign(const resource::ptr resource, const PrefetchDescriptor descriptor) noexcept -{ - if (this->_item.has_resource() == false) - { - this->_item.resource(resource.get(), descriptor); - } -} - -void PrefetchSlot::prefetch() noexcept -{ - const auto prefetch_type = this->_item.prefetch_descriptor().id(); - const auto prefetch_data = this->_item.prefetch_descriptor().data_without_descriptor_bits(); - auto *resource = this->_item.resource(); - switch (prefetch_type) - { - case PrefetchDescriptor::Type::SizeNonTemporal: { - const auto size = PrefetchSizeView{prefetch_data}.get(); - system::cache::prefetch_range(resource, size); - break; - } - case PrefetchDescriptor::Type::SizeTemporal: { - const auto size = PrefetchSizeView{prefetch_data}.get(); - system::cache::prefetch_range(resource, size); - break; - } - case PrefetchDescriptor::Type::SizeWrite: { - const auto size = PrefetchSizeView{prefetch_data}.get(); - system::cache::prefetch_range(resource, size); - break; - } - case PrefetchDescriptor::Type::CallbackAny: { - auto *callback = PrefetchCallbackView{prefetch_data}.get(); - callback(reinterpret_cast(resource)); - break; - } - case PrefetchDescriptor::Type::None: - return; - case PrefetchDescriptor::Type::MaskTemporal: { - PrefetchSlot::prefetch_mask(resource, prefetch_data); - break; - } - case PrefetchDescriptor::Type::MaskNonTemporal: { - PrefetchSlot::prefetch_mask(resource, prefetch_data); - break; - } - case PrefetchDescriptor::Type::MaskWrite: { - PrefetchSlot::prefetch_mask(resource, prefetch_data); - break; - } - } - - this->_item = PrefetchItem{}; -} diff --git a/repos/ealanos/src/lib/mx/tasking/prefetch_slot.d b/repos/ealanos/src/lib/mx/tasking/prefetch_slot.d deleted file mode 100644 index 9d5a6b7e9d..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/prefetch_slot.d +++ /dev/null @@ -1,197 +0,0 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: diff --git a/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h b/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h index ec2edb4c3c..cff3e8dc0b 100644 --- a/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h +++ b/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h @@ -1,100 +1,9 @@ #pragma once #include "task.h" -#include #include #include namespace mx::tasking { -class PrefetchItem -{ -public: - constexpr PrefetchItem() noexcept = default; - - ~PrefetchItem() noexcept = default; - - PrefetchItem &operator=(PrefetchItem &&) noexcept = default; - - [[nodiscard]] bool has_resource() const noexcept - { - return _resource != nullptr && _prefetch_descriptor.empty() == false; - } - - [[nodiscard]] std::int64_t *resource() const noexcept { return _resource; } - [[nodiscard]] PrefetchDescriptor prefetch_descriptor() const noexcept { return _prefetch_descriptor; } - - void resource(std::int64_t *resource, PrefetchDescriptor descriptor) noexcept - { - _resource = resource; - _prefetch_descriptor = descriptor; - } - -private: - std::int64_t *_resource{nullptr}; - PrefetchDescriptor _prefetch_descriptor{}; -}; - -template class PrefetchMaskExecutor -{ -public: - template static constexpr bool is_prefetch_cl() - { - constexpr auto MASK = 0b1 << N; - return (S & MASK) == MASK; - } - - template - static void execute([[maybe_unused]] const std::int64_t *address, [[maybe_unused]] const std::uint8_t word_offset) - { - if constexpr (is_prefetch_cl<0U>()) - { - const auto *addr = address + (word_offset * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<1U>()) - { - const auto *addr = address + ((word_offset + 1U) * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<2U>()) - { - const auto *addr = address + ((word_offset + 2U) * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<3U>()) - { - const auto *addr = address + ((word_offset + 3U) * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<4U>()) - { - const auto *addr = address + ((word_offset + 4U) * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<5U>()) - { - const auto *addr = address + ((word_offset + 5U) * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<6U>()) - { - const auto *addr = address + ((word_offset + 6U) * 8U); - system::cache::prefetch(addr); - } - - if constexpr (is_prefetch_cl<7U>()) - { - const auto *addr = address + ((word_offset + 7U) * 8U); - system::cache::prefetch(addr); - } - } -}; - /** * A prefetch slot is part of the prefetch buffer used for task * and resource prefetching @@ -107,818 +16,34 @@ public: constexpr PrefetchSlot() noexcept = default; ~PrefetchSlot() = default; - void assign(resource::ptr resource, PrefetchDescriptor descriptor) noexcept; - void prefetch() noexcept; + PrefetchSlot &operator=(TaskInterface *task) noexcept + { + _task = task; + if (task->has_resource_annotated()) + { + _resource = std::make_pair(task->annotated_resource().get(), task->annotated_resource_size()); + } + return *this; + } + + void operator()() noexcept + { + if (_task != nullptr) + { + system::cache::prefetch(_task); + _task = nullptr; + } + + if (std::get<0>(_resource) != nullptr) + { + system::cache::prefetch_range(std::get<0>(_resource), + std::get<1>(_resource)); + std::get<0>(_resource) = nullptr; + } + } private: - PrefetchItem _item; - - template - static void prefetch_mask(const std::int64_t *address, const PrefetchDescriptor::data_t prefetch_mask) noexcept - { - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - PrefetchSlot::prefetch_word_at_offset(address, prefetch_mask); - } - - template - static void prefetch_word_at_offset(const std::int64_t *address, const PrefetchDescriptor::data_t mask) - { - if constexpr (O == 0U) - { - const auto prefetch_word = std::uint8_t(mask & std::numeric_limits::max()); - PrefetchSlot::prefetch_word(address, prefetch_word, 0U); - } - else - { - constexpr auto offset = O * 8U; - const auto prefetch_word = std::uint8_t((mask >> offset) & std::numeric_limits::max()); - if (prefetch_word > 0U) - { - PrefetchSlot::prefetch_word(address, prefetch_word, offset); - } - } - } - - template - static void prefetch_word(const std::int64_t *address, const std::uint8_t word, const std::uint8_t word_offset) - { - switch (word) - { - case 0: - return; - case 1: - PrefetchMaskExecutor<1>::execute(address, word_offset); - return; - case 2: - PrefetchMaskExecutor<2>::execute(address, word_offset); - return; - case 3: - PrefetchMaskExecutor<3>::execute(address, word_offset); - return; - case 4: - PrefetchMaskExecutor<4>::execute(address, word_offset); - return; - case 5: - PrefetchMaskExecutor<5>::execute(address, word_offset); - return; - case 6: - PrefetchMaskExecutor<6>::execute(address, word_offset); - return; - case 7: - PrefetchMaskExecutor<7>::execute(address, word_offset); - return; - case 8: - PrefetchMaskExecutor<8>::execute(address, word_offset); - return; - case 9: - PrefetchMaskExecutor<9>::execute(address, word_offset); - return; - case 10: - PrefetchMaskExecutor<10>::execute(address, word_offset); - return; - case 11: - PrefetchMaskExecutor<11>::execute(address, word_offset); - return; - case 12: - PrefetchMaskExecutor<12>::execute(address, word_offset); - return; - case 13: - PrefetchMaskExecutor<13>::execute(address, word_offset); - return; - case 14: - PrefetchMaskExecutor<14>::execute(address, word_offset); - return; - case 15: - PrefetchMaskExecutor<15>::execute(address, word_offset); - return; - case 16: - PrefetchMaskExecutor<16>::execute(address, word_offset); - return; - case 17: - PrefetchMaskExecutor<17>::execute(address, word_offset); - return; - case 18: - PrefetchMaskExecutor<18>::execute(address, word_offset); - return; - case 19: - PrefetchMaskExecutor<19>::execute(address, word_offset); - return; - case 20: - PrefetchMaskExecutor<20>::execute(address, word_offset); - return; - case 21: - PrefetchMaskExecutor<21>::execute(address, word_offset); - return; - case 22: - PrefetchMaskExecutor<22>::execute(address, word_offset); - return; - case 23: - PrefetchMaskExecutor<23>::execute(address, word_offset); - return; - case 24: - PrefetchMaskExecutor<24>::execute(address, word_offset); - return; - case 25: - PrefetchMaskExecutor<25>::execute(address, word_offset); - return; - case 26: - PrefetchMaskExecutor<26>::execute(address, word_offset); - return; - case 27: - PrefetchMaskExecutor<27>::execute(address, word_offset); - return; - case 28: - PrefetchMaskExecutor<28>::execute(address, word_offset); - return; - case 29: - PrefetchMaskExecutor<29>::execute(address, word_offset); - return; - case 30: - PrefetchMaskExecutor<30>::execute(address, word_offset); - return; - case 31: - PrefetchMaskExecutor<31>::execute(address, word_offset); - return; - case 32: - PrefetchMaskExecutor<32>::execute(address, word_offset); - return; - case 33: - PrefetchMaskExecutor<33>::execute(address, word_offset); - return; - case 34: - PrefetchMaskExecutor<34>::execute(address, word_offset); - return; - case 35: - PrefetchMaskExecutor<35>::execute(address, word_offset); - return; - case 36: - PrefetchMaskExecutor<36>::execute(address, word_offset); - return; - case 37: - PrefetchMaskExecutor<37>::execute(address, word_offset); - return; - case 38: - PrefetchMaskExecutor<38>::execute(address, word_offset); - return; - case 39: - PrefetchMaskExecutor<39>::execute(address, word_offset); - return; - case 40: - PrefetchMaskExecutor<40>::execute(address, word_offset); - return; - case 41: - PrefetchMaskExecutor<41>::execute(address, word_offset); - return; - case 42: - PrefetchMaskExecutor<42>::execute(address, word_offset); - return; - case 43: - PrefetchMaskExecutor<43>::execute(address, word_offset); - return; - case 44: - PrefetchMaskExecutor<44>::execute(address, word_offset); - return; - case 45: - PrefetchMaskExecutor<45>::execute(address, word_offset); - return; - case 46: - PrefetchMaskExecutor<46>::execute(address, word_offset); - return; - case 47: - PrefetchMaskExecutor<47>::execute(address, word_offset); - return; - case 48: - PrefetchMaskExecutor<48>::execute(address, word_offset); - return; - case 49: - PrefetchMaskExecutor<49>::execute(address, word_offset); - return; - case 50: - PrefetchMaskExecutor<50>::execute(address, word_offset); - return; - case 51: - PrefetchMaskExecutor<51>::execute(address, word_offset); - return; - case 52: - PrefetchMaskExecutor<52>::execute(address, word_offset); - return; - case 53: - PrefetchMaskExecutor<53>::execute(address, word_offset); - return; - case 54: - PrefetchMaskExecutor<54>::execute(address, word_offset); - return; - case 55: - PrefetchMaskExecutor<55>::execute(address, word_offset); - return; - case 56: - PrefetchMaskExecutor<56>::execute(address, word_offset); - return; - case 57: - PrefetchMaskExecutor<57>::execute(address, word_offset); - return; - case 58: - PrefetchMaskExecutor<58>::execute(address, word_offset); - return; - case 59: - PrefetchMaskExecutor<59>::execute(address, word_offset); - return; - case 60: - PrefetchMaskExecutor<60>::execute(address, word_offset); - return; - case 61: - PrefetchMaskExecutor<61>::execute(address, word_offset); - return; - case 62: - PrefetchMaskExecutor<62>::execute(address, word_offset); - return; - case 63: - PrefetchMaskExecutor<63>::execute(address, word_offset); - return; - case 64: - PrefetchMaskExecutor<64>::execute(address, word_offset); - return; - case 65: - PrefetchMaskExecutor<65>::execute(address, word_offset); - return; - case 66: - PrefetchMaskExecutor<66>::execute(address, word_offset); - return; - case 67: - PrefetchMaskExecutor<67>::execute(address, word_offset); - return; - case 68: - PrefetchMaskExecutor<68>::execute(address, word_offset); - return; - case 69: - PrefetchMaskExecutor<69>::execute(address, word_offset); - return; - case 70: - PrefetchMaskExecutor<70>::execute(address, word_offset); - return; - case 71: - PrefetchMaskExecutor<71>::execute(address, word_offset); - return; - case 72: - PrefetchMaskExecutor<72>::execute(address, word_offset); - return; - case 73: - PrefetchMaskExecutor<73>::execute(address, word_offset); - return; - case 74: - PrefetchMaskExecutor<74>::execute(address, word_offset); - return; - case 75: - PrefetchMaskExecutor<75>::execute(address, word_offset); - return; - case 76: - PrefetchMaskExecutor<76>::execute(address, word_offset); - return; - case 77: - PrefetchMaskExecutor<77>::execute(address, word_offset); - return; - case 78: - PrefetchMaskExecutor<78>::execute(address, word_offset); - return; - case 79: - PrefetchMaskExecutor<79>::execute(address, word_offset); - return; - case 80: - PrefetchMaskExecutor<80>::execute(address, word_offset); - return; - case 81: - PrefetchMaskExecutor<81>::execute(address, word_offset); - return; - case 82: - PrefetchMaskExecutor<82>::execute(address, word_offset); - return; - case 83: - PrefetchMaskExecutor<83>::execute(address, word_offset); - return; - case 84: - PrefetchMaskExecutor<84>::execute(address, word_offset); - return; - case 85: - PrefetchMaskExecutor<85>::execute(address, word_offset); - return; - case 86: - PrefetchMaskExecutor<86>::execute(address, word_offset); - return; - case 87: - PrefetchMaskExecutor<87>::execute(address, word_offset); - return; - case 88: - PrefetchMaskExecutor<88>::execute(address, word_offset); - return; - case 89: - PrefetchMaskExecutor<89>::execute(address, word_offset); - return; - case 90: - PrefetchMaskExecutor<90>::execute(address, word_offset); - return; - case 91: - PrefetchMaskExecutor<91>::execute(address, word_offset); - return; - case 92: - PrefetchMaskExecutor<92>::execute(address, word_offset); - return; - case 93: - PrefetchMaskExecutor<93>::execute(address, word_offset); - return; - case 94: - PrefetchMaskExecutor<94>::execute(address, word_offset); - return; - case 95: - PrefetchMaskExecutor<95>::execute(address, word_offset); - return; - case 96: - PrefetchMaskExecutor<96>::execute(address, word_offset); - return; - case 97: - PrefetchMaskExecutor<97>::execute(address, word_offset); - return; - case 98: - PrefetchMaskExecutor<98>::execute(address, word_offset); - return; - case 99: - PrefetchMaskExecutor<99>::execute(address, word_offset); - return; - case 100: - PrefetchMaskExecutor<100>::execute(address, word_offset); - return; - case 101: - PrefetchMaskExecutor<101>::execute(address, word_offset); - return; - case 102: - PrefetchMaskExecutor<102>::execute(address, word_offset); - return; - case 103: - PrefetchMaskExecutor<103>::execute(address, word_offset); - return; - case 104: - PrefetchMaskExecutor<104>::execute(address, word_offset); - return; - case 105: - PrefetchMaskExecutor<105>::execute(address, word_offset); - return; - case 106: - PrefetchMaskExecutor<106>::execute(address, word_offset); - return; - case 107: - PrefetchMaskExecutor<107>::execute(address, word_offset); - return; - case 108: - PrefetchMaskExecutor<108>::execute(address, word_offset); - return; - case 109: - PrefetchMaskExecutor<109>::execute(address, word_offset); - return; - case 110: - PrefetchMaskExecutor<110>::execute(address, word_offset); - return; - case 111: - PrefetchMaskExecutor<111>::execute(address, word_offset); - return; - case 112: - PrefetchMaskExecutor<112>::execute(address, word_offset); - return; - case 113: - PrefetchMaskExecutor<113>::execute(address, word_offset); - return; - case 114: - PrefetchMaskExecutor<114>::execute(address, word_offset); - return; - case 115: - PrefetchMaskExecutor<115>::execute(address, word_offset); - return; - case 116: - PrefetchMaskExecutor<116>::execute(address, word_offset); - return; - case 117: - PrefetchMaskExecutor<117>::execute(address, word_offset); - return; - case 118: - PrefetchMaskExecutor<118>::execute(address, word_offset); - return; - case 119: - PrefetchMaskExecutor<119>::execute(address, word_offset); - return; - case 120: - PrefetchMaskExecutor<120>::execute(address, word_offset); - return; - case 121: - PrefetchMaskExecutor<121>::execute(address, word_offset); - return; - case 122: - PrefetchMaskExecutor<122>::execute(address, word_offset); - return; - case 123: - PrefetchMaskExecutor<123>::execute(address, word_offset); - return; - case 124: - PrefetchMaskExecutor<124>::execute(address, word_offset); - return; - case 125: - PrefetchMaskExecutor<125>::execute(address, word_offset); - return; - case 126: - PrefetchMaskExecutor<126>::execute(address, word_offset); - return; - case 127: - PrefetchMaskExecutor<127>::execute(address, word_offset); - return; - case 128: - PrefetchMaskExecutor<128>::execute(address, word_offset); - return; - case 129: - PrefetchMaskExecutor<129>::execute(address, word_offset); - return; - case 130: - PrefetchMaskExecutor<130>::execute(address, word_offset); - return; - case 131: - PrefetchMaskExecutor<131>::execute(address, word_offset); - return; - case 132: - PrefetchMaskExecutor<132>::execute(address, word_offset); - return; - case 133: - PrefetchMaskExecutor<133>::execute(address, word_offset); - return; - case 134: - PrefetchMaskExecutor<134>::execute(address, word_offset); - return; - case 135: - PrefetchMaskExecutor<135>::execute(address, word_offset); - return; - case 136: - PrefetchMaskExecutor<136>::execute(address, word_offset); - return; - case 137: - PrefetchMaskExecutor<137>::execute(address, word_offset); - return; - case 138: - PrefetchMaskExecutor<138>::execute(address, word_offset); - return; - case 139: - PrefetchMaskExecutor<139>::execute(address, word_offset); - return; - case 140: - PrefetchMaskExecutor<140>::execute(address, word_offset); - return; - case 141: - PrefetchMaskExecutor<141>::execute(address, word_offset); - return; - case 142: - PrefetchMaskExecutor<142>::execute(address, word_offset); - return; - case 143: - PrefetchMaskExecutor<143>::execute(address, word_offset); - return; - case 144: - PrefetchMaskExecutor<144>::execute(address, word_offset); - return; - case 145: - PrefetchMaskExecutor<145>::execute(address, word_offset); - return; - case 146: - PrefetchMaskExecutor<146>::execute(address, word_offset); - return; - case 147: - PrefetchMaskExecutor<147>::execute(address, word_offset); - return; - case 148: - PrefetchMaskExecutor<148>::execute(address, word_offset); - return; - case 149: - PrefetchMaskExecutor<149>::execute(address, word_offset); - return; - case 150: - PrefetchMaskExecutor<150>::execute(address, word_offset); - return; - case 151: - PrefetchMaskExecutor<151>::execute(address, word_offset); - return; - case 152: - PrefetchMaskExecutor<152>::execute(address, word_offset); - return; - case 153: - PrefetchMaskExecutor<153>::execute(address, word_offset); - return; - case 154: - PrefetchMaskExecutor<154>::execute(address, word_offset); - return; - case 155: - PrefetchMaskExecutor<155>::execute(address, word_offset); - return; - case 156: - PrefetchMaskExecutor<156>::execute(address, word_offset); - return; - case 157: - PrefetchMaskExecutor<157>::execute(address, word_offset); - return; - case 158: - PrefetchMaskExecutor<158>::execute(address, word_offset); - return; - case 159: - PrefetchMaskExecutor<159>::execute(address, word_offset); - return; - case 160: - PrefetchMaskExecutor<160>::execute(address, word_offset); - return; - case 161: - PrefetchMaskExecutor<161>::execute(address, word_offset); - return; - case 162: - PrefetchMaskExecutor<162>::execute(address, word_offset); - return; - case 163: - PrefetchMaskExecutor<163>::execute(address, word_offset); - return; - case 164: - PrefetchMaskExecutor<164>::execute(address, word_offset); - return; - case 165: - PrefetchMaskExecutor<165>::execute(address, word_offset); - return; - case 166: - PrefetchMaskExecutor<166>::execute(address, word_offset); - return; - case 167: - PrefetchMaskExecutor<167>::execute(address, word_offset); - return; - case 168: - PrefetchMaskExecutor<168>::execute(address, word_offset); - return; - case 169: - PrefetchMaskExecutor<169>::execute(address, word_offset); - return; - case 170: - PrefetchMaskExecutor<170>::execute(address, word_offset); - return; - case 171: - PrefetchMaskExecutor<171>::execute(address, word_offset); - return; - case 172: - PrefetchMaskExecutor<172>::execute(address, word_offset); - return; - case 173: - PrefetchMaskExecutor<173>::execute(address, word_offset); - return; - case 174: - PrefetchMaskExecutor<174>::execute(address, word_offset); - return; - case 175: - PrefetchMaskExecutor<175>::execute(address, word_offset); - return; - case 176: - PrefetchMaskExecutor<176>::execute(address, word_offset); - return; - case 177: - PrefetchMaskExecutor<177>::execute(address, word_offset); - return; - case 178: - PrefetchMaskExecutor<178>::execute(address, word_offset); - return; - case 179: - PrefetchMaskExecutor<179>::execute(address, word_offset); - return; - case 180: - PrefetchMaskExecutor<180>::execute(address, word_offset); - return; - case 181: - PrefetchMaskExecutor<181>::execute(address, word_offset); - return; - case 182: - PrefetchMaskExecutor<182>::execute(address, word_offset); - return; - case 183: - PrefetchMaskExecutor<183>::execute(address, word_offset); - return; - case 184: - PrefetchMaskExecutor<184>::execute(address, word_offset); - return; - case 185: - PrefetchMaskExecutor<185>::execute(address, word_offset); - return; - case 186: - PrefetchMaskExecutor<186>::execute(address, word_offset); - return; - case 187: - PrefetchMaskExecutor<187>::execute(address, word_offset); - return; - case 188: - PrefetchMaskExecutor<188>::execute(address, word_offset); - return; - case 189: - PrefetchMaskExecutor<189>::execute(address, word_offset); - return; - case 190: - PrefetchMaskExecutor<190>::execute(address, word_offset); - return; - case 191: - PrefetchMaskExecutor<191>::execute(address, word_offset); - return; - case 192: - PrefetchMaskExecutor<192>::execute(address, word_offset); - return; - case 193: - PrefetchMaskExecutor<193>::execute(address, word_offset); - return; - case 194: - PrefetchMaskExecutor<194>::execute(address, word_offset); - return; - case 195: - PrefetchMaskExecutor<195>::execute(address, word_offset); - return; - case 196: - PrefetchMaskExecutor<196>::execute(address, word_offset); - return; - case 197: - PrefetchMaskExecutor<197>::execute(address, word_offset); - return; - case 198: - PrefetchMaskExecutor<198>::execute(address, word_offset); - return; - case 199: - PrefetchMaskExecutor<199>::execute(address, word_offset); - return; - case 200: - PrefetchMaskExecutor<200>::execute(address, word_offset); - return; - case 201: - PrefetchMaskExecutor<201>::execute(address, word_offset); - return; - case 202: - PrefetchMaskExecutor<202>::execute(address, word_offset); - return; - case 203: - PrefetchMaskExecutor<203>::execute(address, word_offset); - return; - case 204: - PrefetchMaskExecutor<204>::execute(address, word_offset); - return; - case 205: - PrefetchMaskExecutor<205>::execute(address, word_offset); - return; - case 206: - PrefetchMaskExecutor<206>::execute(address, word_offset); - return; - case 207: - PrefetchMaskExecutor<207>::execute(address, word_offset); - return; - case 208: - PrefetchMaskExecutor<208>::execute(address, word_offset); - return; - case 209: - PrefetchMaskExecutor<209>::execute(address, word_offset); - return; - case 210: - PrefetchMaskExecutor<210>::execute(address, word_offset); - return; - case 211: - PrefetchMaskExecutor<211>::execute(address, word_offset); - return; - case 212: - PrefetchMaskExecutor<212>::execute(address, word_offset); - return; - case 213: - PrefetchMaskExecutor<213>::execute(address, word_offset); - return; - case 214: - PrefetchMaskExecutor<214>::execute(address, word_offset); - return; - case 215: - PrefetchMaskExecutor<215>::execute(address, word_offset); - return; - case 216: - PrefetchMaskExecutor<216>::execute(address, word_offset); - return; - case 217: - PrefetchMaskExecutor<217>::execute(address, word_offset); - return; - case 218: - PrefetchMaskExecutor<218>::execute(address, word_offset); - return; - case 219: - PrefetchMaskExecutor<219>::execute(address, word_offset); - return; - case 220: - PrefetchMaskExecutor<220>::execute(address, word_offset); - return; - case 221: - PrefetchMaskExecutor<221>::execute(address, word_offset); - return; - case 222: - PrefetchMaskExecutor<222>::execute(address, word_offset); - return; - case 223: - PrefetchMaskExecutor<223>::execute(address, word_offset); - return; - case 224: - PrefetchMaskExecutor<224>::execute(address, word_offset); - return; - case 225: - PrefetchMaskExecutor<225>::execute(address, word_offset); - return; - case 226: - PrefetchMaskExecutor<226>::execute(address, word_offset); - return; - case 227: - PrefetchMaskExecutor<227>::execute(address, word_offset); - return; - case 228: - PrefetchMaskExecutor<228>::execute(address, word_offset); - return; - case 229: - PrefetchMaskExecutor<229>::execute(address, word_offset); - return; - case 230: - PrefetchMaskExecutor<230>::execute(address, word_offset); - return; - case 231: - PrefetchMaskExecutor<231>::execute(address, word_offset); - return; - case 232: - PrefetchMaskExecutor<232>::execute(address, word_offset); - return; - case 233: - PrefetchMaskExecutor<233>::execute(address, word_offset); - return; - case 234: - PrefetchMaskExecutor<234>::execute(address, word_offset); - return; - case 235: - PrefetchMaskExecutor<235>::execute(address, word_offset); - return; - case 236: - PrefetchMaskExecutor<236>::execute(address, word_offset); - return; - case 237: - PrefetchMaskExecutor<237>::execute(address, word_offset); - return; - case 238: - PrefetchMaskExecutor<238>::execute(address, word_offset); - return; - case 239: - PrefetchMaskExecutor<239>::execute(address, word_offset); - return; - case 240: - PrefetchMaskExecutor<240>::execute(address, word_offset); - return; - case 241: - PrefetchMaskExecutor<241>::execute(address, word_offset); - return; - case 242: - PrefetchMaskExecutor<242>::execute(address, word_offset); - return; - case 243: - PrefetchMaskExecutor<243>::execute(address, word_offset); - return; - case 244: - PrefetchMaskExecutor<244>::execute(address, word_offset); - return; - case 245: - PrefetchMaskExecutor<245>::execute(address, word_offset); - return; - case 246: - PrefetchMaskExecutor<246>::execute(address, word_offset); - return; - case 247: - PrefetchMaskExecutor<247>::execute(address, word_offset); - return; - case 248: - PrefetchMaskExecutor<248>::execute(address, word_offset); - return; - case 249: - PrefetchMaskExecutor<249>::execute(address, word_offset); - return; - case 250: - PrefetchMaskExecutor<250>::execute(address, word_offset); - return; - case 251: - PrefetchMaskExecutor<251>::execute(address, word_offset); - return; - case 252: - PrefetchMaskExecutor<252>::execute(address, word_offset); - return; - case 253: - PrefetchMaskExecutor<253>::execute(address, word_offset); - return; - case 254: - PrefetchMaskExecutor<254>::execute(address, word_offset); - return; - case 255: - PrefetchMaskExecutor<255>::execute(address, word_offset); - return; - } - } + void *_task = nullptr; + std::pair _resource = std::make_pair(nullptr, 0U); }; - } // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/priority.h b/repos/ealanos/src/lib/mx/tasking/priority.h deleted file mode 100644 index 60a90ecbfd..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/priority.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include - -namespace mx::tasking { -enum priority : std::uint8_t -{ - low = 0U, - normal = 1U -}; -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.cpp b/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.cpp deleted file mode 100644 index be4fd4f6c3..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "idle_profiler.h" -#include -#include - -using namespace mx::tasking::profiling; - -IdleProfileTask::IdleProfileTask(util::maybe_atomic &is_running) : _is_profiler_running(is_running) -{ - _idle_ranges.reserve(1U << 16U); -} - -mx::tasking::TaskResult IdleProfileTask::execute(const std::uint16_t /*worker_id*/) -{ - this->_is_task_running = true; - - auto range = TimeRange{}; - - // while (this->_is_profiler_running && this->_channel.empty()) - // { - // this->_channel.fill(); - // } - - range.stop(); - - if (range.nanoseconds() > 10U) - { - this->_idle_ranges.emplace_back(std::move(range)); - } - - this->_is_task_running = false; - - if (this->_is_profiler_running) - { - return tasking::TaskResult::make_succeed(this); - } - - return tasking::TaskResult::make_null(); -} - -IdleProfiler::~IdleProfiler() -{ - for (auto *task : this->_tasks) - { - delete task; - } -} - -void IdleProfiler::start() noexcept -{ - if (this->_is_running) - { - return; - } - - for (auto *task : this->_tasks) - { - delete task; - } - this->_tasks.clear(); - - this->_start = std::chrono::steady_clock::now(); - this->_is_running = true; -} - -// void IdleProfiler::start() noexcept -//{ -//// auto *task = new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(IdleProfileTask))) -//// IdleProfileTask(this->_is_running); -//// task->annotate(channel.id()); -//// task->annotate(mx::tasking::priority::low); -//// this->_tasks.push_back(task); -//// mx::tasking::runtime::spawn(*task); -//} - -IdleTimes IdleProfiler::stop() noexcept -{ - this->_is_running = false; - const auto end = std::chrono::steady_clock::now(); - const auto start = this->_start; - - auto idle_ranges = std::vector>{}; - idle_ranges.reserve(mx::tasking::runtime::workers()); - - for (auto *task : this->_tasks) - { - if (task == nullptr) - { - continue; - } - - // Wait for the task to finish. - // while(channel_task->is_running()); - - if (task->idle_ranges().empty() == false) - { - // const auto &idle_range = task->idle_ranges(); - // auto normalized_range = std::vector{}; - // std::transform(idle_range.begin(), idle_range.end(), std::back_inserter(normalized_range), - // [start](const auto &time_range) { return time_range.normalize(start); }); - // - // idle_ranges.emplace_back(std::move(normalized_range)); - } - else - { - idle_ranges.emplace_back(std::vector{}); - } - } - - return IdleTimes{std::move(idle_ranges), end - start}; -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.d b/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.d deleted file mode 100644 index cf5fa3be47..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.d +++ /dev/null @@ -1,641 +0,0 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ - /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ - /home/mml/genode-igb/repos/base/include/base/output.h \ - /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ - /home/mml/genode-igb/repos/base/include/util/misc_math.h \ - /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ - /home/mml/genode-igb/repos/base/include/base/thread.h \ - /home/mml/genode-igb/repos/base/include/base/blockade.h \ - /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ - /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ - /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ - /home/mml/genode-igb/repos/base/include/base/thread_state.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ - /home/mml/genode-igb/repos/base/include/base/signal.h \ - /home/mml/genode-igb/repos/base/include/util/list.h \ - /home/mml/genode-igb/repos/base/include/base/semaphore.h \ - /home/mml/genode-igb/repos/base/include/util/fifo.h \ - /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ - /home/mml/genode-igb/repos/base/include/session/session.h \ - /home/mml/genode-igb/repos/base/include/base/session_label.h \ - /home/mml/genode-igb/repos/base/include/util/arg_string.h \ - /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ - /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ - /home/mml/genode-igb/repos/base/include/base/allocator.h \ - /home/mml/genode-igb/repos/base/include/util/register.h \ - /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ - /home/mml/genode-igb/repos/base/include/base/id_space.h \ - /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ - /home/mml/genode-igb/repos/base/include/session/capability.h \ - /home/mml/genode-igb/repos/base/include/root/capability.h \ - /home/mml/genode-igb/repos/base/include/root/root.h \ - /home/mml/genode-igb/repos/base/include/base/entrypoint.h \ - /home/mml/genode-igb/repos/base/include/util/reconstructible.h \ - /home/mml/genode-igb/repos/base/include/util/construct_at.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_server.h \ - /home/mml/genode-igb/repos/base/include/base/ipc.h \ - /home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h \ - /home/mml/genode-igb/repos/base/include/base/object_pool.h \ - /home/mml/genode-igb/repos/base/include/base/weak_ptr.h \ - /home/mml/genode-igb/repos/base/include/base/trace/events.h \ - /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ - /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ - /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ - /home/mml/genode-igb/repos/base/include/dataspace/client.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ - /home/mml/genode-igb/repos/base/include/base/heap.h \ - /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ - /home/mml/genode-igb/repos/base/include/base/tslab.h \ - /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: - -/home/mml/genode-igb/repos/base/include/base/stdint.h: - -/home/mml/genode-igb/repos/base/include/base/log.h: - -/home/mml/genode-igb/repos/base/include/base/output.h: - -/home/mml/genode-igb/repos/base/include/util/interface.h: - -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: - -/home/mml/genode-igb/repos/base/include/util/noncopyable.h: - -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - -/home/mml/genode-igb/repos/base/include/cpu/string.h: - -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - -/home/mml/genode-igb/repos/base/include/base/thread.h: - -/home/mml/genode-igb/repos/base/include/base/blockade.h: - -/home/mml/genode-igb/repos/base/include/base/trace/logger.h: - -/home/mml/genode-igb/repos/base/include/base/trace/buffer.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/capability.h: - -/home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: - -/home/mml/genode-igb/repos/base/include/base/thread_state.h: - -/home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h: - -/home/mml/genode-igb/repos/base/include/base/signal.h: - -/home/mml/genode-igb/repos/base/include/util/list.h: - -/home/mml/genode-igb/repos/base/include/base/semaphore.h: - -/home/mml/genode-igb/repos/base/include/util/fifo.h: - -/home/mml/genode-igb/repos/base/include/dataspace/capability.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: - -/home/mml/genode-igb/repos/base/include/session/session.h: - -/home/mml/genode-igb/repos/base/include/base/session_label.h: - -/home/mml/genode-igb/repos/base/include/util/arg_string.h: - -/home/mml/genode-igb/repos/base/include/pd_session/pd_session.h: - -/home/mml/genode-igb/repos/base/include/region_map/region_map.h: - -/home/mml/genode-igb/repos/base/include/base/allocator.h: - -/home/mml/genode-igb/repos/base/include/util/register.h: - -/home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: - -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - -/home/mml/genode-igb/repos/base/include/base/id_space.h: - -/home/mml/genode-igb/repos/base/include/util/avl_tree.h: - -/home/mml/genode-igb/repos/base/include/session/capability.h: - -/home/mml/genode-igb/repos/base/include/root/capability.h: - -/home/mml/genode-igb/repos/base/include/root/root.h: - -/home/mml/genode-igb/repos/base/include/base/entrypoint.h: - -/home/mml/genode-igb/repos/base/include/util/reconstructible.h: - -/home/mml/genode-igb/repos/base/include/util/construct_at.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_server.h: - -/home/mml/genode-igb/repos/base/include/base/ipc.h: - -/home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h: - -/home/mml/genode-igb/repos/base/include/base/object_pool.h: - -/home/mml/genode-igb/repos/base/include/base/weak_ptr.h: - -/home/mml/genode-igb/repos/base/include/base/trace/events.h: - -/home/mml/genode-igb/repos/base/include/base/trace/policy.h: - -/home/mml/genode-igb/repos/base/include/pd_session/capability.h: - -/home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: - -/home/mml/genode-igb/repos/base/include/dataspace/client.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_client.h: - -/home/mml/genode-igb/repos/base/include/base/heap.h: - -/home/mml/genode-igb/repos/base/include/base/allocator_avl.h: - -/home/mml/genode-igb/repos/base/include/base/tslab.h: - -/home/mml/genode-igb/repos/base/include/base/slab.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: - -/home/mml/genode-igb/repos/libports/include/libc/component.h: diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h b/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h deleted file mode 100644 index 6e92780b69..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once - -#include "time.h" -#include -#include -#include -#include -#include -#include - -namespace mx::tasking::profiling { - -/** - * Task, that is scheduled with low priority and gets CPU time, - * whenever no other task is available. - * Every time the task gets executed, it will record the time range, - * until the channel has new tasks for execution. - */ -class IdleProfileTask final : public TaskInterface -{ -public: - IdleProfileTask(util::maybe_atomic &is_running); - ~IdleProfileTask() override = default; - - TaskResult execute(std::uint16_t worker_id) override; - - [[nodiscard]] std::vector &idle_ranges() noexcept { return _idle_ranges; } - - [[nodiscard]] bool is_running() const noexcept { return _is_task_running; } - -private: - util::maybe_atomic &_is_profiler_running; - util::maybe_atomic _is_task_running{false}; - std::vector _idle_ranges; -}; - -/** - * Schedules the idle/profiling task to every channel and - * writes the memory to a given file. - */ -class IdleProfiler -{ -public: - IdleProfiler() noexcept = default; - ~IdleProfiler(); - - /** - * Enable profiling and set the result file. - * @param profiling_output_file File, where results should be written to. - */ - void start() noexcept; - - /** - * Normalizes all time ranges and writes them to the specified - * file. - */ - IdleTimes stop() noexcept; - - [[nodiscard]] bool is_running() const noexcept { return _is_running; } - -private: - util::maybe_atomic _is_running{false}; - - // Time point of the runtime start. - alignas(64) std::chrono::steady_clock::time_point _start; - - // List of all idle/profile tasks. - std::vector _tasks; -}; - -} // namespace mx::tasking::profiling \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.cpp b/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.cpp new file mode 100644 index 0000000000..b2b10fb88a --- /dev/null +++ b/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.cpp @@ -0,0 +1,107 @@ +#include "profiling_task.h" +#include +#include +#include +#include + +using namespace mx::tasking::profiling; + +ProfilingTask::ProfilingTask(mx::util::maybe_atomic &is_running, mx::tasking::Channel &channel) + : _is_running(is_running), _channel(channel) +{ + _idle_ranges.reserve(1 << 16); +} + +mx::tasking::TaskResult ProfilingTask::execute(const std::uint16_t /*core_id*/, const std::uint16_t /*channel_id*/) +{ + IdleRange range; + + while (this->_is_running && this->_channel.empty()) + { + this->_channel.fill(); + } + + range.stop(); + + if (range.nanoseconds() > 10U) + { + this->_idle_ranges.emplace_back(std::move(range)); + } + + if (this->_is_running) + { + return tasking::TaskResult::make_succeed(this); + } + + return tasking::TaskResult::make_null(); +} + +Profiler::~Profiler() +{ + for (auto *task : this->_tasks) + { + delete task; + } +} + +void Profiler::profile(const std::string &profiling_output_file) +{ + for (auto *task : this->_tasks) + { + delete task; + } + this->_tasks.clear(); + + this->_profiling_output_file.emplace(profiling_output_file); + this->_start = Genode::Trace::timestamp(); + //::chrono::steady_clock::now(); +} + +void Profiler::profile(util::maybe_atomic &is_running, Channel &channel) +{ + auto *task = + new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(ProfilingTask))) ProfilingTask(is_running, channel); + task->annotate(channel.id()); + task->annotate(mx::tasking::priority::low); + this->_tasks.push_back(task); + mx::tasking::runtime::spawn(*task); +} + +void Profiler::stop() +{ + const auto end = Genode::Trace::timestamp(); // std::chrono::steady_clock::now(); + const auto end_relative_nanoseconds = (end - this->_start) / 2000000UL; // std::chrono::duration_cast(end - this->_start).count(); + if (this->_profiling_output_file.has_value()) + { + auto output = nlohmann::json{}; + for (auto *task : this->_tasks) + { + if (task != nullptr && task->idle_ranges().empty() == false) + { + nlohmann::json channel_output; + channel_output["channel"] = task->annotated_channel(); + nlohmann::json ranges{}; + for (const auto &range : task->idle_ranges()) + { + const auto normalized = range.normalize(this->_start); + auto normalized_json = nlohmann::json{}; + normalized_json["s"] = std::get<0>(normalized); + normalized_json["e"] = std::get<1>(normalized); + ranges.push_back(std::move(normalized_json)); + } + + channel_output["ranges"] = std::move(ranges); + output.push_back(std::move(channel_output)); + } + } + + nlohmann::json end_output; + end_output["end"] = end_relative_nanoseconds; + output.push_back(std::move(end_output)); + + std::ofstream out_file{this->_profiling_output_file.value()}; + out_file << output.dump() << std::endl; + } + + this->_profiling_output_file = std::nullopt; +} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.d b/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.d similarity index 81% rename from repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.d rename to repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.d index 2cf8205a41..3df3354670 100644 --- a/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.d +++ b/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.d @@ -1,122 +1,91 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.d: \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.cpp \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/util/meta.h \ + /home/mml/genode-igb/repos/base/include/base/env.h \ + /home/mml/genode-igb/repos/base/include/parent/parent.h \ + /home/mml/genode-igb/repos/base/include/util/attempt.h \ + /home/mml/genode-igb/repos/base/include/base/rpc.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ /home/mml/genode-igb/repos/base/include/base/output.h \ /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/util/misc_math.h \ + /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/base/thread.h \ + /home/mml/genode-igb/repos/base/include/base/exception.h \ /home/mml/genode-igb/repos/base/include/base/blockade.h \ + /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/capability.h \ + /home/mml/genode-igb/repos/base/include/base/native_capability.h \ /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ /home/mml/genode-igb/repos/base/include/base/thread_state.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ /home/mml/genode-igb/repos/base/include/base/signal.h \ /home/mml/genode-igb/repos/base/include/util/list.h \ /home/mml/genode-igb/repos/base/include/base/semaphore.h \ + /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/util/fifo.h \ + /home/mml/genode-igb/repos/base/include/base/affinity.h \ + /home/mml/genode-igb/repos/base/include/util/xml_node.h \ + /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ /home/mml/genode-igb/repos/base/include/session/session.h \ + /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/session_label.h \ /home/mml/genode-igb/repos/base/include/util/arg_string.h \ /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/base/allocator.h \ /home/mml/genode-igb/repos/base/include/util/register.h \ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ /home/mml/genode-igb/repos/base/include/base/id_space.h \ /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ /home/mml/genode-igb/repos/base/include/session/capability.h \ @@ -133,231 +102,191 @@ /home/mml/genode-igb/repos/base/include/base/trace/events.h \ /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ /home/mml/genode-igb/repos/base/include/dataspace/client.h \ /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ + /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ + /home/mml/genode-igb/repos/base/include/util/touch.h \ /home/mml/genode-igb/repos/base/include/base/heap.h \ /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ /home/mml/genode-igb/repos/base/include/base/tslab.h \ /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ + /home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: +/home/mml/genode-igb/repos/libports/include/libc/component.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: +/home/mml/genode-igb/repos/base/include/util/meta.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: +/home/mml/genode-igb/repos/base/include/base/env.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: +/home/mml/genode-igb/repos/base/include/parent/parent.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: +/home/mml/genode-igb/repos/base/include/util/attempt.h: -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: +/home/mml/genode-igb/repos/base/include/base/rpc.h: -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: +/home/mml/genode-igb/repos/base/include/base/rpc_args.h: -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: +/home/mml/genode-igb/repos/base/include/util/string.h: /home/mml/genode-igb/repos/base/include/base/stdint.h: -/home/mml/genode-igb/repos/base/include/base/log.h: +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: /home/mml/genode-igb/repos/base/include/base/output.h: /home/mml/genode-igb/repos/base/include/util/interface.h: -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: +/home/mml/genode-igb/repos/base/include/util/misc_math.h: /home/mml/genode-igb/repos/base/include/util/noncopyable.h: -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - /home/mml/genode-igb/repos/base/include/cpu/string.h: -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - /home/mml/genode-igb/repos/base/include/base/thread.h: +/home/mml/genode-igb/repos/base/include/base/exception.h: + /home/mml/genode-igb/repos/base/include/base/blockade.h: +/home/mml/genode-igb/repos/base/include/base/lock.h: + /home/mml/genode-igb/repos/base/include/base/trace/logger.h: /home/mml/genode-igb/repos/base/include/base/trace/buffer.h: @@ -366,6 +295,10 @@ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/capability.h: + +/home/mml/genode-igb/repos/base/include/base/native_capability.h: + /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: /home/mml/genode-igb/repos/base/include/base/thread_state.h: @@ -378,14 +311,30 @@ /home/mml/genode-igb/repos/base/include/base/semaphore.h: +/home/mml/genode-igb/repos/base/include/base/mutex.h: + /home/mml/genode-igb/repos/base/include/util/fifo.h: +/home/mml/genode-igb/repos/base/include/base/affinity.h: + +/home/mml/genode-igb/repos/base/include/util/xml_node.h: + +/home/mml/genode-igb/repos/base/include/base/log.h: + +/home/mml/genode-igb/repos/base/include/base/buffered_output.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: + +/home/mml/genode-igb/repos/base/include/util/token.h: + /home/mml/genode-igb/repos/base/include/dataspace/capability.h: -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: +/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: /home/mml/genode-igb/repos/base/include/session/session.h: +/home/mml/genode-igb/repos/base/include/base/quota_guard.h: + /home/mml/genode-igb/repos/base/include/base/session_label.h: /home/mml/genode-igb/repos/base/include/util/arg_string.h: @@ -394,20 +343,16 @@ /home/mml/genode-igb/repos/base/include/region_map/region_map.h: +/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: + +/home/mml/genode-igb/repos/base/include/base/cache.h: + /home/mml/genode-igb/repos/base/include/base/allocator.h: /home/mml/genode-igb/repos/base/include/util/register.h: /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - /home/mml/genode-igb/repos/base/include/base/id_space.h: /home/mml/genode-igb/repos/base/include/util/avl_tree.h: @@ -440,12 +385,120 @@ /home/mml/genode-igb/repos/base/include/pd_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: /home/mml/genode-igb/repos/base/include/dataspace/client.h: /home/mml/genode-igb/repos/base/include/base/rpc_client.h: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: + +/home/mml/genode-igb/repos/base/include/rom_session/client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: + +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: + +/home/mml/genode-igb/repos/base/include/base/connection.h: + +/home/mml/genode-igb/repos/base/include/util/retry.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: + +/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: + +/home/mml/genode-igb/repos/base/include/util/touch.h: + /home/mml/genode-igb/repos/base/include/base/heap.h: /home/mml/genode-igb/repos/base/include/base/allocator_avl.h: @@ -454,68 +507,36 @@ /home/mml/genode-igb/repos/base/include/base/slab.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: +/home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h b/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h new file mode 100644 index 0000000000..52cad4dd14 --- /dev/null +++ b/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h @@ -0,0 +1,128 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mx::tasking::profiling { +/** + * Time range (from -- to) for idled time of a single channel. + */ +class IdleRange +{ +public: + IdleRange() : _start(Genode::Trace::timestamp()) {} + IdleRange(IdleRange &&) = default; + ~IdleRange() = default; + + /** + * Sets the end of the idle range to the current time. + */ + void stop() noexcept { _end = Genode::Trace::timestamp(); } + + /** + * @return Number of nanoseconds idled. + */ + [[nodiscard]] std::uint64_t nanoseconds() const noexcept + { + return (_end - _start) / 2000000UL; // TODO: Get TSC frequency from Genode + // return std::chrono::duration_cast(_end - _start).count(); + } + + /** + * Normalizes this range with respect to a given point in time. + * @param global_start Point in time to normalize. + * @return Pair of (start, stop) normalized to the given time point. + */ + [[nodiscard]] std::pair normalize( + const Genode::Trace::Timestamp global_start) const noexcept + { + /*return { + std::chrono::duration_cast(_start - global_start).count(), + std::chrono::duration_cast(_end - global_start).count(), + };*/ + return { + (_start - global_start) / 2000000UL, + (_end - global_start) / 2000000UL, + }; + } + +private: + // Start of idling. + //std::chrono::steady_clock::time_point _start; + Genode::Trace::Timestamp _start; + + // End of idling. + //std::chrono::steady_clock::time_point _end; + Genode::Trace::Timestamp _end; +}; + +/** + * Task, that is scheduled with low priority and gets CPU time, + * whenever no other task is available. + * Every time the task gets executed, it will record the time range, + * until the channel has new tasks for execution. + */ +class ProfilingTask final : public TaskInterface +{ +public: + ProfilingTask(util::maybe_atomic &is_running, Channel &channel); + ~ProfilingTask() override = default; + + TaskResult execute(std::uint16_t core_id, std::uint16_t channel_id) override; + + [[nodiscard]] const std::vector &idle_ranges() const noexcept { return _idle_ranges; } + +private: + util::maybe_atomic &_is_running; + Channel &_channel; + std::vector _idle_ranges; +}; + +/** + * Schedules the idle/profiling task to every channel and + * writes the memory to a given file. + */ +class Profiler +{ +public: + Profiler() noexcept = default; + ~Profiler(); + + /** + * Enable profiling and set the result file. + * @param profiling_output_file File, where results should be written to. + */ + void profile(const std::string &profiling_output_file); + + /** + * Schedules a new idle/profile task to the given channel. + * @param is_running Reference to the schedulers "is_running" flag. + * @param channel Channel to spawn the task to. + */ + void profile(util::maybe_atomic &is_running, Channel &channel); + + /** + * Normalizes all time ranges and writes them to the specified + * file. + */ + void stop(); + +private: + // File to write the output. + std::optional _profiling_output_file{std::nullopt}; + + // Time point of the runtime start. + //std::chrono::steady_clock::time_point _start; + Genode::Trace::Timestamp _start; + + // List of all idle/profile tasks. + std::vector _tasks; +}; + +} // namespace mx::tasking::profiling \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h b/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h new file mode 100644 index 0000000000..b1b79c8f57 --- /dev/null +++ b/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h @@ -0,0 +1,92 @@ +#pragma once +#include +#include +#include +#include +#include + +namespace mx::tasking::profiling { +/** + * Collector for tasking statistics (scheduled tasks, executed tasks, ...). + */ +class Statistic +{ +public: + using counter_line_t = util::aligned_t>; + + enum Counter : std::uint8_t + { + Scheduled, + ScheduledOnChannel, + ScheduledOffChannel, + Executed, + ExecutedReader, + ExecutedWriter, + Fill + }; + + explicit Statistic(const std::uint16_t count_channels) noexcept : _count_channels(count_channels) + { + this->_counter = new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(counter_line_t) * count_channels)) + counter_line_t[count_channels]; + std::memset(static_cast(this->_counter), 0, sizeof(counter_line_t) * count_channels); + } + + Statistic(const Statistic &) = delete; + + ~Statistic() noexcept { memory::GlobalHeap::free(this->_counter); } + + Statistic &operator=(const Statistic &) = delete; + + /** + * Clears all collected statistics. + */ + void clear() noexcept + { + std::memset(static_cast(this->_counter), 0, sizeof(counter_line_t) * this->_count_channels); + } + + /** + * Increment the template-given counter by one for the given channel. + * @param channel_id Channel to increment the statistics for. + */ + template void increment(const std::uint16_t channel_id) noexcept + { + _counter[channel_id].value()[static_cast(C)] += 1; + } + + /** + * Read the given counter for a given channel. + * @param counter Counter to read. + * @param channel_id Channel the counter is for. + * @return Value of the counter. + */ + [[nodiscard]] std::uint64_t get(const Counter counter, const std::uint16_t channel_id) const noexcept + { + return _counter[channel_id].value()[static_cast(counter)]; + } + + /** + * Read and aggregate the counter for all channels. + * @param counter Counter to read. + * @return Value of the counter for all channels. + */ + [[nodiscard]] std::uint64_t get(const Counter counter) const noexcept + { + std::uint64_t sum = 0U; + for (auto i = 0U; i < _count_channels; ++i) + { + sum += get(counter, i); + } + + return sum; + } + +private: + // Number of channels to monitor. + const std::uint16_t _count_channels; + + // Memory for storing the counter. + counter_line_t *_counter = nullptr; +}; +} // namespace mx::tasking::profiling \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h b/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h deleted file mode 100644 index 0eb209969d..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h +++ /dev/null @@ -1,171 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace mx::tasking::profiling { - -class WorkerTaskCounter -{ -public: - WorkerTaskCounter() noexcept = default; - - explicit WorkerTaskCounter(const std::uint16_t count_workers) noexcept { _counter.resize(count_workers, 0U); } - - WorkerTaskCounter(WorkerTaskCounter &&) noexcept = default; - WorkerTaskCounter(const WorkerTaskCounter &) noexcept = default; - - ~WorkerTaskCounter() noexcept = default; - - WorkerTaskCounter &operator=(WorkerTaskCounter &&) noexcept = default; - - std::uint64_t operator[](const std::size_t index) const noexcept { return _counter[index]; } - std::uint64_t &operator[](const std::size_t index) noexcept { return _counter[index]; } - - [[nodiscard]] std::uint64_t sum() const noexcept { return std::accumulate(_counter.begin(), _counter.end(), 0U); } - - [[nodiscard]] std::uint16_t size() const noexcept { return _counter.size(); } - - WorkerTaskCounter operator-(const WorkerTaskCounter &other) const noexcept - { - auto counter = this->_counter; - - for (auto worker_id = 0U; worker_id < counter.size(); ++worker_id) - { - counter[worker_id] -= other[worker_id]; - } - - return WorkerTaskCounter{std::move(counter)}; - } - - WorkerTaskCounter &operator-=(const WorkerTaskCounter &other) noexcept - { - for (auto worker_id = 0U; worker_id < _counter.size(); ++worker_id) - { - _counter[worker_id] -= other[worker_id]; - } - - return *this; - } - -private: - explicit WorkerTaskCounter(std::vector &&counter) noexcept : _counter(std::move(counter)) {} - - std::vector _counter; -}; - -/** - * Collector for tasking statistics (scheduled tasks, executed tasks, ...). - */ -class TaskCounter -{ -public: - using counter_line_t = util::aligned_t>; - - enum Counter : std::uint8_t - { - Dispatched, - DispatchedLocally, - DispatchedRemotely, - Executed, - ExecutedReader, - ExecutedWriter, - FilledBuffer - }; - - explicit TaskCounter(const std::uint16_t count_workers) noexcept : _count_workers(count_workers) - { - _counter = new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(counter_line_t) * count_workers)) - counter_line_t[count_workers]; - clear(); - } - - TaskCounter(const TaskCounter &) = delete; - - TaskCounter(TaskCounter &&other) noexcept - : _count_workers(other._count_workers), _counter(std::exchange(other._counter, nullptr)) - { - } - - ~TaskCounter() noexcept { mx::memory::GlobalHeap::free(this->_counter,0,0); } - - TaskCounter &operator=(const TaskCounter &) = delete; - - /** - * Clears all collected statistics. - */ - void clear() noexcept { std::memset(static_cast(_counter), 0, sizeof(counter_line_t) * _count_workers); } - - /** - * Increment the template-given counter by one for the given channel. - * @param worker_id Worker to increment the statistics for. - */ - template void increment(const std::uint16_t worker_id) noexcept - { - ++_counter[worker_id].value()[static_cast(C)]; - } - - /** - * Read the given counter for a given channel. - * @param counter Counter to read. - * @param worker_id Worker the counter is for. - * @return Value of the counter. - */ - [[nodiscard]] std::uint64_t get(const Counter counter, const std::uint16_t worker_id) const noexcept - { - return _counter[worker_id].value()[static_cast(counter)]; - } - - /** - * Read and aggregate the counter for all channels. - * @param counter Counter to read. - * @return Value of the counter for all channels. - */ - [[nodiscard]] WorkerTaskCounter get(const Counter counter) const noexcept - { - auto worker_counter = WorkerTaskCounter{_count_workers}; - for (auto i = 0U; i < _count_workers; ++i) - { - worker_counter[i] = get(counter, i); - } - - return worker_counter; - } - - /** - * Read counter for all channels. - * - * @return List of channel counter for every counter. - */ - [[nodiscard]] std::unordered_map get() const noexcept - { - auto counter = std::unordered_map{}; - counter.reserve(7U); - - counter.insert(std::make_pair(Counter::Dispatched, get(Counter::Dispatched))); - counter.insert(std::make_pair(Counter::DispatchedLocally, get(Counter::DispatchedLocally))); - counter.insert(std::make_pair(Counter::DispatchedRemotely, get(Counter::DispatchedRemotely))); - counter.insert(std::make_pair(Counter::Executed, get(Counter::Executed))); - counter.insert(std::make_pair(Counter::ExecutedReader, get(Counter::ExecutedReader))); - counter.insert(std::make_pair(Counter::ExecutedWriter, get(Counter::ExecutedWriter))); - counter.insert(std::make_pair(Counter::FilledBuffer, get(Counter::FilledBuffer))); - - return counter; - } - -private: - // Number of channels to monitor. - const std::uint16_t _count_workers; - - // Memory for storing the counter. - counter_line_t *_counter{nullptr}; -}; - -} // namespace mx::tasking::profiling \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.cpp b/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.cpp deleted file mode 100644 index 9d8f04f359..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.cpp +++ /dev/null @@ -1,150 +0,0 @@ -#include "task_tracer.h" - -using namespace mx::tasking::profiling; - -TaskTraces TaskTracer::stop() -{ - _is_enabled = false; - - auto traces = std::vector>>{}; - traces.reserve(this->_worker_task_tracers.size()); - - const auto start = this->_start; - for (auto &channel_tracer : this->_worker_task_tracers) - { - /// Get list of traces from channel tracer. - const auto &channel_traces = channel_tracer.traces(); - - /// Create a single list containing all traces from that channel. - auto &channel_normalized_traces = - traces.emplace_back(std::vector>{}); - channel_normalized_traces.reserve(channel_traces.size() * WorkerTaskTracer::SIZE); - - /// Flatten the list of lists into a normalized list. - for (const auto &trace_list : channel_traces) - { - std::transform(trace_list.begin(), trace_list.end(), std::back_inserter(channel_normalized_traces), - [start](const auto &trace) { - return std::make_pair(std::get<0>(trace), std::get<1>(trace).normalize(start)); - }); - } - - /// Clear the channel tracer. - channel_tracer.clear(); - } - - auto task_traces = TaskTraces{this->_start.time_since_epoch(), this->_task_trace_ids, std::move(traces)}; - this->_task_trace_ids.clear(); - return task_traces; -} - -nlohmann::json TaskTraces::to_json() const -{ - auto task_times = std::unordered_map{}; - - auto traces = nlohmann::json{}; - traces["start"] = this->_start_timestamp.count(); - traces["tasks"] = nlohmann::json{}; - - /// If not found, add the "unknown" tasks for all tasks without trace id. - if (this->_names.find(0U) == this->_names.end()) - { - traces["tasks"].emplace_back(nlohmann::json{{"id", 0U}, {"name", "Unknown"}}); - task_times.insert(std::make_pair(0U, 0U)); - } - - /// Add the registered tasks. - for (const auto &[task_id, name] : this->_names) - { - traces["tasks"].emplace_back(nlohmann::json{{"id", task_id}, {"name", name}}); - task_times.insert(std::make_pair(task_id, 0U)); - } - - /// Calculate traces per channel. - traces["traces"] = nlohmann::json{}; - for (const auto &worker : this->_traces) - { - auto channel_traces = nlohmann::json{}; - for (const auto &trace : worker) - { - const auto task_id = std::get<0>(trace); - const auto start = std::get<1>(trace).start().count(); - const auto end = std::get<1>(trace).end().count(); - - auto task = nlohmann::json{}; - task["tid"] = task_id; - task["s"] = start; - task["e"] = end; - channel_traces.emplace_back(std::move(task)); - - auto task_times_iterator = task_times.find(task_id); - if (task_times_iterator != task_times.end()) [[likely]] - { - task_times_iterator->second += end - start; - } - else - { - task_times.insert(std::make_pair(task_id, end - start)); - } - } - traces["traces"].emplace_back(std::move(channel_traces)); - } - - /// Aggregate sums for every task type. - const auto count_worker = this->_traces.size(); - for (auto &task : traces["tasks"]) - { - if (task.contains("id")) - { - const auto task_id = task["id"].get(); - auto task_iterator = task_times.find(task_id); - if (task_iterator != task_times.end()) - { - const auto time_ms = double(task_iterator->second) / 1000000.0; - task["ms"] = time_ms; - task["ms_per_worker"] = time_ms / count_worker; - } - else - { - task["ms"] = double(0); - task["ms_per_worker"] = double(0); - } - } - } - - /// Calculate idle times. - auto min_ns = std::numeric_limits::max(); - auto max_ns = std::numeric_limits::min(); - for (const auto &channel : this->_traces) - { - if (channel.empty() == false) - { - min_ns = std::min(min_ns, channel.front().second.start().count()); - max_ns = std::max(max_ns, channel.back().second.end().count()); - } - } - - const auto runtime_ns = (max_ns - min_ns) * count_worker; - const auto runtime_ms = runtime_ns / 1000000.0; - const auto task_time_ns = std::accumulate(task_times.begin(), task_times.end(), double(0), - [](const auto sum, const auto &time) { return sum + time.second; }); - const auto idle_ms = double(runtime_ns - task_time_ns) / 1000000.0; - traces["ms_idle"] = idle_ms; - traces["ms_idle_per_worker"] = idle_ms / count_worker; - - /// Calculate task percent. - traces["percent_idle"] = 100.0 / runtime_ms * (idle_ms / count_worker); - for (auto &task : traces["tasks"]) - { - if (task.contains("ms_per_worker")) - { - task["percent"] = 100.0 / runtime_ms * task["ms_per_worker"].get(); - } - else - { - task["percent"] = double(0); - } - } - - return traces; -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.d b/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.d deleted file mode 100644 index 2f19b16193..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.d +++ /dev/null @@ -1,161 +0,0 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h b/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h deleted file mode 100644 index 70974a0d74..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h +++ /dev/null @@ -1,141 +0,0 @@ -#pragma once - -#include "time.h" -#include -#include -#include -#include -#include -#include -#include - -namespace mx::tasking::profiling { -class alignas(system::cache::line_size()) WorkerTaskTracer -{ -public: - constexpr static auto inline SIZE = 1U << 16U; - - WorkerTaskTracer() = default; - WorkerTaskTracer(WorkerTaskTracer &&) noexcept = default; - WorkerTaskTracer(const WorkerTaskTracer &) = delete; - - WorkerTaskTracer &operator=(WorkerTaskTracer &&) noexcept = default; - WorkerTaskTracer &operator=(const WorkerTaskTracer &) = delete; - - ~WorkerTaskTracer() = default; - - void emplace_back(const std::uint64_t task_id, TimeRange &&time_range) - { - _traces.back().emplace_back(std::make_pair(task_id, std::move(time_range))); - - if (_traces.back().size() >= _traces.back().capacity() - 1U) [[unlikely]] - { - _traces.emplace_back(std::vector>{}); - _traces.back().reserve(SIZE); - } - } - - [[nodiscard]] const std::vector>> &traces() const noexcept - { - return _traces; - } - - void clear() - { - _traces.clear(); - _traces.reserve(1U << 5U); - _traces.emplace_back(std::vector>{}); - _traces.back().reserve(SIZE); - } - -private: - std::vector>> _traces; -}; - -class TaskTraces -{ -public: - TaskTraces(const std::chrono::nanoseconds start_timestamp, - const std::unordered_map &names, - std::vector>> &&traces) noexcept - : _start_timestamp(start_timestamp), _names(names), _traces(std::move(traces)) - { - } - - TaskTraces() = default; - - TaskTraces(TaskTraces &&) noexcept = default; - - ~TaskTraces() = default; - - [[nodiscard]] const std::unordered_map &names() const noexcept { return _names; } - [[nodiscard]] const std::vector>> &traces() const noexcept - { - return _traces; - } - - [[nodiscard]] nlohmann::json to_json() const; - -private: - std::chrono::nanoseconds _start_timestamp; - std::unordered_map _names; - std::vector>> _traces; -}; - -class TaskTracer -{ -public: - TaskTracer(const std::uint16_t count_workers) - { - _worker_task_tracers.resize(count_workers); - _task_trace_ids.reserve(1024U); - } - - TaskTracer(TaskTracer &&) noexcept = default; - - ~TaskTracer() = default; - - void register_task(const std::uint64_t task_id, std::string &&name) - { - _task_trace_ids.insert_or_assign(task_id, std::move(name)); - } - - [[nodiscard]] std::optional get(const std::uint64_t task_id) const noexcept - { - if (auto iterator = _task_trace_ids.find(task_id); iterator != _task_trace_ids.end()) - { - return iterator->second; - } - - return std::nullopt; - } - - void emplace_back(const std::uint16_t worker_id, const std::uint64_t task_id, TimeRange &&time_range) - { - if (_is_enabled) - { - _worker_task_tracers[worker_id].emplace_back(task_id, std::move(time_range)); - } - } - - void start() - { - _start = std::chrono::system_clock::now(); - - for (auto &worker_tracer : _worker_task_tracers) - { - worker_tracer.clear(); - } - - _is_enabled = true; - } - - [[nodiscard]] TaskTraces stop(); - -private: - bool _is_enabled{false}; - std::chrono::system_clock::time_point _start; - std::vector _worker_task_tracers; - std::unordered_map _task_trace_ids; -}; -} // namespace mx::tasking::profiling \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/time.cpp b/repos/ealanos/src/lib/mx/tasking/profiling/time.cpp deleted file mode 100644 index 5369c5bbf0..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/time.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "time.h" - -using namespace mx::tasking::profiling; - -WorkerIdleFrames IdleTimes::group(const std::chrono::nanoseconds frame_size) const noexcept -{ - const auto count_frames = std::size_t(_duration / frame_size) + 1U; - - auto idle_frames = std::vector>{}; - idle_frames.reserve(this->channels()); - - for (auto worker_id = 0U; worker_id < this->channels(); ++worker_id) - { - auto frames = std::vector{count_frames, std::chrono::nanoseconds{0U}}; - - for (const auto &time_range : this->_idle_ranges[worker_id]) - { - const auto start_frame_id = time_range.start() / frame_size; - const auto end_frame_id = time_range.end() / frame_size; - if (start_frame_id == end_frame_id) - { - frames[start_frame_id] += time_range.duration(); - } - else - { - /// Append to start. - const auto start_frame_end = (start_frame_id + 1U) * frame_size; - frames[start_frame_id] += start_frame_end - time_range.start(); - - /// Append to end. - const auto end_frame_start = end_frame_id * frame_size; - frames[end_frame_id] += (time_range.end() - end_frame_start) + std::chrono::nanoseconds(1U); - - /// Fill frames between. - for (auto frame_id = start_frame_id + 1U; frame_id <= end_frame_id - 1U; ++frame_id) - { - frames[frame_id] += frame_size; - } - } - } - - idle_frames.emplace_back(std::move(frames)); - } - - return WorkerIdleFrames{std::move(idle_frames), this->_duration, frame_size}; -} - -nlohmann::json WorkerIdleFrames::to_json() const noexcept -{ - nlohmann::json idle_times; - idle_times["duration"] = this->_duration.count(); - idle_times["frame-size"] = this->_frame_size.count(); - idle_times["count-channels"] = this->channels(); - idle_times["count-frames"] = this->_idle_frames.front().size(); - - nlohmann::json channels; - for (const auto &channel_frames : this->_idle_frames) - { - nlohmann::json channel; - for (const auto frame : channel_frames) - { - channel.emplace_back(frame.count()); - } - channels.emplace_back(std::move(channel)); - } - idle_times["channels"] = std::move(channels); - - return idle_times; -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/time.d b/repos/ealanos/src/lib/mx/tasking/profiling/time.d deleted file mode 100644 index b7646b5837..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/time.d +++ /dev/null @@ -1,110 +0,0 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: diff --git a/repos/ealanos/src/lib/mx/tasking/profiling/time.h b/repos/ealanos/src/lib/mx/tasking/profiling/time.h deleted file mode 100644 index eb0c24d401..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/profiling/time.h +++ /dev/null @@ -1,131 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace mx::tasking::profiling { -class NormalizedTimeRange -{ -public: - constexpr NormalizedTimeRange(const std::chrono::nanoseconds start, const std::chrono::nanoseconds end) noexcept - : _start(start), _end(end) - { - } - - NormalizedTimeRange(NormalizedTimeRange &&) noexcept = default; - - ~NormalizedTimeRange() noexcept = default; - - [[nodiscard]] std::chrono::nanoseconds start() const noexcept { return _start; } - [[nodiscard]] std::chrono::nanoseconds end() const noexcept { return _end; } - [[nodiscard]] std::chrono::nanoseconds duration() const noexcept { return _end - _start; } - -private: - std::chrono::nanoseconds _start; - std::chrono::nanoseconds _end; -}; - -/** - * Time range (from -- to) for idled time of a single channel. - */ -class TimeRange -{ -public: - TimeRange() noexcept : _start(std::chrono::system_clock::now()) {} - constexpr explicit TimeRange(const std::chrono::system_clock::time_point start) noexcept : _start(start) {} - constexpr TimeRange(const std::chrono::system_clock::time_point start, - const std::chrono::system_clock::time_point end) noexcept - : _start(start), _end(end) - { - } - constexpr TimeRange(TimeRange &&) noexcept = default; - ~TimeRange() = default; - - /** - * Sets the end of the idle range to the current time. - */ - void stop() noexcept { _end = std::chrono::system_clock::now(); } - - /** - * @return Number of nanoseconds idled. - */ - [[nodiscard]] std::uint64_t nanoseconds() const noexcept - { - return std::chrono::duration_cast(_end - _start).count(); - } - - /** - * Normalizes this range with respect to a given point in time. - * @param global_start Point in time to normalize. - * @return Pair of (start, stop) normalized to the given time point. - */ - [[nodiscard]] NormalizedTimeRange normalize(const std::chrono::system_clock::time_point global_start) const noexcept - { - return NormalizedTimeRange{std::max(_start, global_start) - global_start, _end - global_start}; - } - -private: - // Start of idling. - std::chrono::system_clock::time_point _start; - - // End of idling. - std::chrono::system_clock::time_point _end; -}; - -class WorkerIdleFrames -{ -public: - WorkerIdleFrames(std::vector> &&idle_frames, - const std::chrono::nanoseconds duration, const std::chrono::nanoseconds frame_size) noexcept - : _duration(duration), _frame_size(frame_size), _idle_frames(std::move(idle_frames)) - { - } - - WorkerIdleFrames(WorkerIdleFrames &&) noexcept = default; - - ~WorkerIdleFrames() noexcept = default; - - [[nodiscard]] std::chrono::nanoseconds duration() const noexcept { return _duration; } - [[nodiscard]] std::chrono::nanoseconds frame_size() const noexcept { return _frame_size; } - [[nodiscard]] std::uint16_t channels() const noexcept { return _idle_frames.size(); } - [[nodiscard]] const std::vector> &idle_frames() const noexcept - { - return _idle_frames; - } - [[nodiscard]] nlohmann::json to_json() const noexcept; - -private: - const std::chrono::nanoseconds _duration; - const std::chrono::nanoseconds _frame_size; - std::vector> _idle_frames; -}; - -class IdleTimes -{ -public: - IdleTimes(std::vector> &&idle_ranges, - const std::chrono::nanoseconds duration) noexcept - : _duration(duration), _idle_ranges(std::move(idle_ranges)) - { - } - - IdleTimes(IdleTimes &&) noexcept = default; - - ~IdleTimes() noexcept = default; - - [[nodiscard]] std::chrono::nanoseconds duration() const noexcept { return _duration; } - [[nodiscard]] std::uint16_t channels() const noexcept { return _idle_ranges.size(); } - [[nodiscard]] const std::vector> &idle_ranges() const noexcept - { - return _idle_ranges; - } - - [[nodiscard]] WorkerIdleFrames group(std::chrono::nanoseconds frame_size) const noexcept; - -private: - const std::chrono::nanoseconds _duration; - std::vector> _idle_ranges; -}; -} // namespace mx::tasking::profiling \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/runtime.h b/repos/ealanos/src/lib/mx/tasking/runtime.h index 3b631f7e02..01974c65d3 100644 --- a/repos/ealanos/src/lib/mx/tasking/runtime.h +++ b/repos/ealanos/src/lib/mx/tasking/runtime.h @@ -1,24 +1,19 @@ #pragma once -#include "ealanos/memory/hamstraaja.h" -#include "prefetch_distance.h" +#include "mx/memory/global_heap.h" +#include "mx/system/environment.h" #include "scheduler.h" #include "task.h" -#include "task_squad.h" #include #include -#include +#include #include #include -#include -#include +#include #include -#include -#include #include -#include #include +#include #include - namespace mx::tasking { /** * The runtime is the central access structure to MxTasking. @@ -30,82 +25,64 @@ class runtime public: /** * Initializes the MxTasking runtime. - * * @param core_set Cores, where the runtime should execute on. * @param prefetch_distance Distance for prefetching. * @param channels_per_core Number of channels per core (more than one enables channel-stealing). * @param use_system_allocator Should we use the systems malloc interface or our allocator? * @return True, when the runtime was started successfully. */ - static bool init(const util::core_set &core_set, const PrefetchDistance prefetch_distance, - const bool use_system_allocator, Libc::Env& env) + static bool init(Libc::Env &env, const util::core_set &core_set, const std::uint16_t prefetch_distance, + const bool use_system_allocator) { - util::Logger::info_if(system::Environment::is_debug(), "Starting MxTasking in DEBUG mode."); - util::Logger::warn_if(system::Environment::is_debug() == false && config::is_use_task_counter(), - "Task statistics will be collected in RELEASE build."); - util::Logger::warn_if(system::Environment::is_debug() == false && config::is_collect_task_traces(), - "Task traces will be collected in RELEASE build."); - util::Logger::warn_if(system::Environment::is_debug() == false && - config::worker_mode() == config::worker_mode::PowerSave, - "Power safe mode activated in RELEASE build."); - if (!memory::GlobalHeap::initialized()) { - memory::GlobalHeap::init(new Ealan::Memory::Hamstraaja(env.pd(), env.rm())); + if (mx::memory::GlobalHeap::_alloc == nullptr) { + mx::memory::GlobalHeap::_alloc = new mx::memory::Alloc(env.pd(), env.rm()); + mx::system::Environment::set_env(&env); + mx::system::Environment::get_platform_info(); } - - // Are we ready to re-initialize the scheduler? + // Are we ready to re-initialize the scheduler? if (_scheduler != nullptr && _scheduler->is_running()) { return false; } - /// The starting thread operates as worker#0. - _worker_id = 0U; - // Create a new resource allocator. if (_resource_allocator == nullptr) { - /// Only called the first time. - _resource_allocator.reset(new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof( - memory::dynamic::local::Allocator))) memory::dynamic::local::Allocator(core_set)); - util::Logger::info_if(system::Environment::is_debug(), "Created resource allocator"); + Genode::log("Creating resource allocator"); + _resource_allocator.reset(new (memory::GlobalHeap::allocate_cache_line_aligned( + sizeof(memory::dynamic::Allocator))) memory::dynamic::Allocator()); } else if (_resource_allocator->is_free()) { - /// The application cleared the whole memory, but - /// we won't re-allocate the allocator to keep references - /// that are given to the resource builder and epoch manager - /// since the scheduler does not change. - _resource_allocator->reset(core_set, true); + _resource_allocator->release_allocated_memory(); + _resource_allocator->initialize_empty(); } else { - /// The application holds allocated memory. - _resource_allocator->reset(core_set, false); + _resource_allocator->defragment(); } // Create a new task allocator. if (use_system_allocator) { - _task_allocator.reset(new (memory::GlobalHeap::allocate_cache_line_aligned( - sizeof(memory::SystemTaskAllocator))) - memory::SystemTaskAllocator()); - util::Logger::info_if(system::Environment::is_debug(), "Created task allocator"); + _task_allocator.reset(new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof( + memory::SystemTaskAllocator))) memory::SystemTaskAllocator()); } else { + Genode::log("Creating task allocator"); _task_allocator.reset(new ( memory::GlobalHeap::allocate_cache_line_aligned(sizeof(memory::fixed::Allocator))) - memory::fixed::Allocator(util::core_set::build())); + memory::fixed::Allocator()); } // Create a new scheduler. const auto need_new_scheduler = _scheduler == nullptr || *_scheduler != core_set; if (need_new_scheduler) { - _scheduler.reset(new (memory::GlobalHeap::allocate_cache_line_aligned( - sizeof(Scheduler))) Scheduler(core_set, prefetch_distance, *_resource_allocator)); - util::Logger::info_if(system::Environment::is_debug(), "Created new task scheduler and worker thread pool"); + _scheduler.reset(new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(Scheduler))) + Scheduler(core_set, prefetch_distance, *_resource_allocator)); } else { @@ -115,76 +92,38 @@ public: // Create a new resource builder. if (_resource_builder == nullptr || need_new_scheduler) { - _resource_builder = std::make_unique(*_scheduler, *_resource_allocator); + _resource_builder = std::make_unique(*_scheduler, *_resource_allocator); } - util::Logger::info_if(system::Environment::is_debug(), "Started MxTasking in DEBUG mode."); return true; } /** - * Spawns the given task. - * - * @param task Task to be scheduled. - * @param local_worker_id Worker, the spawn request came from. + * Start profiling of idle times. Results will be written to the given file. + * @param output_file File for idle-time results. */ - static std::uint16_t spawn(TaskInterface &task, const std::uint16_t local_worker_id) noexcept + static void profile(const std::string &output_file) noexcept { _scheduler->profile(output_file); } + + /** + * Spawns the given task. + * @param task Task to be scheduled. + * @param current_channel_id Channel, the spawn request came from. + */ + static void spawn(TaskInterface &task, const std::uint16_t current_channel_id) noexcept { - return _scheduler->dispatch(task, local_worker_id); + _scheduler->schedule(task, current_channel_id); } /** * Spawns the given task. - * * @param task Task to be scheduled. */ - static void spawn(TaskInterface &task) noexcept { _scheduler->dispatch(task, _worker_id); } + static void spawn(TaskInterface &task) noexcept { _scheduler->schedule(task); } /** - * Spawns a list of concatenated tasks. - * - * @param first_task First task of the list to be scheduled. - * @param last_task Last task of the list to be scheduled. - * @param local_worker_id Worker, the spawn request came from. + * @return Number of available channels. */ - static void spawn(TaskInterface &first_task, TaskInterface &last_task, const std::uint16_t local_worker_id) noexcept - { - _scheduler->dispatch(first_task, last_task, local_worker_id); - } - - /** - * Spawns the given squad. - * - * @param squad Squad to be scheduled. - * @param local_worker_id Worker, the spawn request came from. - */ - static std::uint16_t spawn(const mx::resource::ptr squad, const std::uint16_t local_worker_id) noexcept - { - return spawn(squad, Annotation::resource_boundness::mixed, local_worker_id); - } - - /** - * Spawns the given squad. - * - * @param squad Squad to be scheduled. - * @param boundness Boundness of the squad. - * @param local_worker_id Worker, the spawn request came from. - */ - static std::uint16_t spawn(const mx::resource::ptr squad, const enum Annotation::resource_boundness boundness, - const std::uint16_t local_worker_id) noexcept - { - return _scheduler->dispatch(squad, boundness, local_worker_id); - } - - /** - * @return Number of available cores. - */ - [[nodiscard]] static std::uint16_t workers() noexcept { return _scheduler->count_cores(); } - - /** - * @return Prefetch distance. - */ - static PrefetchDistance prefetch_distance() noexcept { return _scheduler->prefetch_distance(); } + static std::uint16_t channels() noexcept { return _scheduler->count_channels(); } /** * Starts the runtime and suspends the starting thread until MxTasking is stopped. @@ -195,214 +134,97 @@ public: * Instructs all worker threads to stop their work. * After all worker threads are stopped, the starting * thread will be resumed. - * - * @param stop_network If set to true, the network server will also be stopped. */ - static void stop(const bool stop_network = true) noexcept - { - _scheduler->interrupt(); - if (_network_server != nullptr && stop_network) - { - _network_server->stop(); - _network_server_thread->join(); - } - } + static void stop() noexcept { _scheduler->interrupt(); } - /** + static void resume() noexcept { _scheduler->resume(); } + + + static void reset_usage_predictions() { _scheduler->reset_usage_predictions(); } + /** * Creates a new task. - * - * @param worker_id Worker to allocate memory from. + * @param core_id Core to allocate memory from. * @param arguments Arguments for the task. * @return The new task. */ - template static T *new_task(const std::uint16_t worker_id, Args &&...arguments) + template static T *new_task(const std::uint16_t core_id, Args &&... arguments) { - static_assert(sizeof(T) <= config::task_size() && "Task must be <= defined task size."); - return new (_task_allocator->allocate(worker_id)) T(std::forward(arguments)...); + static_assert(sizeof(T) <= config::task_size() && "Task must be leq defined task size."); + return new (_task_allocator->allocate(core_id)) T(std::forward(arguments)...); } /** * Frees a given task. - * - * @param worker_id Worker id to return the memory to. + * @param core_id Core id to return the memory to. * @param task Task to be freed. */ - template static void delete_task(const std::uint16_t worker_id, T *task) noexcept + template static void delete_task(const std::uint16_t core_id, T *task) noexcept { task->~T(); - _task_allocator->free(worker_id, static_cast(task)); + _task_allocator->free(core_id, static_cast(task)); } /** * Creates a resource. - * * @param size Size of the data object. - * @param annotation Annotation for allocation and scheduling. + * @param hint Hints for allocation and scheduling. * @param arguments Arguments for the data object. * @return The resource pointer. */ template - static mx::resource::ptr new_resource(const std::size_t size, mx::resource::annotation &&annotation, - Args &&...arguments) noexcept + static resource::ptr new_resource(const std::size_t size, resource::hint &&hint, Args &&... arguments) noexcept { - return _resource_builder->build(_worker_id, size, std::move(annotation), std::forward(arguments)...); + return _resource_builder->build(size, std::move(hint), std::forward(arguments)...); } /** * Creates a resource from a given pointer. - * * @param object Pointer to the existing object. - * @param annotation Annotation for allocation and scheduling. + * @param hint Hints for allocation and scheduling. * @return The resource pointer. */ - template - static mx::resource::ptr to_resource(T *object, mx::resource::annotation &&annotation) noexcept + template static resource::ptr to_resource(T *object, resource::hint &&hint) noexcept { - return _resource_builder->build(object, annotation); + return _resource_builder->build(object, std::move(hint)); } /** * Deletes the given data object. - * * @param resource Data object to be deleted. */ - template static void delete_resource(const mx::resource::ptr resource) noexcept + template static void delete_resource(const resource::ptr resource) noexcept { - _resource_builder->destroy(_worker_id, resource); + _resource_builder->destroy(resource); } - /** - * Creates a new task squad. - * - * @param size Size of the task squad object. - * @param worker_id Worker to map the squad to. - * @param arguments Arguments for the task squad object. - * @return A resource pointer to the squad. - */ - template - static mx::resource::ptr new_squad(const std::size_t size, const std::uint16_t worker_id, - Args &&...arguments) noexcept - { - static_assert(std::is_base_of::value && "Squads needs to extend mx::tasking::TaskSquad"); - - auto annotation = resource::annotation{worker_id, synchronization::isolation_level::Exclusive, - synchronization::protocol::Batched}; - return _resource_builder->build(_worker_id, size, std::move(annotation), std::forward(arguments)...); - } - - /** - * Flushes the given task squad. - */ - static void flush_squad(resource::ptr task_squad) noexcept { task_squad.get()->flush(); } - - /** - * Creates a simple task squad. - * - * @param worker_id Worker to map the squad to. - * @return A resource pointer to the squad. - */ - static mx::resource::ptr new_squad(const std::uint16_t worker_id) noexcept - { - auto annotation = resource::annotation{worker_id, synchronization::isolation_level::Exclusive, - synchronization::protocol::Batched}; - return _resource_builder->build(_worker_id, sizeof(TaskSquad), std::move(annotation)); - } - - /** - * Deletes the given data squad. - * - * @param resource Squad to be deleted. - */ - template static void delete_squad(const mx::resource::ptr resource) noexcept - { - _resource_builder->destroy(_worker_id, resource); - } - - /** - * Allocates memory from the worker-local heap. - * - * @param numa_node_id NUMA node id where to allocate memory from. - * @param alignment Alighment of the allocation. - * @param size Size to allocate. - * @return Pointer to the allocated memory. - */ static void *allocate(const std::uint8_t numa_node_id, const std::size_t alignment, const std::size_t size) noexcept { - return _resource_allocator->allocate(_worker_id, numa_node_id, alignment, size); + return _resource_allocator->allocate(numa_node_id, alignment, size); } - /** - * Frees a region allocated from the worker-local heap. - * - * @param pointer Pointer to memory. - */ - static void free(void *pointer) noexcept { _resource_allocator->free(_worker_id, pointer); } - - /** - * Spawns a task for every worker thread to release the free memory. - */ - static void defragment() - { - const auto local_worker_id = _worker_id; - for (auto worker_id = std::uint16_t(0U); worker_id < workers(); ++worker_id) - { - auto *clean_up_task = - new_task(local_worker_id, *_resource_allocator); - clean_up_task->annotate(worker_id); - spawn(*clean_up_task, local_worker_id); - } - } + static void free(void *pointer) noexcept { _resource_allocator->free(pointer); } /** * Updates the prediction of a data object. - * * @param resource Data object, whose usage should be predicted. * @param old_prediction Prediction so far. * @param new_prediction New usage prediction. */ - static void modify_predicted_usage(const mx::resource::ptr resource, - const mx::resource::expected_access_frequency old_prediction, - const mx::resource::expected_access_frequency new_prediction) noexcept + static void modify_predicted_usage(const resource::ptr resource, + const resource::hint::expected_access_frequency old_prediction, + const resource::hint::expected_access_frequency new_prediction) noexcept { - _scheduler->modify_predicted_usage(resource.worker_id(), old_prediction, new_prediction); + _scheduler->modify_predicted_usage(resource.channel_id(), old_prediction, new_prediction); } /** - * ID of the NUMA region of a worker. - * @param worker_id Worker. + * ID of the NUMA region of a channel. + * @param channel_id Channel. * @return ID of the NUMA region. */ - static std::uint8_t numa_node_id(const std::uint16_t worker_id) noexcept + static std::uint8_t numa_node_id(const std::uint16_t channel_id) noexcept { - return _scheduler->numa_node_id(worker_id); - } - - /** - * Start profiling of idle times. - */ - static void start_idle_profiler() noexcept { _scheduler->start_idle_profiler(); } - - /** - * Stops idle profiling. - * - * @return List of idle times for every channel. - */ - [[nodiscard]] static profiling::IdleTimes stop_idle_profiler() { return _scheduler->stop_idle_profiler(); } - - /** - * Reads the task statistics for a given counter and all channels. - * @return List of all counters for every channel. - */ - static std::unordered_map task_counter() noexcept - { - if constexpr (config::is_use_task_counter()) - { - return _scheduler->task_counter()->get(); - } - else - { - return std::unordered_map{}; - } + return _scheduler->numa_node_id(channel_id); } /** @@ -410,141 +232,45 @@ public: * @param counter Counter to be read. * @return Aggregated value of all channels. */ - static profiling::WorkerTaskCounter task_counter( - [[maybe_unused]] const profiling::TaskCounter::Counter counter) noexcept + static std::uint64_t statistic(const profiling::Statistic::Counter counter) noexcept { - if constexpr (config::is_use_task_counter()) - { - return _scheduler->task_counter()->get(counter); - } - else - { - return profiling::WorkerTaskCounter{_scheduler->core_set().count_cores()}; - } + return _scheduler->statistic(counter); } /** - * Reads the task task_counter for a given counter on a given channel. + * Reads the task statistic for a given counter on a given channel. * @param counter Counter to be read. - * @param worker_id Worker. + * @param channel_id Channel. * @return Value of the counter of the given channel. */ - static std::uint64_t task_counter([[maybe_unused]] const profiling::TaskCounter::Counter counter, - [[maybe_unused]] const std::uint16_t worker_id) noexcept + static std::uint64_t statistic(const profiling::Statistic::Counter counter, const std::uint16_t channel_id) noexcept { - if constexpr (config::is_use_task_counter()) - { - return _scheduler->task_counter()->get(counter, worker_id); - } - else - { - return 0U; - } + return _scheduler->statistic(counter, channel_id); } - static void register_task_for_trace([[maybe_unused]] const std::uint64_t task_id, - [[maybe_unused]] std::string &&name) - { - _scheduler->task_tracer()->register_task(task_id, std::move(name)); - } + static Scheduler &scheduler() { return *_scheduler; } - static std::string task_name([[maybe_unused]] const std::uint64_t task_id) - { - auto name = _scheduler->task_tracer()->get(task_id); - return name.value_or(std::to_string(task_id)); - } + static std::uint16_t my_id() { return _scheduler->my_self()->id(); } - static void start_tracing() - { - if constexpr (config::is_collect_task_traces()) - { - _scheduler->task_tracer()->start(); - } - } + static std::uint16_t my_channel() { return _scheduler->my_self()->current_channel()->id(); } - [[nodiscard]] static profiling::TaskTraces stop_tracing() - { - if constexpr (config::is_collect_task_traces()) - { - return _scheduler->task_tracer()->stop(); - } - else - { - return profiling::TaskTraces{}; - } - } - - static void listen_on_port(std::unique_ptr &&message_handler, const std::uint16_t port) - { - _network_server = - std::make_unique(std::move(message_handler), port, _scheduler->count_cores()); - _network_server_thread = std::make_unique([] { mx::tasking::runtime::_network_server->listen(); }); - } - - static void send_message(const std::uint32_t client_id, std::string &&message) - { - _network_server->send(client_id, std::move(message)); - } - - static bool is_listening() - { - if (_network_server == nullptr) - { - return false; - } - - return _network_server->is_running(); - } - - static void initialize_worker(const std::uint16_t worker_id) - { - _worker_id = worker_id; - _resource_allocator->initialize_heap(worker_id, _scheduler->count_numa_nodes()); - } - - /** - * @return The id of the executing worker. May be costly, use it carefully. - */ - [[nodiscard]] static std::uint16_t worker_id() noexcept { return _worker_id; } - - [[nodiscard]] static std::unordered_map>> - memory_tags() - { - auto tags = _scheduler->memory_tags(); - - for (auto &[name, ranges] : _task_allocator->allocated_chunks()) - { - if (auto iterator = tags.find(name); iterator != tags.end()) - { - std::move(ranges.begin(), ranges.end(), std::back_inserter(iterator->second)); - } - else - { - tags.insert(std::make_pair(std::move(name), std::move(ranges))); - } - } - - return tags; - } + static std::uint16_t workers_count() { return _scheduler->active_workers(); } private: - inline static thread_local std::uint16_t _worker_id{std::numeric_limits::max()}; - // Scheduler to spawn tasks. - inline static std::unique_ptr _scheduler{nullptr}; + inline static std::unique_ptr _scheduler = {nullptr}; // Allocator to allocate tasks (could be systems malloc or our Multi-level allocator). - inline static std::unique_ptr _task_allocator{nullptr}; + inline static std::unique_ptr _task_allocator = {nullptr}; // Allocator to allocate resources. - inline static std::unique_ptr _resource_allocator{nullptr}; + inline static std::unique_ptr _resource_allocator = {nullptr}; // Allocator to allocate data objects. - inline static std::unique_ptr _resource_builder{nullptr}; + inline static std::unique_ptr _resource_builder = {nullptr}; - // Optional network server. - inline static std::unique_ptr _network_server{nullptr}; - inline static std::unique_ptr _network_server_thread{nullptr}; + // Shared page holding the signal channels for each Worker + static std::uint64_t *volatile _signal_page; }; /** @@ -556,13 +282,12 @@ class runtime_guard { public: runtime_guard(Libc::Env &env, const bool use_system_allocator, const util::core_set &core_set, - const PrefetchDistance prefetch_distance = PrefetchDistance{0U}) noexcept + const std::uint16_t prefetch_distance = 0U) noexcept { - runtime::init(core_set, prefetch_distance, use_system_allocator, env); + runtime::init(env, core_set, prefetch_distance, use_system_allocator); } - runtime_guard(Libc::Env &env, const util::core_set &core_set, - const PrefetchDistance prefetch_distance = PrefetchDistance{0U}) noexcept + runtime_guard(Libc::Env &env, const util::core_set &core_set, const std::uint16_t prefetch_distance = 0U) noexcept : runtime_guard(env, false, core_set, prefetch_distance) { } diff --git a/repos/ealanos/src/lib/mx/tasking/scheduler.cpp b/repos/ealanos/src/lib/mx/tasking/scheduler.cpp index b047da4070..0015db46c6 100644 --- a/repos/ealanos/src/lib/mx/tasking/scheduler.cpp +++ b/repos/ealanos/src/lib/mx/tasking/scheduler.cpp @@ -1,95 +1,132 @@ #include "scheduler.h" #include "mx/system/environment.h" -#include "mx/util/logger.h" -#include "runtime.h" +#include "tukija/syscall-generic.h" +#include #include #include -#include -#include -#include +#include #include #include -#include - +#include +#include +#include +#include +#include +#include +#include +#include using namespace mx::tasking; -Scheduler::Scheduler(const mx::util::core_set &core_set, const PrefetchDistance prefetch_distance, - memory::dynamic::local::Allocator &resource_allocator) noexcept - : _core_set(core_set), _prefetch_distance(prefetch_distance), _worker({nullptr}), - _epoch_manager(core_set.count_cores(), resource_allocator, _is_running) +std::uint64_t *volatile mx::tasking::runtime::_signal_page; + +Scheduler::Scheduler(const mx::util::core_set &core_set, const std::uint16_t prefetch_distance, + memory::dynamic::Allocator &resource_allocator) noexcept + : _core_set(core_set), _count_channels(core_set.size()), _worker({}), _channel_numa_node_map({0U}), + _epoch_manager(core_set.size(), resource_allocator, _is_running), _statistic(_count_channels) { - this->_worker_numa_node_map.fill(0U); - - /// Set up profiling utilities. - if constexpr (config::is_use_task_counter()) + this->_worker.fill(nullptr); + this->_channel_numa_node_map.fill(0U); + Genode::log("Initializing scheduler"); + auto worker_count = Tukija::Cip::cip()->habitat_affinity.total(); + for (auto worker_id = 0U; worker_id < worker_count; ++worker_id) { - this->_task_counter.emplace(profiling::TaskCounter{this->_core_set.count_cores()}); - } - if constexpr (config::is_collect_task_traces() || config::is_monitor_task_cycles_for_prefetching()) - { - this->_task_tracer.emplace(profiling::TaskTracer{this->_core_set.count_cores()}); - } + const auto core_id = worker_id; + this->_channel_numa_node_map[worker_id] = system::topology::node_id(core_id); + Genode::log("Creating worker ", worker_id, " at node ", this->_channel_numa_node_map[worker_id]); + auto ptr = memory::GlobalHeap::allocate(this->_channel_numa_node_map[worker_id], sizeof(Worker)); + this->_worker[worker_id] = + new (ptr) + Worker(worker_id, core_id, this->_channel_numa_node_map[worker_id], this->_is_running, _vacant_channels_alloc, _remainder_channel_count, + prefetch_distance, this->_epoch_manager[worker_id], this->_epoch_manager.global_epoch(), + this->_statistic); + ptr = memory::GlobalHeap::allocate(this->_channel_numa_node_map[worker_id], sizeof(Channel)); + this->_channels[worker_id] = + new (ptr) Channel(worker_id, this->_channel_numa_node_map[worker_id], prefetch_distance); + Genode::log("Channel ", worker_id, " created at ", _channels[worker_id]); + } - /// Create worker. - std::cout << "Creating workers for coreset " << this->_core_set << std::endl; - - for (auto worker_id = std::uint16_t(0U); worker_id < this->_core_set.count_cores(); ++worker_id) - { - /// The core the worker is binded to. - const auto core_id = this->_core_set[worker_id]; - - /// The corresponding NUMA Node. - const auto numa_node_id = system::cpu::node_id(core_id); - this->_worker_numa_node_map[worker_id] = numa_node_id; - - this->_worker[worker_id] = static_cast(memory::GlobalHeap::allocate(numa_node_id, sizeof(Worker))); - - std::cout << "Creating worker " << worker_id << " at " << this->_worker[worker_id]; - - new (static_cast(this->_worker[worker_id])) - Worker(this->_core_set.count_cores(), worker_id, core_id, this->_is_running, - prefetch_distance, this->_epoch_manager[worker_id], - this->_epoch_manager.global_epoch(), this->_task_counter, this->_task_tracer); - util::Logger::info_if(system::Environment::is_debug(), "Created worker threads"); - } + Genode::log("Using ", _count_channels, " Channels"); + Genode::log("CPU freq: ", mx::system::Environment::get_cpu_freq(), "kHz"); + /* We need to state the actual number of channels here. But as _count_channels only denotes the + number of channels from the restricted core_set, defined by the application, we could end up reporting a number below the actual number of channels. This could lead to the queue stealing misbehaving, e.g. not all queues being taken by the workers. Furthermore, we must subtract the queue used by the foreman which is not stealable by definition.*/ + Tukija::Cip::cip()->channel_info.count = worker_count - 1; } Scheduler::~Scheduler() noexcept { - std::for_each(this->_worker.begin(), this->_worker.begin() + this->_core_set.count_cores(), [](auto *worker) { - const auto numa_node_id = system::cpu::node_id(worker->core_id()); + for (auto *worker : this->_worker) + { + std::uint8_t node_id = worker->numa_id(); worker->~Worker(); - memory::GlobalHeap::free(worker, sizeof(Worker), numa_node_id); - }); + memory::GlobalHeap::free(worker); + } + + for (auto *channel : this->_channels) + { + std::uint8_t node_id = channel->numa_node_id(); + channel->~Channel(); + memory::GlobalHeap::free(channel); + } } void Scheduler::start_and_wait() { // Create threads for worker... - std::vector worker_threads(this->_core_set.count_cores() + + /*std::vector worker_threads(this->_core_set.size() + static_cast(config::memory_reclamation() != config::None)); - for (auto worker_id = 0U; worker_id < this->_core_set.count_cores(); ++worker_id) + for (auto channel_id = 0U; channel_id < this->_core_set.size(); ++channel_id) { - auto *worker = this->_worker[worker_id]; - worker_threads[worker_id] = std::thread([worker] { worker->execute(); }); + worker_threads[channel_id] = std::thread([this, channel_id] { this->_worker[channel_id]->execute(); }); - util::Logger::info_if(system::Environment::is_debug(), "Created worker thread " + std::to_string(worker_id) + " of size " + std::to_string(sizeof(std::thread))); - //system::thread::pin(worker_threads[worker_id], worker->core_id()); - //system::thread::name(worker_threads[worker_id], "mx::worker#" + std::to_string(worker_id)); + //system::thread::pin(worker_threads[channel_id], this->_worker[channel_id]->core_id()); + }*/ + Genode::Affinity::Space space = Tukija::Cip::cip()->habitat_affinity; + + std::vector worker_threads(space.total() + + static_cast(config::memory_reclamation() != config::None)); + + Tukija::mword_t start_cpu = Tukija::Cip::cip()->get_cpu_index(); + + Genode::Trace::Timestamp start = Genode::Trace::timestamp(); + for (auto cpu = 2U; cpu < space.total(); ++cpu) + { + Genode::String<32> const name{"mx::worker#", cpu}; + Libc::pthread_create_from_session(&worker_threads[cpu], Worker::entry, _worker[cpu], 128 * 4096, name.string(), + &mx::system::Environment::envp()->cpu(), space.location_of_index(cpu)); } + Genode::Trace::Timestamp end = Genode::Trace::timestamp(); + Genode::log("Worker started in ", (end - start), " cycles"); + + Genode::log("Creating foreman thread on CPU ", start_cpu); + + Channel *qf = _channels[0]; + _worker[0]->assign(qf); + + Libc::pthread_create_from_session(&worker_threads[0], Worker::entry, _worker[0], 128 * 4096, "foreman", + &mx::system::Environment::envp()->cpu(), space.location_of_index(0) ); + + /* Always assign the first channel to the foreman, so that it is guaranteed + that channel 0 is always processed by worker 0 and, thus, always on the same CPU core. + This is very useful for benchmarks relying on the TSC. Furthermore, this channel will always be processed. */ + + Genode::log("Created foreman thread"); + + Genode::log("Allocating ", _core_set.size(), " initial workers."); + + Genode::log("Initial cores ", Tukija::Cip::cip()->cores_current); + + this->allocate_cores(_count_channels - Tukija::Cip::cip()->cores_current.count()); + + Genode::log("Allocated ", Tukija::Cip::cip()->channel_info.count, " CPU cores."); // ... and epoch management (if enabled). if constexpr (config::memory_reclamation() != config::None) { - const auto memory_reclamation_thread_id = this->_core_set.count_cores(); - // In case we enable memory reclamation: Use an additional thread. - worker_threads[memory_reclamation_thread_id] = - std::thread([this] { this->_epoch_manager.enter_epoch_periodically(); }); - - // Set name. - //system::thread::name(worker_threads[memory_reclamation_thread_id], "mx::mem_reclam"); + Libc::pthread_create_from_session( + &worker_threads[space.total()], mx::memory::reclamation::EpochManager::enter, &this->_epoch_manager, 4 * 4096, + "epoch_manager", &mx::system::Environment::cpu(), space.location_of_index(space.total())); } // Turning the flag on starts all worker threads to execute tasks. @@ -100,7 +137,7 @@ void Scheduler::start_and_wait() // from somewhere in the application. for (auto &worker_thread : worker_threads) { - worker_thread.join(); + pthread_join(worker_thread, 0); } if constexpr (config::memory_reclamation() != config::None) @@ -112,210 +149,127 @@ void Scheduler::start_and_wait() } } -std::uint16_t Scheduler::dispatch(TaskInterface &task, const std::uint16_t local_worker_id) noexcept +void Scheduler::schedule(TaskInterface &task, const std::uint16_t current_channel_id) noexcept { - /// The "local_channel_id" (the id of the calling channel) may be "invalid" (=uint16_t::max). - /// If it is not, we set the worker_id of the worker_id either by contacting the map (virtualization on) - /// or just using the worker_id as worker_id (virtualization off). - const auto has_local_worker_id = local_worker_id != std::numeric_limits::max(); - - if constexpr (config::is_use_task_counter()) - { - if (has_local_worker_id) [[likely]] - { - this->_task_counter->increment(local_worker_id); - } - } - - const auto &annotation = task.annotation(); - // Scheduling is based on the annotated resource of the given task. - if (annotation.has_resource()) + if (task.has_resource_annotated()) { - const auto annotated_resource = annotation.resource(); - auto resource_worker_id = annotated_resource.worker_id(); - - if (annotated_resource.synchronization_primitive() == synchronization::primitive::Batched) - { - // if (resource_worker_id == local_worker_id) - // { - // annotated_resource.get()->push_back_local(task); - // return local_worker_id; - // } - - annotated_resource.get()->push_back_remote(task); - return resource_worker_id; - } + const auto annotated_resource = task.annotated_resource(); + const auto resource_channel_id = annotated_resource.channel_id(); // For performance reasons, we prefer the local (not synchronized) queue // whenever possible to spawn the task. The decision is based on the // synchronization primitive and the access mode of the task (reader/writer). - if (has_local_worker_id && - Scheduler::keep_task_local(annotation.is_readonly(), annotated_resource.synchronization_primitive())) + if (Scheduler::keep_task_local(task.is_readonly(), annotated_resource.synchronization_primitive(), + resource_channel_id, current_channel_id)) { - this->_worker[local_worker_id]->queues().push_back_local(&task); - if constexpr (config::is_use_task_counter()) + this->_channels[current_channel_id]->push_back_local(&task); + if constexpr (config::task_statistics()) { - this->_task_counter->increment(local_worker_id); + this->_statistic.increment(current_channel_id); } - return resource_worker_id; - } - - if (has_local_worker_id) [[likely]] - { - this->_worker[resource_worker_id]->queues().push_back_remote(&task, this->numa_node_id(local_worker_id), - local_worker_id); } else { - this->_worker[resource_worker_id]->queues().push_back_remote(&task, system::cpu::node_id(), - runtime::worker_id()); - } - - if constexpr (config::is_use_task_counter()) - { - if (has_local_worker_id) [[likely]] + this->_channels[resource_channel_id]->push_back_remote(&task, + this->numa_node_id(current_channel_id)); + if constexpr (config::task_statistics()) { - this->_task_counter->increment(local_worker_id); + this->_statistic.increment(current_channel_id); } } - return resource_worker_id; } // The developer assigned a fixed channel to the task. - if (annotation.has_worker_id()) + else if (task.has_channel_annotated()) { - const auto target_worker_id = annotation.worker_id(); + const auto target_channel_id = task.annotated_channel(); - if (has_local_worker_id) + // For performance reasons, we prefer the local (not synchronized) queue + // whenever possible to spawn the task. + if (target_channel_id == current_channel_id) { - // For performance reasons, we prefer the local (not synchronized) queue - // whenever possible to spawn the task. - if (local_worker_id == target_worker_id) + this->_channels[current_channel_id]->push_back_local(&task); + if constexpr (config::task_statistics()) { - this->_worker[target_worker_id]->queues().push_back_local(&task); - if constexpr (config::is_use_task_counter()) - { - this->_task_counter->increment(target_worker_id); - } - - return target_worker_id; + this->_statistic.increment(current_channel_id); } - - this->_worker[target_worker_id]->queues().push_back_remote(&task, this->numa_node_id(local_worker_id), - local_worker_id); } else { - this->_worker[target_worker_id]->queues().push_back_remote(&task, system::cpu::node_id(), - runtime::worker_id()); - } - - if constexpr (config::is_use_task_counter()) - { - if (has_local_worker_id) [[likely]] + this->_channels[target_channel_id]->push_back_remote(&task, this->numa_node_id(current_channel_id)); + if constexpr (config::task_statistics()) { - this->_task_counter->increment(local_worker_id); + this->_statistic.increment(current_channel_id); } } - - return target_worker_id; } // The developer assigned a fixed NUMA region to the task. - // if (annotation.has_numa_node_id()) - // { - // this->_numa_node_queues[annotation.numa_node_id()].get(annotation.priority()).push_back(&task); - // if constexpr (config::is_use_task_counter()) - // { - // if (current_channel_id != std::numeric_limits::max()) [[likely]] - // { - // this->_task_counter->increment(current_channel_id); - // } - // } - // - // /// TODO: What to return? - // return 0U; - // } - - // The task should be spawned on the local channel. - if (annotation.is_locally()) + else if (task.has_node_annotated()) { - if (has_local_worker_id) [[likely]] - { - this->_worker[local_worker_id]->queues().push_back_local(&task); - if constexpr (config::is_use_task_counter()) - { - this->_task_counter->increment(local_worker_id); - } - - return local_worker_id; - } - - assert(false && "Spawn was expected to be 'locally' but no local channel was provided."); + // TODO: Select random channel @ node, based on load + assert(false && "NOT IMPLEMENTED: Task scheduling for node."); } // The task can run everywhere. - // this->_global_queue.get(annotation.priority()).push_back(&task); - // if constexpr (config::is_use_task_counter()) - // { - // if (current_channel_id != std::numeric_limits::max()) [[likely]] - // { - // this->_task_counter->increment(current_channel_id); - // } - // } + else + { + this->_channels[current_channel_id]->push_back_local(&task); + if constexpr (config::task_statistics()) + { + this->_statistic.increment(current_channel_id); + } + } - /// TODO: What to return? - return 0U; + if constexpr (config::task_statistics()) + { + this->_statistic.increment(current_channel_id); + } } -std::uint16_t Scheduler::dispatch(TaskInterface &first, TaskInterface &last, const uint16_t local_worker_id) noexcept +void Scheduler::schedule(TaskInterface &task) noexcept { - this->_worker[local_worker_id]->queues().push_back_local(&first, &last); - return local_worker_id; -} - -std::uint16_t Scheduler::dispatch(const mx::resource::ptr squad, const enum Annotation::resource_boundness boundness, - const std::uint16_t local_worker_id) noexcept -{ - auto *dispatch_task = runtime::new_task(local_worker_id, *squad.get()); - dispatch_task->annotate(squad.worker_id()); - return this->dispatch(*dispatch_task, local_worker_id); + if (task.has_resource_annotated()) + { + const auto &annotated_resource = task.annotated_resource(); + this->_channels[annotated_resource.channel_id()]->push_back_remote(&task, 0U); + if constexpr (config::task_statistics()) + { + this->_statistic.increment(annotated_resource.channel_id()); + } + } + else if (task.has_channel_annotated()) + { + this->_channels[task.annotated_channel()]->push_back_remote(&task, 0U); + if constexpr (config::task_statistics()) + { + this->_statistic.increment(task.annotated_channel()); + } + } + else if (task.has_node_annotated()) + { + // TODO: Select random channel @ node, based on load + assert(false && "NOT IMPLEMENTED: Task scheduling for node."); + } + else + { + assert(false && "NOT IMPLEMENTED: Task scheduling without channel."); + } } void Scheduler::reset() noexcept { - if constexpr (config::is_use_task_counter()) - { - this->_task_counter->clear(); - } - + this->_statistic.clear(); this->_epoch_manager.reset(); } -void Scheduler::start_idle_profiler() +void Scheduler::profile(const std::string &output_file) { - // TODO: Should we measure idle times? - // this->_idle_profiler.start(); - // for (auto worker_id = 0U; worker_id < this->_core_set.count_cores(); ++worker_id) - // { - // this->_idle_profiler.start(this->_worker[worker_id]->channel()); - // } -} - -std::unordered_map>> Scheduler::memory_tags() -{ - auto tags = std::unordered_map>>{}; - - auto workers = std::vector>{}; - workers.reserve(this->_core_set.count_cores()); - for (auto worker_id = 0U; worker_id < this->_core_set.count_cores(); ++worker_id) + this->_profiler.profile(output_file); + for (auto i = 0U; i < this->_count_channels; ++i) { - const auto begin = std::uintptr_t(this->_worker[worker_id]); - const auto end = begin + sizeof(Worker); - workers.emplace_back(std::make_pair(begin, end)); + Genode::log("Profiling channel ", i, " at ", this->_channels[i]); + this->_profiler.profile(this->_is_running, *(this->_channels[i])); } - - tags.insert(std::make_pair("worker", std::move(workers))); - return tags; } \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/scheduler.d b/repos/ealanos/src/lib/mx/tasking/scheduler.d index 4345516e44..04b392b4ba 100644 --- a/repos/ealanos/src/lib/mx/tasking/scheduler.d +++ b/repos/ealanos/src/lib/mx/tasking/scheduler.d @@ -1,153 +1,90 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.d: \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.cpp \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/util/meta.h \ + /home/mml/genode-igb/repos/base/include/base/env.h \ + /home/mml/genode-igb/repos/base/include/parent/parent.h \ + /home/mml/genode-igb/repos/base/include/util/attempt.h \ + /home/mml/genode-igb/repos/base/include/base/rpc.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ /home/mml/genode-igb/repos/base/include/base/output.h \ /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/util/misc_math.h \ + /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/base/thread.h \ + /home/mml/genode-igb/repos/base/include/base/exception.h \ /home/mml/genode-igb/repos/base/include/base/blockade.h \ + /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/capability.h \ + /home/mml/genode-igb/repos/base/include/base/native_capability.h \ /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ /home/mml/genode-igb/repos/base/include/base/thread_state.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ /home/mml/genode-igb/repos/base/include/base/signal.h \ /home/mml/genode-igb/repos/base/include/util/list.h \ /home/mml/genode-igb/repos/base/include/base/semaphore.h \ + /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/util/fifo.h \ + /home/mml/genode-igb/repos/base/include/base/affinity.h \ + /home/mml/genode-igb/repos/base/include/util/xml_node.h \ + /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ /home/mml/genode-igb/repos/base/include/session/session.h \ + /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/session_label.h \ /home/mml/genode-igb/repos/base/include/util/arg_string.h \ /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/base/allocator.h \ /home/mml/genode-igb/repos/base/include/util/register.h \ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ /home/mml/genode-igb/repos/base/include/base/id_space.h \ /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ /home/mml/genode-igb/repos/base/include/session/capability.h \ @@ -164,100 +101,100 @@ /home/mml/genode-igb/repos/base/include/base/trace/events.h \ /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ /home/mml/genode-igb/repos/base/include/dataspace/client.h \ /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ + /home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ + /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ + /home/mml/genode-igb/repos/base/include/util/touch.h \ /home/mml/genode-igb/repos/base/include/base/heap.h \ /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ /home/mml/genode-igb/repos/base/include/base/tslab.h \ /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ + /home/mml/genode-igb/repos/libports/src/lib/libc/internal/thread_create.h \ /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h + /home/mml/genode-igb/repos/libports/src/lib/libc/internal/types.h /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: @@ -266,8 +203,12 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: @@ -278,19 +219,11 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: @@ -298,168 +231,46 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: +/home/mml/genode-igb/repos/libports/include/libc/component.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: +/home/mml/genode-igb/repos/base/include/util/meta.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: +/home/mml/genode-igb/repos/base/include/base/env.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: +/home/mml/genode-igb/repos/base/include/parent/parent.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: +/home/mml/genode-igb/repos/base/include/util/attempt.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: +/home/mml/genode-igb/repos/base/include/base/rpc.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: +/home/mml/genode-igb/repos/base/include/base/rpc_args.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: +/home/mml/genode-igb/repos/base/include/util/string.h: /home/mml/genode-igb/repos/base/include/base/stdint.h: -/home/mml/genode-igb/repos/base/include/base/log.h: +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: /home/mml/genode-igb/repos/base/include/base/output.h: /home/mml/genode-igb/repos/base/include/util/interface.h: -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: +/home/mml/genode-igb/repos/base/include/util/misc_math.h: /home/mml/genode-igb/repos/base/include/util/noncopyable.h: -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - /home/mml/genode-igb/repos/base/include/cpu/string.h: -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - /home/mml/genode-igb/repos/base/include/base/thread.h: +/home/mml/genode-igb/repos/base/include/base/exception.h: + /home/mml/genode-igb/repos/base/include/base/blockade.h: +/home/mml/genode-igb/repos/base/include/base/lock.h: + /home/mml/genode-igb/repos/base/include/base/trace/logger.h: /home/mml/genode-igb/repos/base/include/base/trace/buffer.h: @@ -468,6 +279,10 @@ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/capability.h: + +/home/mml/genode-igb/repos/base/include/base/native_capability.h: + /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: /home/mml/genode-igb/repos/base/include/base/thread_state.h: @@ -480,14 +295,30 @@ /home/mml/genode-igb/repos/base/include/base/semaphore.h: +/home/mml/genode-igb/repos/base/include/base/mutex.h: + /home/mml/genode-igb/repos/base/include/util/fifo.h: +/home/mml/genode-igb/repos/base/include/base/affinity.h: + +/home/mml/genode-igb/repos/base/include/util/xml_node.h: + +/home/mml/genode-igb/repos/base/include/base/log.h: + +/home/mml/genode-igb/repos/base/include/base/buffered_output.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: + +/home/mml/genode-igb/repos/base/include/util/token.h: + /home/mml/genode-igb/repos/base/include/dataspace/capability.h: -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: +/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: /home/mml/genode-igb/repos/base/include/session/session.h: +/home/mml/genode-igb/repos/base/include/base/quota_guard.h: + /home/mml/genode-igb/repos/base/include/base/session_label.h: /home/mml/genode-igb/repos/base/include/util/arg_string.h: @@ -496,20 +327,16 @@ /home/mml/genode-igb/repos/base/include/region_map/region_map.h: +/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: + +/home/mml/genode-igb/repos/base/include/base/cache.h: + /home/mml/genode-igb/repos/base/include/base/allocator.h: /home/mml/genode-igb/repos/base/include/util/register.h: /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - /home/mml/genode-igb/repos/base/include/base/id_space.h: /home/mml/genode-igb/repos/base/include/util/avl_tree.h: @@ -542,12 +369,76 @@ /home/mml/genode-igb/repos/base/include/pd_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: /home/mml/genode-igb/repos/base/include/dataspace/client.h: /home/mml/genode-igb/repos/base/include/base/rpc_client.h: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: + +/home/mml/genode-igb/repos/base/include/rom_session/client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: + +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: + +/home/mml/genode-igb/repos/base/include/base/connection.h: + +/home/mml/genode-igb/repos/base/include/util/retry.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: + +/home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + +/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: + +/home/mml/genode-igb/repos/base/include/util/touch.h: + /home/mml/genode-igb/repos/base/include/base/heap.h: /home/mml/genode-igb/repos/base/include/base/allocator_avl.h: @@ -556,86 +447,54 @@ /home/mml/genode-igb/repos/base/include/base/slab.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: +/home/mml/genode-igb/repos/libports/src/lib/libc/internal/thread_create.h: /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: -/home/mml/genode-igb/repos/libports/include/libc/component.h: +/home/mml/genode-igb/repos/libports/src/lib/libc/internal/types.h: diff --git a/repos/ealanos/src/lib/mx/tasking/scheduler.h b/repos/ealanos/src/lib/mx/tasking/scheduler.h index 086cb4f9d0..50aa8dc9b4 100644 --- a/repos/ealanos/src/lib/mx/tasking/scheduler.h +++ b/repos/ealanos/src/lib/mx/tasking/scheduler.h @@ -1,8 +1,8 @@ #pragma once -#include "prefetch_distance.h" -#include "shared_task_queue.h" +#include "channel.h" #include "task.h" -#include "task_squad.h" +#include "tukija/syscall-generic.h" +#include "tukija/syscalls.h" #include "worker.h" #include #include @@ -11,16 +11,16 @@ #include #include #include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include #include +#include +#include namespace mx::tasking { /** @@ -30,38 +30,22 @@ namespace mx::tasking { class Scheduler { public: - Scheduler(const util::core_set &core_set, PrefetchDistance prefetch_distance, - memory::dynamic::local::Allocator &resource_allocator) noexcept; + Scheduler(const util::core_set &core_set, std::uint16_t prefetch_distance, + memory::dynamic::Allocator &resource_allocator) noexcept; ~Scheduler() noexcept; /** * Schedules a given task. - * * @param task Task to be scheduled. - * @param local_worker_id Worker, the request came from. - * @return Worker ID where the task was dispatched to. + * @param current_channel_id Channel, the request came from. */ - std::uint16_t dispatch(TaskInterface &task, std::uint16_t local_worker_id) noexcept; + void schedule(TaskInterface &task, std::uint16_t current_channel_id) noexcept; /** - * Schedules a given list of tasks to the local worker. - * The tasks have to be concatenated. - * - * @param first First task of the list. - * @param last Last task of the list. - * @param local_worker_id Worker, the request came from. - * @return Worker ID where the task was dispatched to. + * Schedules a given task. + * @param task Task to be scheduled. */ - std::uint16_t dispatch(TaskInterface &first, TaskInterface &last, std::uint16_t local_worker_id) noexcept; - - /** - * Schedules all tasks of a given squad. - * @param squad Squad to be scheduled. - * @param local_worker_id Channel, the request came from. - * @return Worker ID where the task was dispatched to. - */ - std::uint16_t dispatch(mx::resource::ptr squad, enum Annotation::resource_boundness boundness, - std::uint16_t local_worker_id) noexcept; + void schedule(TaskInterface &task) noexcept; /** * Starts all worker threads and waits until they finish. @@ -75,12 +59,44 @@ public: void interrupt() noexcept { _is_running = false; - if (this->_idle_profiler.is_running()) - { - this->_idle_profiler.stop(); + while (Tukija::Cip::cip()->cores_current.count() > 1) { + system::builtin::pause(); } + + unsigned pcpu = Tukija::Cip::cip()->get_cpu_index(); + + Worker *me = _worker_at_core[pcpu]; + + /* We assume that the runtime is always stopped by the foreman. + * So we should check whether this is truly the case here. + */ + assert(me->current_channel()->id() == 0 && "Channel is not 0."); + assert(me->id() == 0 && "Stop called by worker."); + + me->yield_channels(config::max_cores(), _channels[0]); + + // Genode::log("Got ", _vacant_channels.size(), " vacant channels."); + // this->_profiler.stop(); } + void resume() noexcept { + //Genode::log("Allocation before resume ", allocation); + + unsigned current_cores = Tukija::Cip::cip()->cores_current.count(); + allocate_cores(_count_channels - current_cores); + _is_running = true; + } + + [[nodiscard]] inline Worker *my_self() noexcept { + unsigned pcpu = Tukija::Cip::cip()->get_cpu_index(); + + return _worker_at_core[pcpu]; + } + + [[nodiscard]] inline Channel *get_channel(std::uint64_t index) { return _channels[index]; } + + [[nodiscard]] inline std::uint16_t active_workers() const noexcept { return _active_worker_count; } + /** * @return Core set of this instance. */ @@ -97,61 +113,69 @@ public: [[nodiscard]] memory::reclamation::EpochManager &epoch_manager() noexcept { return _epoch_manager; } /** - * @return Number of all cores. + * @return Number of all channels. */ - [[nodiscard]] std::uint16_t count_cores() const noexcept { return _core_set.count_cores(); } + [[nodiscard]] std::uint16_t count_channels() const noexcept { return _count_channels; } /** - * @return Number of all numa regions. + * Reads the NUMA region of a given channel/worker thread. + * @param channel_id Channel. + * @return NUMA region of the given channel. */ - [[nodiscard]] std::uint8_t count_numa_nodes() const noexcept { return _core_set.numa_nodes(); } - - /** - * @return Prefetch distance. - */ - [[nodiscard]] PrefetchDistance prefetch_distance() const noexcept { return _prefetch_distance; } - - /** - * Reads the NUMA region of a given worker thread. - * @param worker_id Worker. - * @return NUMA region of the given worker. - */ - [[nodiscard]] std::uint8_t numa_node_id(const std::uint16_t worker_id) const noexcept + [[nodiscard]] std::uint8_t numa_node_id(const std::uint16_t channel_id) const noexcept { - return _worker_numa_node_map[worker_id]; + return _channel_numa_node_map[channel_id]; } /** * Predicts usage for a given channel. - * @param worker_id Worker. + * @param channel_id Channel. * @param usage Usage to predict. */ - void predict_usage(const std::uint16_t worker_id, const mx::resource::expected_access_frequency usage) noexcept + void predict_usage(const std::uint16_t channel_id, const resource::hint::expected_access_frequency usage) noexcept { - _worker[worker_id]->occupancy().predict(usage); + _channels[channel_id]->predict_usage(usage); + /*if (usage == resource::hint::expected_access_frequency::excessive) { + Worker *owner = _owner_of_channel[channel_id]; + + if (owner) { + owner->prohibit_stealing(); + //Genode::log("Worker ", owner->core_id(), " is going to have excessive load."); + _overloaded_workers.push_back(owner); + Nova::mword_t allocation; + std::uint16_t channels = owner->count_channels(); + + std::uint16_t cores_needed = (channels > 1) ? channels : 1; + Nova::alloc_cores(cores_needed + _vacant_channel_count.load(), allocation); + } + else + { + Nova::mword_t allocation; + Nova::alloc_cores(_vacant_channel_count, allocation); + } + }*/ } /** * Updates the predicted usage of a channel. - * @param worker_id Worker. + * @param channel_id Channel. * @param old_prediction So far predicted usage. * @param new_prediction New prediction. */ - void modify_predicted_usage(const std::uint16_t worker_id, - const mx::resource::expected_access_frequency old_prediction, - const mx::resource::expected_access_frequency new_prediction) noexcept + void modify_predicted_usage(const std::uint16_t channel_id, + const resource::hint::expected_access_frequency old_prediction, + const resource::hint::expected_access_frequency new_prediction) noexcept { - _worker[worker_id]->occupancy().revoke(old_prediction); - _worker[worker_id]->occupancy().predict(new_prediction); + _channels[channel_id]->modify_predicted_usage(old_prediction, new_prediction); } /** - * @param worker_id Worker. + * @param channel_id Channel. * @return True, when a least one usage was predicted to be "excessive" for the given channel. */ - [[nodiscard]] bool has_excessive_usage_prediction(const std::uint16_t worker_id) const noexcept + [[nodiscard]] bool has_excessive_usage_prediction(const std::uint16_t channel_id) const noexcept { - return _worker[worker_id]->occupancy().has_excessive_usage_prediction(); + return _channels[channel_id]->has_excessive_usage_prediction(); } /** @@ -159,108 +183,118 @@ public: */ void reset() noexcept; - /** - * Starts profiling of idle times. - */ - void start_idle_profiler(); + /** + * Resets the usage predictions for all channels. This is useful for cases + * where the resource schedule has changed (e.g. after a resume). + */ + void reset_usage_predictions() + { + for (auto channel : _channels) { + channel->predict_usage(resource::hint::expected_access_frequency::normal); + } + } + /** + * Register a worker in the core to worker map + */ + void register_worker(Worker *worker) { _worker_at_core[worker->phys_core_id()] = worker; + _active_worker_count.fetch_add(1); + } + + void deregister_worker() { _active_worker_count.fetch_sub(1); } /** - * Stops idle profiling. - * @return List of idle times for each channel. + * Aggregates the counter for all cores. + * @param counter Statistic counter. + * @return Aggregated value. */ - [[nodiscard]] profiling::IdleTimes stop_idle_profiler() { return this->_idle_profiler.stop(); } + [[nodiscard]] std::uint64_t statistic([[maybe_unused]] const profiling::Statistic::Counter counter) const noexcept + { + if constexpr (config::task_statistics()) + { + return this->_statistic.get(counter); + } + else + { + return 0U; + } + } /** - * @return Statistic. + * Reads the statistics for a given counter on a given channel. + * @param counter Statistic counter. + * @param channel_id Channel. + * @return Value of the counter for the given channel. */ - [[nodiscard]] std::optional &task_counter() noexcept { return _task_counter; } + [[nodiscard]] std::uint64_t statistic([[maybe_unused]] const profiling::Statistic::Counter counter, + [[maybe_unused]] const std::uint16_t channel_id) const noexcept + { + if constexpr (config::task_statistics()) + { + return this->_statistic.get(counter, channel_id); + } + else + { + return 0U; + } + } /** - * @return Task tracer. + * Starts profiling of idle times and specifies the results file. + * @param output_file File to write idle times after stopping MxTasking. */ - [[nodiscard]] std::optional &task_tracer() noexcept { return _task_tracer; } - - [[nodiscard]] std::unordered_map>> memory_tags(); + void profile(const std::string &output_file); bool operator==(const util::core_set &cores) const noexcept { return _core_set == cores; } bool operator!=(const util::core_set &cores) const noexcept { return _core_set != cores; } + inline void allocate_cores(std :: uint16_t cores) + { + if (!cores) return; + + Tukija::Cip *cip = Tukija::Cip::cip(); + cip->cores_new.clear(); + cip->cores_reclaimed.clear(); + + Tukija::alloc(Tukija::Resource_type::CPU_CORE, cores); + _remainder_channel_count.store(cip->cores_new.count() + cip->cores_reclaimed.count()); + } + private: - class PhysicalCoreResourceWorkerIds - { - public: - PhysicalCoreResourceWorkerIds() noexcept - : _worker_ids{std::numeric_limits::max(), std::numeric_limits::max(), - std::numeric_limits::max()} - { - } - - explicit PhysicalCoreResourceWorkerIds(const std::uint16_t worker_id) noexcept - : _worker_ids{worker_id, worker_id, worker_id} - { - } - - PhysicalCoreResourceWorkerIds(const std::uint16_t memory_bound_worker_id, - const std::uint16_t compute_bound_worker_id, - const std::uint16_t mixed_worker_id) noexcept - : _worker_ids{memory_bound_worker_id, compute_bound_worker_id, mixed_worker_id} - { - } - - ~PhysicalCoreResourceWorkerIds() noexcept = default; - - PhysicalCoreResourceWorkerIds &operator=(const PhysicalCoreResourceWorkerIds &) noexcept = default; - PhysicalCoreResourceWorkerIds &operator=(PhysicalCoreResourceWorkerIds &&) noexcept = default; - - [[nodiscard]] std::uint16_t operator[](const enum Annotation::resource_boundness boundness) const noexcept - { - return _worker_ids[boundness]; - } - - [[nodiscard]] std::uint16_t &operator[](const enum Annotation::resource_boundness boundness) noexcept - { - return _worker_ids[boundness]; - } - - operator bool() - { - return _worker_ids[0U] != std::numeric_limits::max() && - _worker_ids[1U] != std::numeric_limits::max() && - _worker_ids[2U] != std::numeric_limits::max(); - } - - private: - std::array _worker_ids; - }; - // Cores to run the worker threads on. const util::core_set _core_set; - // Number of tasks a resource will be prefetched in front of. - const PrefetchDistance _prefetch_distance; + // Number of all channels. + std::uint16_t _count_channels; - // All initialized workers. - std::array _worker{nullptr}; - - // Map of worker id to NUMA region id. - std::array _worker_numa_node_map{0U}; + alignas(64) std::atomic _loot_available{true}; // Flag for the worker threads. If false, the worker threads will stop. // This is atomic for hardware that does not guarantee atomic reads/writes of booleans. alignas(64) util::maybe_atomic _is_running{false}; + alignas(64) std::atomic _active_worker_count{0}; + + // All initialized workers. + alignas(64) std::array _worker{nullptr}; + alignas(64) std::array _worker_at_core{nullptr}; + + alignas(64) std::array _channels{nullptr}; + + alignas(64) mx::util::Field_Allocator _vacant_channels_alloc{63}; + alignas(64) std::atomic _remainder_channel_count{0}; + + // Map of channel id to NUMA region id. + alignas(64) std::array _channel_numa_node_map{0U}; + // Epoch manager for memory reclamation, alignas(64) memory::reclamation::EpochManager _epoch_manager; // Profiler for task statistics. - alignas(64) std::optional _task_counter{std::nullopt}; + profiling::Statistic _statistic; // Profiler for idle times. - alignas(64) profiling::IdleProfiler _idle_profiler; - - // Recorder for tracing task run times. - alignas(64) std::optional _task_tracer{std::nullopt}; + profiling::Profiler _profiler{}; /** * Make a decision whether a task should be scheduled to the local @@ -268,13 +302,16 @@ private: * * @param is_readonly Access mode of the task. * @param primitive The synchronization primitive of the task annotated resource. - * @param resource_worker_id Worker id of the task annotated resource. - * @param current_worker_id Worker id where the spawn() operation is called. + * @param resource_channel_id Channel id of the task annotated resource. + * @param current_channel_id Channel id where the spawn() operation is called. * @return True, if the task should be scheduled local. */ - [[nodiscard]] static inline bool keep_task_local(const bool is_readonly, const synchronization::primitive primitive) + [[nodiscard]] static inline bool keep_task_local(const bool is_readonly, const synchronization::primitive primitive, + const std::uint16_t resource_channel_id, + const std::uint16_t current_channel_id) { - return (is_readonly && primitive != synchronization::primitive::ScheduleAll) || + return (resource_channel_id == current_channel_id) || + (is_readonly && primitive != synchronization::primitive::ScheduleAll) || (primitive != synchronization::primitive::None && primitive != synchronization::primitive::ScheduleAll && primitive != synchronization::primitive::ScheduleWriter); } diff --git a/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h b/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h deleted file mode 100644 index 18892fd0fa..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "task.h" -#include -#include -#include - -namespace mx::tasking { -template class SharedTaskQueue -{ -public: - SharedTaskQueue() : _queue(CAPACITY) {} - ~SharedTaskQueue() = default; - - void push_back(TaskInterface *task) noexcept { _queue.try_push_back(task); } - - [[nodiscard]] TaskInterface *pop_front() noexcept - { - TaskInterface *task = nullptr; - _queue.try_pop_front(task); - return task; - } - - [[nodiscard]] bool empty() const noexcept { return _queue.empty(); } - -private: - queue::BoundMPMC _queue; -}; - -using GlobalSharedTaskQueue = queue::PriorityQueue, priority::low, priority::normal>; -using NUMASharedTaskQueue = queue::PriorityQueue, priority::low, priority::normal>; -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task.cpp b/repos/ealanos/src/lib/mx/tasking/task.cpp index 885ea734a0..1e9779ab67 100644 --- a/repos/ealanos/src/lib/mx/tasking/task.cpp +++ b/repos/ealanos/src/lib/mx/tasking/task.cpp @@ -1,43 +1,18 @@ #include "task.h" #include "runtime.h" -#include +#include using namespace mx::tasking; -TaskResult TaskResult::make_stop(const std::uint16_t worker_id, const bool stop_network) noexcept +TaskResult TaskResult::make_stop() noexcept { - auto *stop_task = runtime::new_task(worker_id, stop_network); + auto *stop_task = runtime::new_task(system::topology::core_id()); stop_task->annotate(std::uint16_t{0U}); return TaskResult::make_succeed_and_remove(stop_task); } -TaskResult TaskLine::execute(const std::uint16_t worker_id) +TaskResult StopTaskingTask::execute(const std::uint16_t /*core_id*/, const std::uint16_t /*channel_id*/) { - auto result = this->_next_task->execute(worker_id); - if (result.is_remove()) - { - mx::tasking::runtime::delete_task(worker_id, this->_next_task); - } - - if (result.has_successor()) - { - this->_next_task = static_cast(result); - this->annotate(_next_task); - return TaskResult::make_succeed(this); - } - - if (this->_waiting_tasks.empty() == false) - { - this->_next_task = this->_waiting_tasks.pop_front(); - this->annotate(_next_task); - return TaskResult::make_succeed(this); - } - - return TaskResult::make_remove(); -} - -TaskResult StopTaskingTask::execute(const std::uint16_t /*worker_id*/) -{ - runtime::stop(this->_stop_network); + runtime::stop(); return TaskResult::make_remove(); } \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task.d b/repos/ealanos/src/lib/mx/tasking/task.d index dfeae11c0f..cf05bb6cc1 100644 --- a/repos/ealanos/src/lib/mx/tasking/task.d +++ b/repos/ealanos/src/lib/mx/tasking/task.d @@ -1,111 +1,65 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.d: \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.cpp \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/util/meta.h \ + /home/mml/genode-igb/repos/base/include/base/env.h \ + /home/mml/genode-igb/repos/base/include/parent/parent.h \ + /home/mml/genode-igb/repos/base/include/util/attempt.h \ + /home/mml/genode-igb/repos/base/include/base/rpc.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ /home/mml/genode-igb/repos/base/include/base/output.h \ /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ /home/mml/genode-igb/repos/base/include/util/misc_math.h \ + /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/base/thread.h \ + /home/mml/genode-igb/repos/base/include/base/exception.h \ /home/mml/genode-igb/repos/base/include/base/blockade.h \ + /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/capability.h \ + /home/mml/genode-igb/repos/base/include/base/native_capability.h \ /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ /home/mml/genode-igb/repos/base/include/base/thread_state.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ /home/mml/genode-igb/repos/base/include/base/signal.h \ /home/mml/genode-igb/repos/base/include/util/list.h \ /home/mml/genode-igb/repos/base/include/base/semaphore.h \ + /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/util/fifo.h \ + /home/mml/genode-igb/repos/base/include/base/affinity.h \ + /home/mml/genode-igb/repos/base/include/util/xml_node.h \ + /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ + /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ /home/mml/genode-igb/repos/base/include/session/session.h \ + /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/session_label.h \ /home/mml/genode-igb/repos/base/include/util/arg_string.h \ /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/base/allocator.h \ /home/mml/genode-igb/repos/base/include/util/register.h \ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ /home/mml/genode-igb/repos/base/include/base/id_space.h \ /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ /home/mml/genode-igb/repos/base/include/session/capability.h \ @@ -122,260 +76,148 @@ /home/mml/genode-igb/repos/base/include/base/trace/events.h \ /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ /home/mml/genode-igb/repos/base/include/dataspace/client.h \ /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ + /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ + /home/mml/genode-igb/repos/base/include/util/touch.h \ /home/mml/genode-igb/repos/base/include/base/heap.h \ /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ /home/mml/genode-igb/repos/base/include/base/tslab.h \ /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: +/home/mml/genode-igb/repos/libports/include/libc/component.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: +/home/mml/genode-igb/repos/base/include/util/meta.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: +/home/mml/genode-igb/repos/base/include/base/env.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: +/home/mml/genode-igb/repos/base/include/parent/parent.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: +/home/mml/genode-igb/repos/base/include/util/attempt.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: +/home/mml/genode-igb/repos/base/include/base/rpc.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: +/home/mml/genode-igb/repos/base/include/base/rpc_args.h: -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: +/home/mml/genode-igb/repos/base/include/util/string.h: /home/mml/genode-igb/repos/base/include/base/stdint.h: -/home/mml/genode-igb/repos/base/include/base/log.h: +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: /home/mml/genode-igb/repos/base/include/base/output.h: /home/mml/genode-igb/repos/base/include/util/interface.h: -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: +/home/mml/genode-igb/repos/base/include/util/misc_math.h: /home/mml/genode-igb/repos/base/include/util/noncopyable.h: -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - /home/mml/genode-igb/repos/base/include/cpu/string.h: -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - /home/mml/genode-igb/repos/base/include/base/thread.h: +/home/mml/genode-igb/repos/base/include/base/exception.h: + /home/mml/genode-igb/repos/base/include/base/blockade.h: +/home/mml/genode-igb/repos/base/include/base/lock.h: + /home/mml/genode-igb/repos/base/include/base/trace/logger.h: /home/mml/genode-igb/repos/base/include/base/trace/buffer.h: @@ -384,6 +226,10 @@ /home/mml/genode-igb/repos/base/include/cpu_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/capability.h: + +/home/mml/genode-igb/repos/base/include/base/native_capability.h: + /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: /home/mml/genode-igb/repos/base/include/base/thread_state.h: @@ -396,14 +242,30 @@ /home/mml/genode-igb/repos/base/include/base/semaphore.h: +/home/mml/genode-igb/repos/base/include/base/mutex.h: + /home/mml/genode-igb/repos/base/include/util/fifo.h: +/home/mml/genode-igb/repos/base/include/base/affinity.h: + +/home/mml/genode-igb/repos/base/include/util/xml_node.h: + +/home/mml/genode-igb/repos/base/include/base/log.h: + +/home/mml/genode-igb/repos/base/include/base/buffered_output.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: + +/home/mml/genode-igb/repos/base/include/util/token.h: + /home/mml/genode-igb/repos/base/include/dataspace/capability.h: -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: +/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: /home/mml/genode-igb/repos/base/include/session/session.h: +/home/mml/genode-igb/repos/base/include/base/quota_guard.h: + /home/mml/genode-igb/repos/base/include/base/session_label.h: /home/mml/genode-igb/repos/base/include/util/arg_string.h: @@ -412,20 +274,16 @@ /home/mml/genode-igb/repos/base/include/region_map/region_map.h: +/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: + +/home/mml/genode-igb/repos/base/include/base/cache.h: + /home/mml/genode-igb/repos/base/include/base/allocator.h: /home/mml/genode-igb/repos/base/include/util/register.h: /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - /home/mml/genode-igb/repos/base/include/base/id_space.h: /home/mml/genode-igb/repos/base/include/util/avl_tree.h: @@ -458,12 +316,98 @@ /home/mml/genode-igb/repos/base/include/pd_session/capability.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: + +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: /home/mml/genode-igb/repos/base/include/dataspace/client.h: /home/mml/genode-igb/repos/base/include/base/rpc_client.h: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: + +/home/mml/genode-igb/repos/base/include/rom_session/client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: + +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: + +/home/mml/genode-igb/repos/base/include/base/connection.h: + +/home/mml/genode-igb/repos/base/include/util/retry.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: + +/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: + +/home/mml/genode-igb/repos/base/include/util/touch.h: + /home/mml/genode-igb/repos/base/include/base/heap.h: /home/mml/genode-igb/repos/base/include/base/allocator_avl.h: @@ -472,170 +416,76 @@ /home/mml/genode-igb/repos/base/include/base/slab.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: +/home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h: -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: - -/home/mml/genode-igb/repos/libports/include/libc/component.h: diff --git a/repos/ealanos/src/lib/mx/tasking/task.h b/repos/ealanos/src/lib/mx/tasking/task.h index 62262f23b6..919aaef795 100644 --- a/repos/ealanos/src/lib/mx/tasking/task.h +++ b/repos/ealanos/src/lib/mx/tasking/task.h @@ -1,18 +1,19 @@ #pragma once -#include "annotation.h" #include "config.h" -#include "priority.h" #include "task_stack.h" #include #include #include -#include -#include +#include #include -#include namespace mx::tasking { +enum priority : std::uint8_t +{ + low = 0, + normal = 1 +}; class TaskInterface; @@ -36,17 +37,6 @@ public: */ static TaskResult make_succeed(TaskInterface *successor_task) noexcept { return TaskResult{successor_task, false}; } - /** - * Let the runtime know that the given task - * should be run as a successor of the current - * task. The runtime will schedule that task. - * - * @param successor_task Task to succeed. - * @return A TaskResult that tells the - * runtime to run the given task. - */ - static TaskResult make_succeed(mx::resource::ptr resource) noexcept { return TaskResult{resource, false}; } - /** * Let the runtime know that the given task * should be removed after (successfully) @@ -83,12 +73,10 @@ public: * Let the runtime know to stop after * the returning task. * - * @param worker_id Id of the current worker. - * @param stop_network If set to true, the network server will also be stopped. * @return A TaskResult that tells the * runtime to top. */ - static TaskResult make_stop(std::uint16_t worker_id, bool stop_network = true) noexcept; + static TaskResult make_stop() noexcept; constexpr TaskResult() = default; ~TaskResult() = default; @@ -96,24 +84,17 @@ public: TaskResult &operator=(const TaskResult &) = default; explicit operator TaskInterface *() const noexcept { return _successor_task; } - explicit operator mx::resource::ptr() const noexcept { return _resource; } [[nodiscard]] bool is_remove() const noexcept { return _remove_task; } [[nodiscard]] bool has_successor() const noexcept { return _successor_task != nullptr; } - [[nodiscard]] bool has_resource() const noexcept { return static_cast(_resource); } private: constexpr TaskResult(TaskInterface *successor_task, const bool remove) noexcept : _successor_task(successor_task), _remove_task(remove) { } - constexpr TaskResult(const mx::resource::ptr resource, const bool remove) noexcept - : _resource(resource), _remove_task(remove) - { - } - TaskInterface *_successor_task{nullptr}; - mx::resource::ptr _resource; - bool _remove_task{false}; + TaskInterface *_successor_task = nullptr; + bool _remove_task = false; }; /** @@ -126,6 +107,7 @@ class TaskInterface public: using channel = std::uint16_t; using node = std::uint8_t; + using resource_and_size = std::pair; constexpr TaskInterface() = default; virtual ~TaskInterface() = default; @@ -133,118 +115,107 @@ public: /** * Will be executed by a worker when the task gets CPU time. * - * @param worker_id Worker ID the task is executed on. + * @param core_id (System-)ID of the core, the task is executed on. + * @param channel_id Channel ID the task is executed on. * @return Pointer to the follow up task. */ - virtual TaskResult execute(std::uint16_t worker_id) = 0; - - /** - * @return Trace Id of the task, that will be included into recordings to assign - * time ranges to specific tasks. - */ - [[nodiscard]] virtual std::uint64_t trace_id() const noexcept { return 0U; } - - /** - * @return The annotation of the task. - */ - [[nodiscard]] const Annotation &annotation() const noexcept { return _annotation; } - - /** - * @return The annotation of the task. - */ - [[nodiscard]] class Annotation &annotation() noexcept { return _annotation; } + virtual TaskResult execute(std::uint16_t core_id, std::uint16_t channel_id) = 0; /** * Annotate the task with a resource the task will work on. - * The size identifies how many bytes will be prefetched. * * @param resource Pointer to the resource. * @param size Size of the resource (that will be prefetched). */ void annotate(const mx::resource::ptr resource_, const std::uint16_t size) noexcept { - annotate(resource_, PrefetchSize::make(PrefetchDescriptor::PrefetchType::Temporal, size)); + _annotation.target = std::make_pair(resource_, size); } - /** - * Annotate the task with a resource the task will work on. - * The object will be used for synchronization and prefetching. - * - * @param resource Pointer to the resource. - * @param prefetch_hint Mask for prefetching the resource. - */ - void annotate(const mx::resource::ptr resource_, const PrefetchDescriptor descriptor) noexcept - { - annotate(resource_); - annotate(PrefetchHint{descriptor, resource_}); - } - - /** - * Annotate the task with a resource the task will work on. - * The data object will be used for synchronization only. - * - * @param resource Pointer to the resource. - */ - void annotate(const mx::resource::ptr resource_) noexcept { _annotation.set(resource_); } - - /** - * Annotate the task with a prefetch hint that will be prefetched. - * - * @param prefetch_hint Hint for prefetching. - */ - void annotate(const PrefetchHint prefetch_hint) noexcept { _annotation.set(prefetch_hint); } - /** * Annotate the task with a desired channel the task should be executed on. * - * @param worker_id ID of the channel. + * @param channel_id ID of the channel. */ - void annotate(const std::uint16_t worker_id) noexcept { _annotation.set(worker_id); } + void annotate(const channel channel_id) noexcept { _annotation.target = channel_id; } /** * Annotate the task with a desired NUMA node id the task should executed on. * * @param node_id ID of the NUMA node. */ - void annotate(const std::uint8_t node_id) noexcept { _annotation.set(node_id); } + void annotate(const node node_id) noexcept { _annotation.target = node_id; } /** * Annotate the task with a run priority (low, normal, high). * * @param priority_ Priority the task should run with. */ - void annotate(const priority priority_) noexcept { _annotation.set(priority_); } - - /** - * Copy annotations from other task to this one. - * - * @param other Other task to copy annotations from. - */ - void annotate(TaskInterface *other) noexcept { _annotation = other->_annotation; } - - /** - * Copy annotation to this one. - * - * @param annotation - */ - void annotate(const auto &annotation) noexcept { _annotation = annotation; } - - /** - * Annotate the task to execute on a specific destination. - * - * @param execution_destination Destination to execute on. - */ - void annotate(const Annotation::execution_destination execution_destination) noexcept - { - _annotation.set(execution_destination); - } + void annotate(const priority priority_) noexcept { _annotation.priority = priority_; } /** * Annotate the task whether it is a reading or writing task. * * @param is_readonly True, when the task is read only (false by default). */ - void annotate(const Annotation::access_intention access_intention) noexcept { _annotation.set(access_intention); } + void is_readonly(const bool is_readonly) noexcept { _annotation.is_readonly = is_readonly; } + + /** + * @return The annotated resource. + */ + [[nodiscard]] mx::resource::ptr annotated_resource() const noexcept + { + return std::get<0>(std::get(_annotation.target)); + } + + /** + * @return The annotated resource size. + */ + [[nodiscard]] std::uint16_t annotated_resource_size() const noexcept + { + return std::get<1>(std::get(_annotation.target)); + } + + /** + * @return The annotated channel. + */ + [[nodiscard]] channel annotated_channel() const noexcept { return std::get(_annotation.target); } + + /** + * @return The annotated NUMA node id. + */ + [[nodiscard]] node annotated_node() const noexcept { return std::get(_annotation.target); } + + /** + * @return Annotated priority. + */ + [[nodiscard]] enum priority priority() const noexcept { return _annotation.priority; } + + /** + * @return True, when the task is a read only task. + */ + [[nodiscard]] bool is_readonly() const noexcept { return _annotation.is_readonly; } + + /** + * @return True, when the task has a resource annotated. + */ + [[nodiscard]] bool has_resource_annotated() const noexcept + { + return std::holds_alternative(_annotation.target); + } + + /** + * @return True, when the task has a channel annotated. + */ + [[nodiscard]] bool has_channel_annotated() const noexcept + { + return std::holds_alternative(_annotation.target); + } + + /** + * @return True, when the task has a NUMA node annotated. + */ + [[nodiscard]] bool has_node_annotated() const noexcept { return std::holds_alternative(_annotation.target); } /** * @return Pointer to the next task in spawn queue. @@ -258,73 +229,41 @@ public: void next(TaskInterface *next) noexcept { _next = next; } private: - /// Pointer for next task in queue. + /** + * Annotation of a task. + */ + class annotation + { + public: + constexpr annotation() noexcept = default; + ~annotation() = default; + + // Is the task just reading? + bool is_readonly{false}; + + // Priority of a task. + enum priority priority + { + priority::normal + }; + + // Target the task will run on. + std::variant target{false}; + } __attribute__((packed)); + + // Pointer for next task in queue. TaskInterface *_next{nullptr}; - /// Tasks annotations. - class Annotation _annotation - { - }; -}; - -class LambdaTask : public TaskInterface -{ -public: - LambdaTask(std::function &&callback) noexcept : _callback(std::move(callback)) {} - - LambdaTask(std::function &&callback) noexcept - : LambdaTask([callback = std::move(callback)](const std::uint16_t /*worker_id*/) { - callback(); - return TaskResult::make_remove(); - }) - { - } - - ~LambdaTask() noexcept override = default; - - TaskResult execute(std::uint16_t worker_id) override { return _callback(worker_id); } - -private: - std::function _callback; -}; - -class TaskLine : public TaskInterface -{ -public: - TaskLine() noexcept = default; - ~TaskLine() noexcept override = default; - - TaskResult execute(std::uint16_t worker_id) override; - - void add(TaskInterface *task) - { - if (_next_task == nullptr) - { - _next_task = task; - annotate(task); - } - else - { - _waiting_tasks.push_back(task); - } - } - - [[nodiscard]] bool empty() const noexcept { return _next_task == nullptr; } - -private: - TaskInterface *_next_task; - queue::List _waiting_tasks; + // Tasks annotations. + annotation _annotation; }; class StopTaskingTask final : public TaskInterface { public: - constexpr StopTaskingTask(const bool stop_network) noexcept : _stop_network(stop_network) {} + constexpr StopTaskingTask() noexcept = default; ~StopTaskingTask() override = default; - TaskResult execute(std::uint16_t worker_id) override; - -private: - const bool _stop_network; + TaskResult execute(std::uint16_t /*core_id*/, std::uint16_t /*channel_id*/) override; }; } // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_buffer.h b/repos/ealanos/src/lib/mx/tasking/task_buffer.h index 2d4683d3b4..70149b21c6 100644 --- a/repos/ealanos/src/lib/mx/tasking/task_buffer.h +++ b/repos/ealanos/src/lib/mx/tasking/task_buffer.h @@ -1,15 +1,10 @@ #pragma once #include "load.h" -#include "prefetch_distance.h" #include "prefetch_slot.h" #include "task.h" -#include "task_cycle_sampler.h" -#include "task_execution_time_history.h" #include #include -#include #include -#include #include namespace mx::tasking { @@ -20,40 +15,18 @@ namespace mx::tasking { */ template class TaskBuffer { -public: +private: class Slot { public: constexpr Slot() noexcept = default; ~Slot() noexcept = default; - /** - * Assigns the task for execution to this slot. - * @param task Task that should be executed when the task buffer reaches this slot. - */ void task(TaskInterface *task) noexcept { _task = task; } + [[nodiscard]] TaskInterface *consume_task() noexcept { return std::exchange(_task, nullptr); } - [[nodiscard]] TaskInterface *task() const noexcept { return _task; } - - /** - * Consumes the task of this slot and returns it. - * @return Task that should be executed. - */ - [[nodiscard]] TaskInterface *get() noexcept { return std::exchange(_task, nullptr); } - - /** - * Executes the prefetch instructions (the task descriptor and its assigned resource). - */ - void prefetch() noexcept { _prefetch_slot.prefetch(); } - - /** - * Sets the given task for prefetching when the task buffer reaches this slot. - * @param task Task that should be prefetched (both task descriptor and resource). - */ - void prefetch(const resource::ptr resource, const PrefetchDescriptor descriptor) noexcept - { - _prefetch_slot.assign(resource, descriptor); - } + void prefetch() noexcept { _prefetch_slot(); } + void prefetch(TaskInterface *task) noexcept { _prefetch_slot = task; } bool operator==(std::nullptr_t) const noexcept { return _task == nullptr; } bool operator!=(std::nullptr_t) const noexcept { return _task != nullptr; } @@ -64,8 +37,7 @@ public: }; public: - constexpr explicit TaskBuffer(const PrefetchDistance prefetch_distance) noexcept - : _prefetch_distance(prefetch_distance) + constexpr explicit TaskBuffer(const std::uint8_t prefetch_distance) noexcept : _prefetch_distance(prefetch_distance) { } ~TaskBuffer() noexcept = default; @@ -86,26 +58,17 @@ public: /** * @return Number of maximal tasks of the buffer. */ - [[nodiscard]] constexpr auto max_size() const noexcept { return S; } + constexpr auto max_size() const noexcept { return S; } /** * @return Number of free slots. */ [[nodiscard]] std::uint16_t available_slots() const noexcept { return S - size(); } - Slot &next() noexcept - { - auto &slot = this->_buffer[this->_head]; - this->_head = TaskBuffer::normalize(this->_head + 1U); - return slot; - } - - [[nodiscard]] TaskInterface *task(const std::uint16_t index) const noexcept - { - return this->_buffer[TaskBuffer::normalize(this->_head + index)].task(); - } - - [[nodiscard]] TaskInterface *head() const noexcept { return this->_buffer[this->_head].task(); } + /** + * @return The next task in the buffer; the slot will be available after. + */ + TaskInterface *next() noexcept; /** * Takes out tasks from the given queue and inserts them into the buffer. @@ -115,46 +78,25 @@ public: */ template std::uint16_t fill(Q &from_queue, std::uint16_t count) noexcept; - [[nodiscard]] std::uint8_t refill_treshold() const noexcept - { - if (this->_prefetch_distance.is_enabled()) - { - return this->_prefetch_distance.is_automatic() ? this->_task_cycles.size() - : this->_prefetch_distance.fixed_distance(); - } - - return 0U; - } - - [[nodiscard]] bool is_prefetching_enabled() const noexcept { return this->_prefetch_distance.is_enabled(); } - - [[nodiscard]] TaskCycleSampler &sampler() noexcept { return _task_cycle_sampler; } - private: - /// Prefetch distance. - const PrefetchDistance _prefetch_distance; + // Prefetch distance. + const std::uint8_t _prefetch_distance; - /// Index of the first element in the buffer. + // Index of the first element in the buffer. std::uint16_t _head{0U}; - /// Index of the last element in the buffer. + // Index of the last element in the buffer. std::uint16_t _tail{0U}; - /// Array with task-slots. + // Array with task-slots. std::array _buffer{}; - /// History of last cycles for the last dispatched tasks. - TaskExecutionTimeHistory _task_cycles; - - /// Sample for monitoring task cycles. - TaskCycleSampler _task_cycle_sampler; - /** * Normalizes the index with respect to the size. * @param index Index. * @return Normalized index. */ - [[nodiscard]] static std::uint16_t normalize(const std::uint16_t index) noexcept { return index & (S - 1U); } + static std::uint16_t normalize(const std::uint16_t index) noexcept { return index & (S - 1U); } /** * Normalizes the index backwards with respect to the given offset. @@ -162,44 +104,28 @@ private: * @param offset Offset to index. * @return Normalized index. */ - [[nodiscard]] static std::uint16_t normalize_backward(const std::uint16_t index, - const std::uint16_t offset) noexcept + static std::uint16_t normalize_backward(const std::uint16_t index, const std::uint16_t offset) noexcept { - const auto diff = std::int32_t(index) - std::int32_t(offset); - return diff + (static_cast(index < offset) * S); - } - - /** - * Calculates the number of to-prefeteched cache lines from a given descriptor. - * - * @param descriptor Descriptor describing the prefetch. - * @return Number of cache lines to prefetch. - */ - [[nodiscard]] static std::uint16_t prefetched_cache_lines(const PrefetchDescriptor descriptor) noexcept - { - const auto descriptor_id = descriptor.id(); - const auto data = descriptor.data_without_descriptor_bits(); - switch (descriptor_id) - { - case PrefetchDescriptor::SizeNonTemporal: - case PrefetchDescriptor::SizeTemporal: - case PrefetchDescriptor::SizeWrite: - return (PrefetchSizeView{data}.get()) / system::cache::line_size(); - case PrefetchDescriptor::CallbackAny: - return (PrefetchCallbackView{data}.size()) / system::cache::line_size(); - case PrefetchDescriptor::MaskNonTemporal: - case PrefetchDescriptor::MaskTemporal: - case PrefetchDescriptor::MaskWrite: - return PrefetchMaskView{data}.count(); - case PrefetchDescriptor::None: - return 0U; - } + return index >= offset ? index - offset : S - (offset - index); } }; +template TaskInterface *TaskBuffer::next() noexcept +{ + auto &slot = this->_buffer[this->_head]; + if (slot != nullptr) + { + slot.prefetch(); + this->_head = TaskBuffer::normalize(this->_head + 1U); + return slot.consume_task(); + } + + return nullptr; +} + template template -std::uint16_t TaskBuffer::fill(Q &from_queue, std::uint16_t count) noexcept +std::uint16_t TaskBuffer::fill(Q &from_queue, const std::uint16_t count) noexcept { if (count == 0U || from_queue.empty()) { @@ -207,134 +133,29 @@ std::uint16_t TaskBuffer::fill(Q &from_queue, std::uint16_t count) noexcept } const auto size = S - count; - TaskInterface *task; + const auto is_prefetching = this->_prefetch_distance > 0U; + auto prefetch_tail = TaskBuffer::normalize_backward(this->_tail, this->_prefetch_distance); - if constexpr (std::is_same>::value) + for (auto i = 0U; i < count; ++i) { - std::tie(task, count) = from_queue.pop_front(count); - } - - /// Prefetching at all. - if (this->_prefetch_distance.is_enabled()) - { - /// Prefetching with automatic calculated prefetch distance - /// based on annotated cycles. - if (this->_prefetch_distance.is_automatic()) + auto *task = static_cast(from_queue.pop_front()); + if (task == nullptr) { - for (auto i = 0U; i < count; ++i) - { - if constexpr (std::is_same>::value == false) - { - task = static_cast(from_queue.pop_front()); - if (task == nullptr) - { - return i; - } - } - - /// Location where the task will be scheduled. - const auto task_buffer_index = this->_tail; - - /// Schedule the task to the end of the task buffer. - this->_buffer[task_buffer_index].task(task); - - /// Increment tail for the next task. - this->_tail = TaskBuffer::normalize(task_buffer_index + 1U); - - /// Schedule prefetch instruction slots before. - if (task->annotation().has_prefetch_hint()) - { - const auto &hint = task->annotation().prefetch_hint(); - - /// Calculate cycles needed by the prefetch (|lines| * fixed latency). - const auto prefetched_cache_lines = TaskBuffer::prefetched_cache_lines(hint.descriptor()); - const auto needed_cycles_latency = - prefetched_cache_lines * memory::config::latency_per_prefetched_cache_line(); - - /// Go back (towards head) until latency is hidden by task executions. - const auto prefetch_distance = this->_task_cycles.prefetch_distance(needed_cycles_latency); - - /// Schedule the prefetch to tail - prefetch distance. - this->_buffer[TaskBuffer::normalize_backward(task_buffer_index, prefetch_distance)].prefetch( - hint.resource(), hint.descriptor()); - } - - /// Push task cycles (either monitored or annotated) to the history. - const auto task_cycles = this->_task_cycle_sampler.cycles(task); - this->_task_cycles.push(task_cycles); - - if constexpr (std::is_same>::value) - { - task = task->next(); - } - } + return i; } - /// Prefetching with fixed prefetch distance. - else + // Schedule prefetch instruction slots before. + if (is_prefetching && (size + i) >= this->_prefetch_distance) { - auto prefetch_tail = - TaskBuffer::normalize_backward(this->_tail, this->_prefetch_distance.fixed_distance()); - - for (auto i = 0U; i < count; ++i) - { - if constexpr (std::is_same>::value == false) - { - task = static_cast(from_queue.pop_front()); - if (task == nullptr) - { - return i; - } - } - - /// Schedule task. - this->_buffer[this->_tail].task(task); - - /// Increment tail. - this->_tail = TaskBuffer::normalize(this->_tail + 1U); - - /// Schedule prefetch instruction slots before. - if (size + i >= this->_prefetch_distance.fixed_distance() && task->annotation().has_prefetch_hint()) - { - const auto &hint = task->annotation().prefetch_hint(); - this->_buffer[prefetch_tail].prefetch(hint.resource(), hint.descriptor()); - } - - /// Increment prefetch tail. - prefetch_tail = TaskBuffer::normalize(prefetch_tail + 1U); - - if constexpr (std::is_same>::value) - { - task = task->next(); - } - } + this->_buffer[prefetch_tail].prefetch(task); } - } - else - { - /// No prefetching. - for (auto i = 0U; i < count; ++i) - { - if constexpr (std::is_same>::value == false) - { - task = static_cast(from_queue.pop_front()); - if (task == nullptr) - { - return i; - } - } - /// Schedule task. - this->_buffer[this->_tail].task(task); + // Schedule task. + this->_buffer[this->_tail].task(task); - /// Increment tail. - this->_tail = TaskBuffer::normalize(this->_tail + 1U); - - if constexpr (std::is_same>::value) - { - task = task->next(); - } - } + // Increment tail. + this->_tail = TaskBuffer::normalize(this->_tail + 1U); + prefetch_tail = TaskBuffer::normalize(prefetch_tail + 1U); } return count; diff --git a/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h b/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h deleted file mode 100644 index d071ef2451..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h +++ /dev/null @@ -1,127 +0,0 @@ -#pragma once - -#include "config.h" -#include "task.h" -#include -#include -#include -#include - -namespace mx::tasking { -class TaskCycleSampler -{ -private: - class Sample - { - public: - constexpr Sample() noexcept = default; - - explicit Sample(const std::uint64_t cycles) noexcept : _count(1U), _cycles(cycles), _average_cycles(cycles) {} - - Sample(const std::uint32_t count, const std::uint64_t cycles) noexcept - : _count(count), _cycles(cycles), _average_cycles(cycles / count) - { - } - - ~Sample() noexcept = default; - - void add(const std::uint32_t cycles) noexcept - { - ++_count; - _cycles += cycles; - _average_cycles = _cycles / _count; - } - - [[nodiscard]] std::uint32_t average() const noexcept { return _average_cycles; } - - [[nodiscard]] std::uint64_t count() const noexcept { return _count; } - - [[nodiscard]] std::uint64_t cycles() const noexcept { return _cycles; } - - private: - /// Number of how many times this task was sampled. - std::uint64_t _count{0U}; - - /// Number of cycles sampled for this task. - std::uint64_t _cycles{0U}; - - /// Number of cycles in average (_count/_cycles). - std::uint32_t _average_cycles{0U}; - }; - -public: - TaskCycleSampler() { _task_cycles.reserve(16U); } - - ~TaskCycleSampler() = default; - - void add(const std::uint64_t task_id, const std::uint64_t cycles) - { - if (task_id != 0U) - { - if (auto iterator = _task_cycles.find(task_id); iterator != _task_cycles.end()) - { - iterator.value().add(cycles); - } - else - { - _task_cycles.insert(std::make_pair(task_id, Sample{cycles})); - } - } - } - - [[nodiscard]] std::uint32_t cycles(TaskInterface *task) const - { - if constexpr (config::is_monitor_task_cycles_for_prefetching()) - { - const auto trace_id = task->trace_id(); - if (const auto iterator = _task_cycles.find(trace_id); iterator != _task_cycles.end()) - { - return iterator.value().average(); - } - } - - return task->annotation().cycles(); - } - - void dump() - { - for (const auto &task : _task_cycles) - { - std::cout << task.first << " = " << task.second.average() << "(" << task.second.cycles() << "/" - << task.second.count() << ")" << std::endl; - } - } - - [[nodiscard]] std::unordered_map get() const noexcept - { - auto cycles = std::unordered_map{}; - - for (const auto &task : _task_cycles) - { - cycles.insert(std::make_pair(task.first, task.second)); - } - - return cycles; - } - -private: - class Hash - { - public: - std::size_t operator()(std::uint64_t key) const noexcept - { - key ^= key >> 33U; - key *= std::uint64_t(0xff51afd7ed558ccd); - key ^= key >> 33U; - - // key *= std::uint64_t(0xc4ceb9fe1a85ec53); - // key ^= key >> 33U; - - return static_cast(key); - } - }; - - /// List of all tasks, (their average cycles, total number of sampled executions and total cycles during execution). - tsl::robin_map _task_cycles; -}; -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h b/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h deleted file mode 100644 index 44d1886af1..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -#include - -#ifdef USE_AVX2 -#include -#else -#include -#include -#endif - -namespace mx::tasking { -#ifdef USE_AVX2 -class TaskExecutionTimeHistory -{ -public: - TaskExecutionTimeHistory() noexcept { _history = _mm256_setzero_si256(); } - - ~TaskExecutionTimeHistory() noexcept = default; - - [[nodiscard]] constexpr std::uint8_t size() const noexcept { return 8U; } - - [[nodiscard]] std::uint8_t prefetch_distance(const std::uint32_t needed_cycles) noexcept - { - const auto needed_cycles_vector = _mm256_set1_epi32(std::int32_t(needed_cycles)); - - /// Compare each item in the histry if the slot covers the needed cycles. - const auto compared_cycles = _mm256_cmpgt_epi32(needed_cycles_vector, _history); - - /// Count the slots needed. - const auto mask = _mm256_movemask_epi8(compared_cycles); - const auto pop_count = _mm_popcnt_u32(mask); - const auto prefetch_distance = pop_count >> 2U; - - return prefetch_distance; - } - - void push(const std::uint32_t cycles) noexcept - { - /// Shift out the last task. - const auto shifted = _mm256_alignr_epi8(_mm256_permute2x128_si256(_history, _history, 0x81), _history, 4); - - /// Add the task's cycles to the history. - _history = _mm256_add_epi32(shifted, _mm256_set1_epi32(cycles)); - } - -private: - /// Last 8 task cycles (summed up = index(0) next task, index(1) = index(0) + next next task, etc.) - alignas(64) __m256i _history; -}; -#else -class TaskExecutionTimeHistory -{ -public: - TaskExecutionTimeHistory() noexcept = default; - - ~TaskExecutionTimeHistory() noexcept = default; - - [[nodiscard]] constexpr std::uint8_t size() const noexcept { return 8U; } - - [[nodiscard]] std::uint8_t prefetch_distance(const std::uint32_t needed_cycles) noexcept - { - auto cycles = _history[7U]; - for (auto i = 6; i > 0; --i) - { - if (cycles >= needed_cycles) - { - return 8 - (i + 1); - } - - cycles += _history[i]; - } - - return 8; - } - - void push(const std::uint32_t cycles) noexcept - { - - /// Shift out the last task. - std::rotate(_history.begin(), _history.begin() + 1, _history.end()); - - /// Add the task's cycles to the history. - _history[7U] = cycles; - } - -private: - /// Last 8 task cycles (summed up = index(0) next task, index(1) = index(0) + next next task, etc.) - alignas(64) std::array _history{0U}; -}; -#endif -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_pool.h b/repos/ealanos/src/lib/mx/tasking/task_pool.h deleted file mode 100644 index ed81b95dba..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_pool.h +++ /dev/null @@ -1,107 +0,0 @@ -#pragma once - -#include "config.h" -#include "task.h" -#include "task_buffer.h" -#include "task_pool_occupancy.h" -#include "task_queues.h" -#include -#include -#include -#include -#include - -namespace mx::tasking { -class alignas(64) TaskPool -{ -public: - explicit TaskPool(const std::uint16_t count_workers, const std::uint16_t worker_id, const std::uint8_t numa_id) - : _queues(worker_id, numa_id, count_workers) - { - } - - [[nodiscard]] std::uint64_t withdraw(TaskBuffer &task_buffer) noexcept - { - // Fill with normal prioritized. - const auto size = _queues.fill(task_buffer, task_buffer.available_slots()); - - // Fill with low prioritized. - if (task_buffer.empty()) [[unlikely]] - { - return _queues.fill(task_buffer, config::task_buffer_size()); - } - - return size; - } - - /** - * Schedules the task to thread-safe queue with regard to the NUMA region - * of the producer. Producer of different NUMA regions should not share - * a single queue. - * @param task Task to be scheduled. - * @param local_numa_node_id NUMA region of the producer. - * @param local_worker_id Worker ID of the producer. - */ - void push_back_remote(TaskInterface *task, const std::uint8_t local_numa_node_id, - const std::uint16_t local_worker_id) noexcept - { - _queues.push_back_remote(task, local_numa_node_id, local_worker_id); - } - - /** - * Schedules a task to the local queue, which is not thread-safe. Only - * the channel owner should spawn tasks this way. - * @param task Task to be scheduled. - */ - void push_back_local(TaskInterface *task) noexcept { _queues.push_back_local(task); } - - /** - * Schedules a task to the local queue, which is not thread-safe. Only - * the channel owner should spawn tasks this way. - * @param first First task to be scheduled. - * @param last Last task of the list. - */ - void push_back_local(TaskInterface *first, TaskInterface *last) noexcept { _queues.push_back_local(first, last); } - - /** - * Adds usage prediction of a resource to this channel. - * @param usage Predicted usage. - */ - void predict_usage(const mx::resource::expected_access_frequency usage) noexcept { _occupancy.predict(usage); } - - /** - * Updates the usage prediction of this channel. - * @param old_prediction So far predicted usage. - * @param new_prediction New predicted usage. - */ - void modify_predicted_usage(const mx::resource::expected_access_frequency old_prediction, - const mx::resource::expected_access_frequency new_prediction) noexcept - { - _occupancy.revoke(old_prediction); - _occupancy.predict(new_prediction); - } - - /** - * @return Aggregated predicted usage. - */ - [[nodiscard]] mx::resource::expected_access_frequency predicted_usage() const noexcept - { - return static_cast(_occupancy); - } - - /** - * @return True, whenever min. one prediction was "excessive". - */ - [[nodiscard]] bool has_excessive_usage_prediction() const noexcept - { - return _occupancy.has_excessive_usage_prediction(); - } - -private: - /// Backend queues. - TaskQueues _queues; - - // Holder of resource predictions of this channel. - alignas(64) TaskPoolOccupancy _occupancy; -}; -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_queues.h b/repos/ealanos/src/lib/mx/tasking/task_queues.h deleted file mode 100644 index 441d07ca6c..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_queues.h +++ /dev/null @@ -1,168 +0,0 @@ -#pragma once - -#include "config.h" -#include "task.h" -#include "task_buffer.h" -#include -#include -#include -#include - -namespace mx::tasking { -template class TaskQueues -{ -}; - -template <> class TaskQueues -{ -public: - TaskQueues(const std::uint16_t /*worker_id*/, const std::uint8_t /*numa_node_id*/, - const std::uint16_t /*count_workers*/) - { - } - ~TaskQueues() = default; - - void push_back_remote(TaskInterface *task, const std::uint8_t /*numa_node_id*/, - const std::uint16_t /*local_worker_id*/) noexcept - { - _queue.get(task->annotation().priority()).push_back(task); - } - - void push_back_local(TaskInterface *task) noexcept { _queue.get(task->annotation().priority()).push_back(task); } - - void push_back_local(TaskInterface *first, TaskInterface *last) noexcept - { - _queue.get(first->annotation().priority()).push_back(first, last); - } - - template - [[nodiscard]] std::uint64_t fill(TaskBuffer &task_buffer, - std::uint64_t available) noexcept - { - available -= task_buffer.template fill(_queue.template get

(), available); - return task_buffer.max_size() - available; - } - -private: - using MPSC = queue::PriorityQueue, priority::low, priority::normal>; - - /// Single queue per worker. - MPSC _queue; -}; - -template <> class TaskQueues -{ -public: - TaskQueues(const std::uint16_t /*worker_id*/, const std::uint8_t numa_node_id, - const std::uint16_t /*count_workers*/) - : _numa_node_id(numa_node_id) - { - } - ~TaskQueues() = default; - - void push_back_remote(TaskInterface *task, const std::uint8_t numa_node_id, - const std::uint16_t /*local_worker_id*/) noexcept - { - _remote_queues[numa_node_id].get(task->annotation().priority()).push_back(task); - } - - void push_back_local(TaskInterface *task) noexcept - { - _local_queue.get(task->annotation().priority()).push_back(task); - } - - void push_back_local(TaskInterface *first, TaskInterface *last) noexcept - { - _local_queue.get(first->annotation().priority()).push_back(first, last); - } - - template - [[nodiscard]] std::uint64_t fill(TaskBuffer &task_buffer, - std::uint64_t available) noexcept - { - // 1) Fill up from the local queue. - available -= task_buffer.fill(_local_queue.get

(), available); - - if (available > 0U) - { - // 2) Fill up from remote queues; start with the NUMA-local one. - for (auto numa_index = 0U; numa_index < memory::config::max_numa_nodes(); ++numa_index) - { - static_assert((memory::config::max_numa_nodes() & (memory::config::max_numa_nodes() - 1U)) == 0U); - - const auto numa_id = (_numa_node_id + numa_index) & (memory::config::max_numa_nodes() - 1U); - available -= task_buffer.fill(_remote_queues[numa_id].get

(), available); - } - } - - return task_buffer.max_size() - available; - } - -private: - using List = queue::PriorityQueue, priority::low, priority::normal>; - using MPSC = queue::PriorityQueue, priority::low, priority::normal>; - - const std::uint8_t _numa_node_id; - - // Backend queues for a single producer (owning worker thread) and different priorities. - List _local_queue; - - // Backend queues for multiple produces in different NUMA regions and different priorities, - alignas(64) std::array _remote_queues; -}; - -template <> class TaskQueues -{ -public: - TaskQueues(const std::uint16_t worker_id, const std::uint8_t /*numa_node_id*/, const std::uint16_t count_workers) - : _worker_id(worker_id), _count_workers(count_workers) - { - } - ~TaskQueues() = default; - - void push_back_remote(TaskInterface *task, const std::uint8_t /*numa_node_id*/, - const std::uint16_t local_worker_id) noexcept - { - _queues[local_worker_id].get(task->annotation().priority()).push_back(task); - } - - void push_back_local(TaskInterface *task) noexcept - { - _queues[_worker_id].get(task->annotation().priority()).push_back(task); - } - - void push_back_local(TaskInterface *first, TaskInterface *last) noexcept - { - _queues[_worker_id].get(first->annotation().priority()).push_back(first, last); - } - - template - [[nodiscard]] std::uint64_t fill(TaskBuffer &task_buffer, - std::uint64_t available) noexcept - { - auto worker_id = _worker_id; - for (auto i = 0U; i < _count_workers; ++i) - { - const auto target_worker_id = (worker_id + i) % _count_workers; - available -= task_buffer.fill(_queues[target_worker_id].get

(), available); - - if (available == 0U) - { - return task_buffer.max_size(); - } - } - - return task_buffer.max_size() - available; - } - -private: - using MPSC = queue::PriorityQueue, priority::low, priority::normal>; - - const std::uint16_t _worker_id; - const std::uint16_t _count_workers; - - // One queue per worker. - std::array _queues; -}; - -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_squad.cpp b/repos/ealanos/src/lib/mx/tasking/task_squad.cpp deleted file mode 100644 index 94371cab23..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_squad.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "task_squad.h" -#include "runtime.h" - -using namespace mx::tasking; - -void TaskSquad::flush() noexcept -{ - auto [first, last] = this->_remote_queue.pop(); - if (first != nullptr) - { - if (last != nullptr) - { - this->_local_queue.push_back(first, last); - } - else - { - this->_local_queue.push_back(first); - } - } -} - -TaskResult TaskSquadSpawnTask::execute(std::uint16_t worker_id) -{ - this->_task_squad.flush(); - - /// Get all tasks. - auto [first, last] = this->_task_squad._local_queue.pop(); - if (first != nullptr) - { - if (last != nullptr) - { - runtime::spawn(*first, *last, worker_id); - } - else - { - first->annotate(Annotation::execution_destination::local); - runtime::spawn(*first, worker_id); - } - } - - return TaskResult::make_remove(); -} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_squad.d b/repos/ealanos/src/lib/mx/tasking/task_squad.d deleted file mode 100644 index ddc11ecace..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_squad.d +++ /dev/null @@ -1,641 +0,0 @@ -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.d: \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.cpp \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ - /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ - /home/mml/genode-igb/repos/base/include/base/output.h \ - /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ - /home/mml/genode-igb/repos/base/include/base/lock.h \ - /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ - /home/mml/genode-igb/repos/base/include/util/attempt.h \ - /home/mml/genode-igb/repos/base/include/base/capability.h \ - /home/mml/genode-igb/repos/base/include/util/string.h \ - /home/mml/genode-igb/repos/base/include/util/misc_math.h \ - /home/mml/genode-igb/repos/base/include/cpu/string.h \ - /home/mml/genode-igb/repos/base/include/base/rpc.h \ - /home/mml/genode-igb/repos/base/include/util/meta.h \ - /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ - /home/mml/genode-igb/repos/base/include/base/thread.h \ - /home/mml/genode-igb/repos/base/include/base/blockade.h \ - /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ - /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ - /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ - /home/mml/genode-igb/repos/base/include/base/thread_state.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ - /home/mml/genode-igb/repos/base/include/base/signal.h \ - /home/mml/genode-igb/repos/base/include/util/list.h \ - /home/mml/genode-igb/repos/base/include/base/semaphore.h \ - /home/mml/genode-igb/repos/base/include/util/fifo.h \ - /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ - /home/mml/genode-igb/repos/base/include/session/session.h \ - /home/mml/genode-igb/repos/base/include/base/session_label.h \ - /home/mml/genode-igb/repos/base/include/util/arg_string.h \ - /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ - /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ - /home/mml/genode-igb/repos/base/include/base/allocator.h \ - /home/mml/genode-igb/repos/base/include/util/register.h \ - /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ - /home/mml/genode-igb/repos/base/include/base/env.h \ - /home/mml/genode-igb/repos/base/include/parent/parent.h \ - /home/mml/genode-igb/repos/base/include/base/id_space.h \ - /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ - /home/mml/genode-igb/repos/base/include/session/capability.h \ - /home/mml/genode-igb/repos/base/include/root/capability.h \ - /home/mml/genode-igb/repos/base/include/root/root.h \ - /home/mml/genode-igb/repos/base/include/base/entrypoint.h \ - /home/mml/genode-igb/repos/base/include/util/reconstructible.h \ - /home/mml/genode-igb/repos/base/include/util/construct_at.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_server.h \ - /home/mml/genode-igb/repos/base/include/base/ipc.h \ - /home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h \ - /home/mml/genode-igb/repos/base/include/base/object_pool.h \ - /home/mml/genode-igb/repos/base/include/base/weak_ptr.h \ - /home/mml/genode-igb/repos/base/include/base/trace/events.h \ - /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ - /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ - /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ - /home/mml/genode-igb/repos/base/include/dataspace/client.h \ - /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ - /home/mml/genode-igb/repos/base/include/base/heap.h \ - /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ - /home/mml/genode-igb/repos/base/include/base/tslab.h \ - /home/mml/genode-igb/repos/base/include/base/slab.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: - -/home/mml/genode-igb/repos/base/include/base/stdint.h: - -/home/mml/genode-igb/repos/base/include/base/log.h: - -/home/mml/genode-igb/repos/base/include/base/output.h: - -/home/mml/genode-igb/repos/base/include/util/interface.h: - -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: - -/home/mml/genode-igb/repos/base/include/base/lock.h: - -/home/mml/genode-igb/repos/base/include/util/noncopyable.h: - -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: - -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: - -/home/mml/genode-igb/repos/base/include/util/attempt.h: - -/home/mml/genode-igb/repos/base/include/base/capability.h: - -/home/mml/genode-igb/repos/base/include/util/string.h: - -/home/mml/genode-igb/repos/base/include/util/misc_math.h: - -/home/mml/genode-igb/repos/base/include/cpu/string.h: - -/home/mml/genode-igb/repos/base/include/base/rpc.h: - -/home/mml/genode-igb/repos/base/include/util/meta.h: - -/home/mml/genode-igb/repos/base/include/base/native_capability.h: - -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - -/home/mml/genode-igb/repos/base/include/base/thread.h: - -/home/mml/genode-igb/repos/base/include/base/blockade.h: - -/home/mml/genode-igb/repos/base/include/base/trace/logger.h: - -/home/mml/genode-igb/repos/base/include/base/trace/buffer.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/capability.h: - -/home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: - -/home/mml/genode-igb/repos/base/include/base/thread_state.h: - -/home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h: - -/home/mml/genode-igb/repos/base/include/base/signal.h: - -/home/mml/genode-igb/repos/base/include/util/list.h: - -/home/mml/genode-igb/repos/base/include/base/semaphore.h: - -/home/mml/genode-igb/repos/base/include/util/fifo.h: - -/home/mml/genode-igb/repos/base/include/dataspace/capability.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_args.h: - -/home/mml/genode-igb/repos/base/include/session/session.h: - -/home/mml/genode-igb/repos/base/include/base/session_label.h: - -/home/mml/genode-igb/repos/base/include/util/arg_string.h: - -/home/mml/genode-igb/repos/base/include/pd_session/pd_session.h: - -/home/mml/genode-igb/repos/base/include/region_map/region_map.h: - -/home/mml/genode-igb/repos/base/include/base/allocator.h: - -/home/mml/genode-igb/repos/base/include/util/register.h: - -/home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: - -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: - -/home/mml/genode-igb/repos/base/include/util/touch.h: - -/home/mml/genode-igb/repos/base/include/base/env.h: - -/home/mml/genode-igb/repos/base/include/parent/parent.h: - -/home/mml/genode-igb/repos/base/include/base/id_space.h: - -/home/mml/genode-igb/repos/base/include/util/avl_tree.h: - -/home/mml/genode-igb/repos/base/include/session/capability.h: - -/home/mml/genode-igb/repos/base/include/root/capability.h: - -/home/mml/genode-igb/repos/base/include/root/root.h: - -/home/mml/genode-igb/repos/base/include/base/entrypoint.h: - -/home/mml/genode-igb/repos/base/include/util/reconstructible.h: - -/home/mml/genode-igb/repos/base/include/util/construct_at.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_server.h: - -/home/mml/genode-igb/repos/base/include/base/ipc.h: - -/home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h: - -/home/mml/genode-igb/repos/base/include/base/object_pool.h: - -/home/mml/genode-igb/repos/base/include/base/weak_ptr.h: - -/home/mml/genode-igb/repos/base/include/base/trace/events.h: - -/home/mml/genode-igb/repos/base/include/base/trace/policy.h: - -/home/mml/genode-igb/repos/base/include/pd_session/capability.h: - -/home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: - -/home/mml/genode-igb/repos/base/include/dataspace/client.h: - -/home/mml/genode-igb/repos/base/include/base/rpc_client.h: - -/home/mml/genode-igb/repos/base/include/base/heap.h: - -/home/mml/genode-igb/repos/base/include/base/allocator_avl.h: - -/home/mml/genode-igb/repos/base/include/base/tslab.h: - -/home/mml/genode-igb/repos/base/include/base/slab.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: - -/home/mml/genode-igb/repos/libports/include/libc/component.h: diff --git a/repos/ealanos/src/lib/mx/tasking/task_squad.h b/repos/ealanos/src/lib/mx/tasking/task_squad.h deleted file mode 100644 index d0fa5c3e57..0000000000 --- a/repos/ealanos/src/lib/mx/tasking/task_squad.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include "task.h" -#include -#include - -namespace mx::tasking { -class TaskSquadSpawnTask; - -class TaskSquad -{ - friend TaskSquadSpawnTask; - -public: - TaskSquad() = default; - virtual ~TaskSquad() = default; - - void push_back_local(TaskInterface &task) noexcept { _local_queue.push_back(&task); } - - void push_back_remote(TaskInterface &task) noexcept { _remote_queue.push_back(&task); } - - void flush() noexcept; - - [[nodiscard]] TaskInterface *pop_front() { return _local_queue.pop_front(); } - -private: - queue::List _local_queue; - alignas(64) queue::MPSC _remote_queue; -}; - -class TaskSquadSpawnTask final : public TaskInterface -{ -public: - TaskSquadSpawnTask(TaskSquad &squad) : _task_squad(squad) {} - ~TaskSquadSpawnTask() override = default; - TaskResult execute(std::uint16_t worker_id) override; - -private: - TaskSquad &_task_squad; -}; -} // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/task_stack.h b/repos/ealanos/src/lib/mx/tasking/task_stack.h index 6f0f1f4afc..18bd413a69 100644 --- a/repos/ealanos/src/lib/mx/tasking/task_stack.h +++ b/repos/ealanos/src/lib/mx/tasking/task_stack.h @@ -25,7 +25,7 @@ public: * Saves the full task on the stack. * @param task Task to save. */ - void backup(const TaskInterface *task) noexcept + void save(const TaskInterface *task) noexcept { if constexpr (system::Environment::is_sse2() && (config::task_size() == 64U || config::task_size() == 128U)) { @@ -93,33 +93,33 @@ private: #ifdef USE_SSE2 if constexpr (S == 64U) { - __m128i word0 = _mm_loadu_si128(static_cast(src) + 0U); - __m128i word1 = _mm_loadu_si128(static_cast(src) + 1U); - __m128i word2 = _mm_loadu_si128(static_cast(src) + 2U); - __m128i word3 = _mm_loadu_si128(static_cast(src) + 3U); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 0U, word0); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 1U, word1); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 2U, word2); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 3U, word3); + __m128i m0 = _mm_loadu_si128(static_cast(src) + 0U); + __m128i m1 = _mm_loadu_si128(static_cast(src) + 1U); + __m128i m2 = _mm_loadu_si128(static_cast(src) + 2U); + __m128i m3 = _mm_loadu_si128(static_cast(src) + 3U); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 0U, m0); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 1U, m1); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 2U, m2); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 3U, m3); } else if constexpr (S == 128U) { - __m128i word0 = _mm_loadu_si128(static_cast(src) + 0U); - __m128i word1 = _mm_loadu_si128(static_cast(src) + 1U); - __m128i word2 = _mm_loadu_si128(static_cast(src) + 2U); - __m128i word3 = _mm_loadu_si128(static_cast(src) + 3U); - __m128i word4 = _mm_loadu_si128(static_cast(src) + 4U); - __m128i word5 = _mm_loadu_si128(static_cast(src) + 5U); - __m128i word6 = _mm_loadu_si128(static_cast(src) + 6U); - __m128i word7 = _mm_loadu_si128(static_cast(src) + 7U); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 0U, word0); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 1U, word1); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 2U, word2); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 3U, word3); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 4U, word4); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 5U, word5); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 6U, word6); - _mm_storeu_si128(static_cast<__m128i *>(destination) + 7U, word7); + __m128i m0 = _mm_loadu_si128(static_cast(src) + 0U); + __m128i m1 = _mm_loadu_si128(static_cast(src) + 1U); + __m128i m2 = _mm_loadu_si128(static_cast(src) + 2U); + __m128i m3 = _mm_loadu_si128(static_cast(src) + 3U); + __m128i m4 = _mm_loadu_si128(static_cast(src) + 4U); + __m128i m5 = _mm_loadu_si128(static_cast(src) + 5U); + __m128i m6 = _mm_loadu_si128(static_cast(src) + 6U); + __m128i m7 = _mm_loadu_si128(static_cast(src) + 7U); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 0U, m0); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 1U, m1); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 2U, m2); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 3U, m3); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 4U, m4); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 5U, m5); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 6U, m6); + _mm_storeu_si128(static_cast<__m128i *>(destination) + 7U, m7); } #endif } diff --git a/repos/ealanos/src/lib/mx/tasking/worker.cpp b/repos/ealanos/src/lib/mx/tasking/worker.cpp index 949e93dc19..a28fa80342 100644 --- a/repos/ealanos/src/lib/mx/tasking/worker.cpp +++ b/repos/ealanos/src/lib/mx/tasking/worker.cpp @@ -2,194 +2,192 @@ #include "config.h" #include "runtime.h" #include "task.h" +#include "tukija/syscall-generic.h" #include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + using namespace mx::tasking; -Worker::Worker(const std::uint16_t count_workers, const std::uint16_t worker_id, const std::uint16_t target_core_id, - const util::maybe_atomic &is_running, const PrefetchDistance prefetch_distance, +Worker::Worker(const std::uint16_t id, const std::uint16_t target_core_id, const std::uint16_t target_numa_node_id, + const util::maybe_atomic &is_running, util::Field_Allocator &v, std::atomic &e, const std::uint16_t prefetch_distance, memory::reclamation::LocalEpoch &local_epoch, - const std::atomic &global_epoch, - std::optional &statistic, - std::optional &task_tracer) noexcept - : _id(worker_id), _target_core_id(target_core_id), _task_buffer(prefetch_distance), - _task_pool(count_workers, worker_id, system::cpu::node_id(target_core_id)), _local_epoch(local_epoch), - _global_epoch(global_epoch), _task_counter(statistic), _task_tracer(task_tracer), _is_running(is_running) + const std::atomic &global_epoch, profiling::Statistic &statistic) noexcept + : _target_core_id(target_core_id), _target_numa_node_id(target_numa_node_id), _prefetch_distance(prefetch_distance), + _id(id), _rng(std::mt19937(id)), _local_epoch(local_epoch), _global_epoch(global_epoch), + _statistic(statistic), _is_running(is_running), _vacant_channels(v), _excess_queues(e) { } +void Worker::yield_channels(std::uint16_t num, Channel *except) { + + if (!num) + return; + + Channel *chan; + do { + chan = _channels.pop_front(); + if (chan && chan != except) { + //Genode::log("Worker ", _id, " returns channel ", chan->id()); + _vacant_channels.release(chan->id()); + _count_channels--; + } + num--; + } while (num && chan); + if (current && current != except) { + _vacant_channels.release(current->id()); + //Genode::log("Worker ", _id, " returns channel ", current->id()); + + /* If yield_channels is called by the foreman, it is likely that this happenend due to a previous call to runtime::stop. In this case the foreman will release all channels but channel 0. However, it is possible that the foreman called runtime::stop while processing another channel than 0 which after this call will not belong to it anymore. Thus, to avoid having the foreman process a channel that has been yielded and risking nasty race conditions, the foreman takes the last remaining channel (0). */ + if (_id == 0 && current->id() != 0) { + current = _channels.pop_front(); + assert(current != nullptr); + } + else + current = nullptr; + _count_channels--; + } + +} + +Channel* Worker::get(std::uint64_t idx) +{ + return runtime::scheduler().get_channel(idx); +} + void Worker::execute() { - runtime::initialize_worker(this->_id); + /*{ + Genode::Thread *self = Genode::Thread::myself(); + Genode::Affinity::Location loc = system::Environment::location(_target_core_id); - auto trace_start = std::chrono::system_clock::now(); + self->pin(loc); + }*/ - const auto refill_treshold = this->_task_buffer.refill_treshold(); - - while (this->_is_running == false) - { - system::builtin::pause(); + if (_id != 0) { + sleep(); + } else if (_id == 0) /* foreman */ { + Genode::log("Foreman starting"); + current = _channels.pop_front(); } + _is_sleeping = false; - //assert(this->_target_core_id == system::cpu::core_id() && "Worker not pinned to correct core."); - const auto worker_id = this->_id; + //Genode::log("Waiting for hooter"); + wait_for_hooter(); + //Genode::log("Hooter sounded"); - /// Period the task sampler for monitoring task cycles becomes active. - constexpr auto sample_period = 4096U; + _phys_core_id = Tukija::Cip::cip()->get_cpu_index(); + runtime::scheduler().register_worker(this); + //Genode::log("Worker ", _id, "(", _phys_core_id, ")", + // " woke up. is_runnin = ", (_is_running ? "true" : "false")); - /// Store frequently used pool and buffer on the stack. - auto &pool = this->_task_pool; - auto &buffer = this->_task_buffer; - auto &sampler = buffer.sampler(); - const auto is_prefetching_enabled = this->_task_buffer.is_prefetching_enabled(); - auto task_counter = 0U; + TaskInterface *task; + const auto core_id = system::topology::core_id(); - while (this->_is_running) + if (_id == 0) + Genode::log("Foreman uses core_id", core_id); + while (true) { + handle_resume(); + //handle_channel_occupancy(); + while (!current) + { + //Genode::log("Worker ",_id,": No queues for me."); + + unsigned long expect = 0; + bool shall_yield = !__atomic_compare_exchange_n(&(Tukija::Cip::cip()->worker_for_location(Genode::Thread::myself()->affinity()).yield_flag), &expect, 2, false, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED); + if (shall_yield) { + handle_yield(); + continue; + } + deregister(); + sleep(); + handle_resume(); + } + + //Genode::log("Worker ", _id, " is now processing channel ", this->current->id()); if constexpr (config::memory_reclamation() == config::UpdateEpochPeriodically) { this->_local_epoch.enter(this->_global_epoch); } - /// Fill the task buffer with tasks. - auto task_buffer_size = pool.withdraw(buffer); - if constexpr (config::is_use_task_counter()) + auto channel_id = current->id(); + + current->fill(); + + if constexpr (config::task_statistics()) { - this->_task_counter->increment(worker_id); + this->_statistic.increment(channel_id); } - if (task_buffer_size == 0U) [[unlikely]] + while ((task = this->current->next_task()) != nullptr) { - do + // Whenever the worker-local task-buffer falls under + // the prefetch distance, we re-fill the buffer to avoid + // empty slots in the prefetch-buffer. + if (this->current->decrement() <= this->_prefetch_distance) { - mx::system::builtin::pause(); - - task_buffer_size = pool.withdraw(buffer); - if constexpr (config::is_use_task_counter()) + if constexpr (config::memory_reclamation() == config::UpdateEpochPeriodically) { - this->_task_counter->increment(worker_id); + this->_local_epoch.enter(this->_global_epoch); } - } while (task_buffer_size == 0U && this->_is_running); - } - /// Enter epoch when increased periodically. - if constexpr (config::memory_reclamation() == config::UpdateEpochPeriodically) - { - this->_local_epoch.enter(this->_global_epoch); - } - - const auto count_available_tasks = - task_counter + std::max(std::int32_t(task_buffer_size) - refill_treshold, - std::min(std::int32_t(task_buffer_size), std::int32_t(refill_treshold))); - - auto task_trace_id = std::uint64_t(0U); - auto is_sampling = false; - std::uint64_t sample_cycles; - - for (; task_counter < count_available_tasks; ++task_counter) - { - if constexpr (config::is_monitor_task_cycles_for_prefetching()) - { - is_sampling = (task_counter & (sample_period - 1U)) == 0U; - } - - /// Get the next slot with task and prefetch hint. - auto &slot = buffer.next(); - - /// Get the task to execute. - auto *task = slot.get(); - - /// Prefetching - if (is_prefetching_enabled) - { - /// The task executed next and - auto *task_descriptor = buffer.head(); - system::cache::prefetch_range(reinterpret_cast(task_descriptor)); - - /// the data placed in the prefetching buffer - slot.prefetch(); - } - - /// Increase task execution counter. - if constexpr (config::is_use_task_counter()) - { - this->_task_counter->increment(worker_id); - if (task->annotation().has_resource()) + this->current->fill(); + if constexpr (config::task_statistics()) { - if (task->annotation().is_readonly()) + this->_statistic.increment(channel_id); + } + } + + if constexpr (config::task_statistics()) + { + this->_statistic.increment(channel_id); + if (task->has_resource_annotated()) + { + if (task->is_readonly()) { - this->_task_counter->increment(worker_id); + this->_statistic.increment(channel_id); } else { - this->_task_counter->increment(worker_id); + this->_statistic.increment(channel_id); } } } - /// Collect task times, when tracing. - if constexpr (config::is_collect_task_traces()) - { - task_trace_id = task->trace_id(); - trace_start = std::chrono::system_clock::now(); - } - - /// Sample the task, if monitoring. - if constexpr (config::is_monitor_task_cycles_for_prefetching()) - { - if (is_sampling) - { - task_trace_id = task->trace_id(); - sample_cycles = system::RDTSCP::begin(); - } - } - // Based on the annotated resource and its synchronization // primitive, we choose the fitting execution context. auto result = TaskResult{}; switch (Worker::synchronization_primitive(task)) { case synchronization::primitive::ScheduleWriter: - result = this->execute_optimistic(worker_id, task); + result = this->execute_optimistic(core_id, channel_id, task); break; case synchronization::primitive::OLFIT: - result = this->execute_olfit(worker_id, task); + result = this->execute_olfit(core_id, channel_id, task); break; case synchronization::primitive::ScheduleAll: - case synchronization::primitive::Batched: case synchronization::primitive::None: - result = task->execute(worker_id); + result = task->execute(core_id, channel_id); break; case synchronization::primitive::ReaderWriterLatch: - result = Worker::execute_reader_writer_latched(worker_id, task); + result = Worker::execute_reader_writer_latched(core_id, channel_id, task); break; case synchronization::primitive::ExclusiveLatch: - result = Worker::execute_exclusive_latched(worker_id, task); + result = Worker::execute_exclusive_latched(core_id, channel_id, task); break; - case synchronization::primitive::RestrictedTransactionalMemory: - result = Worker::execute_transactional(worker_id, task); - break; - } - - if constexpr (config::is_monitor_task_cycles_for_prefetching()) - { - if (is_sampling) - { - const auto end_sample_cycles = system::RDTSCP::end(); - sampler.add(task_trace_id, end_sample_cycles - sample_cycles); - } - } - - if constexpr (config::is_collect_task_traces()) - { - const auto trace_end = std::chrono::system_clock::now(); - this->_task_tracer->emplace_back(worker_id, task_trace_id, - profiling::TimeRange({trace_start, trace_end})); } // The task-chain may be finished at time the @@ -197,74 +195,83 @@ void Worker::execute() // the successor task. if (result.has_successor()) { - runtime::spawn(*static_cast(result), worker_id); + runtime::spawn(*static_cast(result), channel_id); } - /// Remove the task if requested. if (result.is_remove()) { - runtime::delete_task(worker_id, task); + runtime::delete_task(channel_id, task); } + + handle_yield(); + } - } - // if (worker_id == 0U) - // { - // std::this_thread::sleep_for(std::chrono::milliseconds(250U)); - // for (const auto [id, sample] : sampler.get()) - // { - // std::cout << runtime::task_name(id) << ": " << sample.average() << " (" << sample.cycles() << "/" - // << sample.count() << ")" << std::endl; - // } - // } -} + steal(false); -TaskResult Worker::execute_exclusive_latched(const std::uint16_t worker_id, mx::tasking::TaskInterface *const task) -{ - auto *resource = mx::resource::ptr_cast(task->annotation().resource()); + handle_yield(); + handle_stop(); - { - auto latch = mx::resource::ResourceInterface::scoped_exclusive_latch{resource}; - return task->execute(worker_id); + _channels.push_back(current); + current = _channels.pop_front(); } } -TaskResult Worker::execute_reader_writer_latched(const std::uint16_t worker_id, mx::tasking::TaskInterface *const task) +void Worker::registrate() { + runtime::scheduler().register_worker(this); +} + +void Worker::deregister() { + runtime::scheduler().deregister_worker(); +} + +TaskResult Worker::execute_exclusive_latched(const std::uint16_t core_id, const std::uint16_t channel_id, + mx::tasking::TaskInterface *const task) { - auto *resource = mx::resource::ptr_cast(task->annotation().resource()); + auto *resource = resource::ptr_cast(task->annotated_resource()); + + resource::ResourceInterface::scoped_exclusive_latch _{resource}; + return task->execute(core_id, channel_id); +} + +TaskResult Worker::execute_reader_writer_latched(const std::uint16_t core_id, const std::uint16_t channel_id, + mx::tasking::TaskInterface *const task) +{ + auto *resource = resource::ptr_cast(task->annotated_resource()); // Reader do only need to acquire a "read-only" latch. - if (task->annotation().is_readonly()) + if (task->is_readonly()) { - auto reader_latch = mx::resource::ResourceInterface::scoped_rw_latch{resource}; - return task->execute(worker_id); + resource::ResourceInterface::scoped_rw_latch _{resource}; + return task->execute(core_id, channel_id); } { - auto writer_latch = mx::resource::ResourceInterface::scoped_rw_latch{resource}; - return task->execute(worker_id); + resource::ResourceInterface::scoped_rw_latch _{resource}; + return task->execute(core_id, channel_id); } } -TaskResult Worker::execute_optimistic(const std::uint16_t worker_id, mx::tasking::TaskInterface *const task) +TaskResult Worker::execute_optimistic(const std::uint16_t core_id, const std::uint16_t channel_id, + mx::tasking::TaskInterface *const task) { - auto *optimistic_resource = task->annotation().resource().get(); + auto *optimistic_resource = resource::ptr_cast(task->annotated_resource()); - if (task->annotation().is_readonly()) + if (task->is_readonly()) { // For readers running at a different channel than writer, // we need to validate the version of the resource. This // comes along with saving the tasks state on a stack and // re-running the task, whenever the version check failed. - if (task->annotation().resource().worker_id() != worker_id) + if (task->annotated_resource().channel_id() != channel_id) { - return this->execute_optimistic_read(worker_id, optimistic_resource, task); + return this->execute_optimistic_read(core_id, channel_id, optimistic_resource, task); } // Whenever the task is executed at the same channel // where writing tasks are executed, we do not need to // synchronize because no write can happen. - return task->execute(worker_id); + return task->execute(core_id, channel_id); } // Writers, however, need to acquire the version to tell readers, that @@ -272,18 +279,18 @@ TaskResult Worker::execute_optimistic(const std::uint16_t worker_id, mx::tasking // writing to the resource and even afterwards. Here, we can use a simple // fetch_add operation, because writers are serialized on the channel. { - mx::resource::ResourceInterface::scoped_optimistic_latch writer_latch{optimistic_resource}; - return task->execute(worker_id); + resource::ResourceInterface::scoped_optimistic_latch _{optimistic_resource}; + return task->execute(core_id, channel_id); } } -TaskResult Worker::execute_olfit(const std::uint16_t worker_id, TaskInterface *const task) +TaskResult Worker::execute_olfit(const std::uint16_t core_id, const std::uint16_t channel_id, TaskInterface *const task) { - auto *optimistic_resource = task->annotation().resource().get(); + auto *optimistic_resource = resource::ptr_cast(task->annotated_resource()); - if (task->annotation().is_readonly()) + if (task->is_readonly()) { - return this->execute_optimistic_read(worker_id, optimistic_resource, task); + return this->execute_optimistic_read(core_id, channel_id, optimistic_resource, task); } // Writers, however, need to acquire the version to tell readers, that @@ -291,14 +298,13 @@ TaskResult Worker::execute_olfit(const std::uint16_t worker_id, TaskInterface *c // writing to the resource and even afterwards. Here, we need to use compare // xchg because writers can appear on every channel. { - auto writer_latch = mx::resource::ResourceInterface::scoped_olfit_latch{optimistic_resource}; - return task->execute(worker_id); + resource::ResourceInterface::scoped_olfit_latch _{optimistic_resource}; + return task->execute(core_id, channel_id); } } -TaskResult Worker::execute_optimistic_read(const std::uint16_t worker_id, - mx::resource::ResourceInterface *optimistic_resource, - TaskInterface *const task) +TaskResult Worker::execute_optimistic_read(const std::uint16_t core_id, const std::uint16_t channel_id, + resource::ResourceInterface *optimistic_resource, TaskInterface *const task) { if constexpr (config::memory_reclamation() == config::UpdateEpochOnRead) { @@ -308,12 +314,12 @@ TaskResult Worker::execute_optimistic_read(const std::uint16_t worker_id, // The current state of the task is saved for // restoring if the read operation failed, but // the task was maybe modified. - this->_task_backup_stack.backup(task); + this->_task_stack.save(task); do { const auto version = optimistic_resource->version(); - const auto result = task->execute(worker_id); + const auto result = task->execute(core_id, channel_id); if (optimistic_resource->is_version_valid(version)) { @@ -324,25 +330,8 @@ TaskResult Worker::execute_optimistic_read(const std::uint16_t worker_id, return result; } - if constexpr (config::is_use_task_counter()) - { - if (task->annotation().is_readonly()) - { - this->_task_counter->increment(worker_id); - } - } - // At this point, the version check failed and we need // to re-run the read operation. - this->_task_backup_stack.restore(task); + this->_task_stack.restore(task); } while (true); -} - -TaskResult Worker::execute_transactional(const std::uint16_t worker_id, TaskInterface *task) -{ - auto *resource = task->annotation().resource().get(); - { - auto transaction = mx::resource::ResourceInterface::scoped_transaction{resource}; - return task->execute(worker_id); - } } \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/tasking/worker.d b/repos/ealanos/src/lib/mx/tasking/worker.d index b2013824b2..a2b67d75f5 100644 --- a/repos/ealanos/src/lib/mx/tasking/worker.d +++ b/repos/ealanos/src/lib/mx/tasking/worker.d @@ -1,125 +1,88 @@ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.o /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.d: \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.cpp \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646 \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ - /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ - /home/mml/genode-igb/repos/base/include/base/stdint.h \ - /home/mml/genode-igb/repos/base/include/base/log.h \ - /home/mml/genode-igb/repos/base/include/base/output.h \ - /home/mml/genode-igb/repos/base/include/util/interface.h \ - /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ - /home/mml/genode-igb/repos/base/include/base/mutex.h \ + /home/mml/genode-igb/repos/base/include/base/thread.h \ + /home/mml/genode-igb/repos/base/include/base/exception.h \ + /home/mml/genode-igb/repos/base/include/base/blockade.h \ /home/mml/genode-igb/repos/base/include/base/lock.h \ /home/mml/genode-igb/repos/base/include/util/noncopyable.h \ - /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ - /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ + /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ + /home/mml/genode-igb/repos/base/include/base/stdint.h \ + /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ + /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ /home/mml/genode-igb/repos/base/include/util/attempt.h \ + /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ /home/mml/genode-igb/repos/base/include/base/capability.h \ /home/mml/genode-igb/repos/base/include/util/string.h \ + /home/mml/genode-igb/repos/base/include/base/output.h \ + /home/mml/genode-igb/repos/base/include/util/interface.h \ /home/mml/genode-igb/repos/base/include/util/misc_math.h \ /home/mml/genode-igb/repos/base/include/cpu/string.h \ /home/mml/genode-igb/repos/base/include/base/rpc.h \ /home/mml/genode-igb/repos/base/include/util/meta.h \ /home/mml/genode-igb/repos/base/include/base/native_capability.h \ - /home/mml/genode-igb/repos/base/include/base/exception.h \ - /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ - /home/mml/genode-igb/repos/base/include/base/cache.h \ - /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ - /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ - /home/mml/genode-igb/repos/base/include/base/affinity.h \ - /home/mml/genode-igb/repos/base/include/util/xml_node.h \ - /home/mml/genode-igb/repos/base/include/util/token.h \ - /home/mml/genode-igb/repos/base/include/base/thread.h \ - /home/mml/genode-igb/repos/base/include/base/blockade.h \ - /home/mml/genode-igb/repos/base/include/base/trace/logger.h \ - /home/mml/genode-igb/repos/base/include/base/trace/buffer.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h \ - /home/mml/genode-igb/repos/base/include/cpu_session/capability.h \ /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h \ /home/mml/genode-igb/repos/base/include/base/thread_state.h \ /home/mml/genode-igb/repos/base/include/spec/x86_64/cpu/cpu_state.h \ /home/mml/genode-igb/repos/base/include/base/signal.h \ /home/mml/genode-igb/repos/base/include/util/list.h \ /home/mml/genode-igb/repos/base/include/base/semaphore.h \ + /home/mml/genode-igb/repos/base/include/base/mutex.h \ /home/mml/genode-igb/repos/base/include/util/fifo.h \ + /home/mml/genode-igb/repos/base/include/base/affinity.h \ + /home/mml/genode-igb/repos/base/include/util/xml_node.h \ + /home/mml/genode-igb/repos/base/include/base/log.h \ + /home/mml/genode-igb/repos/base/include/base/buffered_output.h \ + /home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h \ + /home/mml/genode-igb/repos/base/include/util/token.h \ /home/mml/genode-igb/repos/base/include/dataspace/capability.h \ + /home/mml/genode-igb/repos/base/include/dataspace/dataspace.h \ /home/mml/genode-igb/repos/base/include/base/rpc_args.h \ /home/mml/genode-igb/repos/base/include/session/session.h \ + /home/mml/genode-igb/repos/base/include/base/quota_guard.h \ /home/mml/genode-igb/repos/base/include/base/session_label.h \ /home/mml/genode-igb/repos/base/include/util/arg_string.h \ /home/mml/genode-igb/repos/base/include/pd_session/pd_session.h \ /home/mml/genode-igb/repos/base/include/region_map/region_map.h \ + /home/mml/genode-igb/repos/base/include/base/ram_allocator.h \ + /home/mml/genode-igb/repos/base/include/base/cache.h \ /home/mml/genode-igb/repos/base/include/base/allocator.h \ /home/mml/genode-igb/repos/base/include/util/register.h \ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ - /home/mml/genode-igb/repos/base/include/util/touch.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ /home/mml/genode-igb/repos/base/include/base/env.h \ /home/mml/genode-igb/repos/base/include/parent/parent.h \ /home/mml/genode-igb/repos/base/include/base/id_space.h \ @@ -138,243 +101,103 @@ /home/mml/genode-igb/repos/base/include/base/trace/events.h \ /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ /home/mml/genode-igb/repos/base/include/dataspace/client.h \ /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h \ + /home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h \ + /home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp \ + /home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h \ + /home/mml/genode-igb/repos/base/include/util/touch.h \ /home/mml/genode-igb/repos/base/include/base/heap.h \ /home/mml/genode-igb/repos/base/include/base/allocator_avl.h \ /home/mml/genode-igb/repos/base/include/base/tslab.h \ /home/mml/genode-igb/repos/base/include/base/slab.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h \ - /home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h \ + /home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h \ - /home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h \ - /home/mml/genode-igb/repos/libports/include/libc/component.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/rdtscp.h + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/worker.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: +/home/mml/genode-igb/repos/base/include/base/thread.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: +/home/mml/genode-igb/repos/base/include/base/exception.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_distance.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_counter.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/json.hpp: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/ciso646: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/initializer_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iosfwd: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/forward_list: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/tuple: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/valarray: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/exception: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/stdexcept: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdio: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/istream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/clocale: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ios: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/cdefs.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/spec/x86_64/libc/machine/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/x86/endian.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_types.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_pthreadtypes.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_stdint.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/select.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_sigset.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_timeval.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/timespec.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/unistd.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/sys/_null.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/bit_alloc.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: - -/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: - -/home/mml/genode-igb/repos/base/include/base/stdint.h: - -/home/mml/genode-igb/repos/base/include/base/log.h: - -/home/mml/genode-igb/repos/base/include/base/output.h: - -/home/mml/genode-igb/repos/base/include/util/interface.h: - -/home/mml/genode-igb/repos/base/include/base/buffered_output.h: - -/home/mml/genode-igb/repos/base/include/base/mutex.h: +/home/mml/genode-igb/repos/base/include/base/blockade.h: /home/mml/genode-igb/repos/base/include/base/lock.h: /home/mml/genode-igb/repos/base/include/util/noncopyable.h: -/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: +/home/mml/genode-igb/repos/base/include/base/trace/logger.h: -/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: +/home/mml/genode-igb/repos/base/include/base/trace/buffer.h: + +/home/mml/genode-igb/repos/base/include/base/stdint.h: + +/home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h: + +/home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h: /home/mml/genode-igb/repos/base/include/util/attempt.h: +/home/mml/genode-igb/repos/base/include/cpu_session/capability.h: + /home/mml/genode-igb/repos/base/include/base/capability.h: /home/mml/genode-igb/repos/base/include/util/string.h: +/home/mml/genode-igb/repos/base/include/base/output.h: + +/home/mml/genode-igb/repos/base/include/util/interface.h: + /home/mml/genode-igb/repos/base/include/util/misc_math.h: /home/mml/genode-igb/repos/base/include/cpu/string.h: @@ -385,38 +208,6 @@ /home/mml/genode-igb/repos/base/include/base/native_capability.h: -/home/mml/genode-igb/repos/base/include/base/exception.h: - -/home/mml/genode-igb/repos/base/include/base/quota_guard.h: - -/home/mml/genode-igb/repos/base/include/base/cache.h: - -/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/mpsc_queue.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: - -/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: - -/home/mml/genode-igb/repos/base/include/base/affinity.h: - -/home/mml/genode-igb/repos/base/include/util/xml_node.h: - -/home/mml/genode-igb/repos/base/include/util/token.h: - -/home/mml/genode-igb/repos/base/include/base/thread.h: - -/home/mml/genode-igb/repos/base/include/base/blockade.h: - -/home/mml/genode-igb/repos/base/include/base/trace/logger.h: - -/home/mml/genode-igb/repos/base/include/base/trace/buffer.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/cpu_session.h: - -/home/mml/genode-igb/repos/base/include/cpu_session/capability.h: - /home/mml/genode-igb/repos/base/include/cpu_thread/cpu_thread.h: /home/mml/genode-igb/repos/base/include/base/thread_state.h: @@ -429,14 +220,32 @@ /home/mml/genode-igb/repos/base/include/base/semaphore.h: +/home/mml/genode-igb/repos/base/include/base/mutex.h: + /home/mml/genode-igb/repos/base/include/util/fifo.h: +/home/mml/genode-igb/repos/base/include/base/affinity.h: + +/home/mml/genode-igb/repos/base/include/util/xml_node.h: + +/home/mml/genode-igb/repos/base/include/base/log.h: + +/home/mml/genode-igb/repos/base/include/base/buffered_output.h: + +/home/mml/genode-igb/repos/base/include/spec/x86_64/trace/timestamp.h: + +/home/mml/genode-igb/repos/base/include/util/token.h: + /home/mml/genode-igb/repos/base/include/dataspace/capability.h: +/home/mml/genode-igb/repos/base/include/dataspace/dataspace.h: + /home/mml/genode-igb/repos/base/include/base/rpc_args.h: /home/mml/genode-igb/repos/base/include/session/session.h: +/home/mml/genode-igb/repos/base/include/base/quota_guard.h: + /home/mml/genode-igb/repos/base/include/base/session_label.h: /home/mml/genode-igb/repos/base/include/util/arg_string.h: @@ -445,15 +254,81 @@ /home/mml/genode-igb/repos/base/include/region_map/region_map.h: +/home/mml/genode-igb/repos/base/include/base/ram_allocator.h: + +/home/mml/genode-igb/repos/base/include/base/cache.h: + /home/mml/genode-igb/repos/base/include/base/allocator.h: /home/mml/genode-igb/repos/base/include/util/register.h: /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: -/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel.h: -/home/mml/genode-igb/repos/base/include/util/touch.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/channel_occupancy.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/array: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/pstl/pstl_config.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/limits: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/algorithm: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cassert: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/alignment_helper.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/functional: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/load.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bitset: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstddef: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstring: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: + +/home/mml/genode-igb/repos/libports/include/libc/component.h: /home/mml/genode-igb/repos/base/include/base/env.h: @@ -491,12 +366,72 @@ /home/mml/genode-igb/repos/base/include/pd_session/capability.h: +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: /home/mml/genode-igb/repos/base/include/dataspace/client.h: /home/mml/genode-igb/repos/base/include/base/rpc_client.h: +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: + +/home/mml/genode-igb/repos/base/include/rom_session/client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: + +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: + +/home/mml/genode-igb/repos/base/include/base/connection.h: + +/home/mml/genode-igb/repos/base/include/util/retry.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cache.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/utility: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/mpsc_queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/statistic.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/global_heap.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdlib: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/hamstraaja.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/coreheap.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/memory/superblock.h: + +/home/mml/genode-igb/repos/ealanos/include/ealanos/util/lifo_queue.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/atomic.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/bits.h: + +/home/mml/genode-igb/repos/base-tukija/include/tukija/spinlock.hpp: + +/home/mml/genode-igb/repos/base/include/base/attached_ram_dataspace.h: + +/home/mml/genode-igb/repos/base/include/util/touch.h: + /home/mml/genode-igb/repos/base/include/base/heap.h: /home/mml/genode-igb/repos/base/include/base/allocator_avl.h: @@ -505,140 +440,52 @@ /home/mml/genode-igb/repos/base/include/base/slab.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/aligned_t.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/task_tracer.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/type_traits: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/time.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_descriptor.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/bit: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/resource_interface.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/atomic: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_t.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/memory_transaction.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/spinlock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/builtin.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iostream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/optimistic_lock.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/rw_spinlock.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/thread: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/tagged_ptr.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/synchronization/synchronization.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/random.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/new: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/fstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/priority.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/variant: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_stack.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/list.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_buffer.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/prefetch_slot.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/ecpp/static_vector.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/compare: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_cycle_sampler.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_map.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_hash.h: - -/home/mml/genode-igb/repos/ealanos/include/ealanos/util/tsl/robin_growth_policy.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/climits: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ratio: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_execution_time_history.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_pool_occupancy.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/annotation.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_queues.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/mpsc.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/priority_queue.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/memory: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/reclamation/epoch_manager.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/worker_local_dynamic_size_allocator.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/dynamic_size_allocator.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/set: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/maybe_atomic.h: +/home/mml/genode-igb/repos/base-tukija/include/spec/64bit/tukija/syscalls.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/field_alloc.h: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/random: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/runtime.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/scheduler.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/shared_task_queue.h: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/profiling_task.h: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/queue/bound_mpmc.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/task_squad.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/profiling/idle_profiler.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/server.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/io/network/config.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cmath: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/fixed_size_allocator.h: /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/task_allocator_interface.h: +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: + /home/mml/genode-igb/repos/ealanos/src/lib/mx/resource/builder.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/thread.h: - -/home/mml/genode-igb/contrib/libc-ec685e91ee80735b4a067fea4582aa7f5d06c192/include/libc/pthread.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/logger.h: - -/home/mml/genode-igb/repos/libports/include/libc/component.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/rdtscp.h: diff --git a/repos/ealanos/src/lib/mx/tasking/worker.h b/repos/ealanos/src/lib/mx/tasking/worker.h index da7e0184c7..e7b7b15b56 100644 --- a/repos/ealanos/src/lib/mx/tasking/worker.h +++ b/repos/ealanos/src/lib/mx/tasking/worker.h @@ -1,23 +1,24 @@ #pragma once +#include "base/thread.h" +#include "channel.h" #include "config.h" -#include "load.h" -#include "prefetch_distance.h" -#include "profiling/task_counter.h" -#include "profiling/task_tracer.h" +#include "profiling/statistic.h" #include "task.h" -#include "task_buffer.h" -#include "task_pool.h" -#include "task_pool_occupancy.h" #include "task_stack.h" #include #include #include #include #include -#include #include #include +#include +#include +#include +#include +#include +#include namespace mx::tasking { /** @@ -26,51 +27,173 @@ namespace mx::tasking { class alignas(64) Worker { public: - Worker(std::uint16_t count_workers, std::uint16_t worker_id, std::uint16_t target_core_id, - const util::maybe_atomic &is_running, PrefetchDistance prefetch_distance, + Worker(std::uint16_t id, std::uint16_t target_core_id, std::uint16_t target_numa_node_id, + const util::maybe_atomic &is_running, util::Field_Allocator &v, std::atomic &e, std::uint16_t prefetch_distance, memory::reclamation::LocalEpoch &local_epoch, const std::atomic &global_epoch, - std::optional &statistic, - std::optional &task_tracer) noexcept; + profiling::Statistic &statistic) noexcept; - ~Worker() = default; + ~Worker() noexcept = default; /** * Starts the worker (typically in its own thread). */ void execute(); + static void *entry(void *args) { + Worker *worker = static_cast(args); + if (worker == nullptr) { + Genode::error("No worker found."); + return nullptr; + } + worker->execute(); + return nullptr; + } + + [[nodiscard]] std::uint16_t number_of_channels() { return _count_channels; } + + Channel *get(std::uint64_t idx); + + inline bool pick_channel(std::uint64_t offset, std::uint64_t limit, bool change_phase_to_normal = false) + { + //Genode::Trace::Timestamp deq_start = Genode::Trace::timestamp(); + std::uint64_t cidx = _vacant_channels.alloc_randomly( offset, limit); + //Genode::Trace::Timestamp deq_stop = Genode::Trace::timestamp(); + //_mean_dequeue_cost += deq_stop - deq_start; + //dequeues++; + + + if (cidx > 0 && cidx < 64) { + //Genode::log("Worker ", _id, "(", _phys_core_id, ") picked channel ", cidx); + Channel *loot = get(cidx); + + if (change_phase_to_normal) + loot->phase(priority::normal); + + //Genode::Trace::Timestamp enq_start = Genode::Trace::timestamp(); + assign(loot); + //Genode::Trace::Timestamp enq_stop = Genode::Trace::timestamp(); + //_mean_enqueue_cost += enq_stop - enq_start; + //enqueues++; + + return true; + } + return false; + } + + inline bool steal(bool init=true) + { + if (!_is_running || !_may_steal) { + return false; + } + + bool got_loot = false; + /* First steal up to individual stealing limit */ + if (init) { + while (individual_stealing_limit() > 0) + { + if ((got_loot |= pick_channel(_id, stealing_limit()))) + break; + } + } else if (_excess_queues.load(std::memory_order_relaxed) <= 0) { + got_loot |= pick_channel(1, 63, true); + } + + return got_loot; + } + + bool yield_signaled() { return __atomic_load_n(&(Tukija::Cip::cip()->worker_for_location(Genode::Thread::myself()->affinity()).yield_flag), __ATOMIC_SEQ_CST) == 1; } + + std::uint16_t stealing_limit() { + return static_cast(Tukija::Cip::cip()->channel_info.limit); + } + + std::uint16_t remaining_queues() { return static_cast(Tukija::Cip::cip()->channel_info.remainder); } + + /** + * Assign a channel to this worker + * This method is called by the scheduler to assign each worker an initial channel upon start. That's because initially none of the workers has any channel assigned yet. If it would try to steal one from another worker upon initialization it would not find a channel to begin with. Since this would apply for all channels the application would just stall forever, never finding a channel to steal. + */ + void assign(Channel *channel) { _channels.push_back(channel); + _count_channels++; + } + /** * @return Id of the logical core this worker runs on. */ [[nodiscard]] std::uint16_t core_id() const noexcept { return _target_core_id; } - [[nodiscard]] TaskPool &queues() noexcept { return _task_pool; } + /*[[nodiscard]] Channel &channel() noexcept { return _channel; } + [[nodiscard]] const Channel &channel() const noexcept { return _channel; }*/ - [[nodiscard]] float load() const noexcept { return _load.get(); } + [[nodiscard]] std::uint16_t numa_id() const noexcept { return _target_numa_node_id; } - [[nodiscard]] const TaskPoolOccupancy &occupancy() const noexcept { return _occupancy; } - [[nodiscard]] TaskPoolOccupancy &occupancy() noexcept { return _occupancy; } + /** + * @return Id of the physical core this worker runs on. + */ + [[nodiscard]] std::uint16_t phys_core_id() const noexcept { return _phys_core_id; } + + /** + * @return Id of this worker + */ + [[nodiscard]] std::uint16_t id() const noexcept { return _id; } + + /** + * @return the number of channels this worker currently owns. + */ + [[nodiscard]] std::uint16_t count_channels() { return _count_channels; } + + /** + * + */ + Channel *current_channel() { return current; } + + /** + * Yields a number of channels except the channel given + * @param num, the number of channels to yield + * @param channel, the channel to keep + */ + void yield_channels(std::uint16_t num, Channel *except); private: - // Id of the worker. - const std::uint16_t _id; // Id of the logical core. const std::uint16_t _target_core_id; - // Task buffer with tasks pulled out from task pools. - TaskBuffer _task_buffer; + const std::uint16_t _target_numa_node_id; - // Queues where tasks are dispatched to. - TaskPool _task_pool; + // Distance of prefetching tasks. + const std::uint16_t _prefetch_distance; - alignas(64) Load _load; + std::uint16_t _phys_core_id{0}; + + std::uint16_t _id{0}; + + mx::synchronization::Spinlock _channel_lock{}; + + // std::int32_t _channel_size{0U}; // Stack for persisting tasks in optimistic execution. Optimistically // executed tasks may fail and be restored after execution. - alignas(64) TaskStack _task_backup_stack; + alignas(64) TaskStack _task_stack; - alignas(64) TaskPoolOccupancy _occupancy; + // Channel where tasks are stored for execution. + alignas(64) util::Queue _channels{}; + + alignas(64) Channel *current{nullptr}; + + std::mt19937 _rng; + + /** + * Profiling data structures + */ + alignas(64) unsigned long _thefts{0}; + alignas(64) Genode::Trace::Timestamp _stealing_cost{0}; + alignas(64) Genode::Trace::Timestamp _max_cost{0}; + alignas(64) Genode::Trace::Timestamp _min_cost{0}; + alignas(64) Genode::Trace::Timestamp _mean_enqueue_cost{0}; + alignas(64) Genode::Trace::Timestamp _mean_dequeue_cost{0}; + alignas(64) unsigned long enqueues{1}; + alignas(64) unsigned long dequeues{1}; // Local epoch of this worker. memory::reclamation::LocalEpoch &_local_epoch; @@ -78,15 +201,42 @@ private: // Global epoch. const std::atomic &_global_epoch; - // Task counter if counting is enabled. - std::optional &_task_counter; - - // Task tracer if task tracing is enabled. - std::optional &_task_tracer; + // Statistics container. + profiling::Statistic &_statistic; // Flag for "running" state of MxTasking. const util::maybe_atomic &_is_running; + // Reference to queue of vacant channels + util::Field_Allocator &_vacant_channels; + + // Flag whether this worker may steal channels or not + bool _may_steal{true}; + + // Global number of excess queues + alignas(64) std::atomic &_excess_queues; + + // Number of channels currently owned by this worker + std::atomic _count_channels{0}; + + // Flag for "sleeping" state of this worker + util::maybe_atomic _is_sleeping{false}; + + void sleep() { _is_sleeping = true; + Tukija::release(Tukija::Resource_type::CPU_CORE); + } + + void yield() + { + _is_sleeping = true; + Genode::log("Worker ", _id, " yielding"); + Tukija::return_to_owner(Tukija::Resource_type::CPU_CORE); + } + + inline std::int32_t individual_stealing_limit() { std::int32_t limit = static_cast(stealing_limit()) - static_cast(_count_channels); + return limit; + } + /** * Analyzes the given task and chooses the execution method regarding synchronization. * @param task Task to be executed. @@ -94,58 +244,158 @@ private: */ static synchronization::primitive synchronization_primitive(TaskInterface *task) noexcept { - return task->annotation().has_resource() ? task->annotation().resource().synchronization_primitive() - : synchronization::primitive::None; + return task->has_resource_annotated() ? task->annotated_resource().synchronization_primitive() + : synchronization::primitive::None; } /** * Executes a task with a latch. - * @param worker_id Id of the core. + * @param core_id Id of the core. + * @param channel_id Id of the channel. * @param task Task to be executed. * @return Task to be scheduled after execution. */ - static TaskResult execute_exclusive_latched(std::uint16_t worker_id, TaskInterface *task); + static TaskResult execute_exclusive_latched(std::uint16_t core_id, std::uint16_t channel_id, TaskInterface *task); /** * Executes a task with a reader/writer latch. - * @param worker_id Id of the core. + * @param core_id Id of the core. + * @param channel_id Id of the channel. * @param task Task to be executed. * @return Task to be scheduled after execution. */ - static TaskResult execute_reader_writer_latched(std::uint16_t worker_id, TaskInterface *task); - - /** - * Executes a task with restricted transactional memory. - * @param worker_id Id of the core. - * @param task Task to be executed. - * @return Task to be scheduled after execution. - */ - static TaskResult execute_transactional(std::uint16_t worker_id, TaskInterface *task); + static TaskResult execute_reader_writer_latched(std::uint16_t core_id, std::uint16_t channel_id, + TaskInterface *task); /** * Executes the task optimistically. - * @param worker_id Id of the core. + * @param core_id Id of the core. + * @param channel_id Id of the channel. * @param task Task to be executed. * @return Task to be scheduled after execution. */ - TaskResult execute_optimistic(std::uint16_t worker_id, TaskInterface *task); + TaskResult execute_optimistic(std::uint16_t core_id, std::uint16_t channel_id, TaskInterface *task); /** * Executes the task using olfit protocol. - * @param worker_id Id of the core. + * @param core_id Id of the core. + * @param channel_id Id of the channel. * @param task Task to be executed. * @return Task to be scheduled after execution. */ - TaskResult execute_olfit(std::uint16_t worker_id, TaskInterface *task); + TaskResult execute_olfit(std::uint16_t core_id, std::uint16_t channel_id, TaskInterface *task); /** * Executes the read-only task optimistically. - * @param worker_id Id of the core. + * @param core_id Id of the core. + * @param channel_id Id of the channel. * @param resource Resource the task reads. * @param task Task to be executed. * @return Task to be scheduled after execution. */ - TaskResult execute_optimistic_read(std::uint16_t worker_id, mx::resource::ResourceInterface *resource, - TaskInterface *task); + TaskResult execute_optimistic_read(std::uint16_t core_id, std::uint16_t channel_id, + resource::ResourceInterface *resource, TaskInterface *task); + + inline void wait_for_hooter() + { + while (this->_is_running == false) + { + system::builtin::pause(); + } + } + + inline void handle_yield() + { + if (yield_signaled()) { + _may_steal = true; + //Genode::log("Got yield signal ", _phys_core_id); + yield_channels(_count_channels, nullptr); + _excess_queues.fetch_sub(1); + + deregister(); + yield(); + //Genode::log("Worker on CPU ", _phys_core_id, " returned."); + registrate(); + wait_for_hooter(); + _thefts = 0; + /* + _stealing_cost = 0; + _max_cost = 0; + _min_cost = 0; + _mean_enqueue_cost = 0; + _mean_dequeue_cost = 0; + enqueues = 1; + dequeues = 1;*/ + handle_resume(); + } + } + + inline void handle_stop() + { + if (!_is_running) { + _may_steal = true; + unsigned long expect = 0; + if (yield_signaled()) { + handle_yield(); + return; + } + //Genode::log("Worker ", _id, ": thefs=", _thefts); + // Genode::log("Worker ", _id, ": thefts=", _thefts, " cost_total=", _stealing_cost, "avg cost_per_theft=", + // _stealing_cost/_thefts, " min cost/theft=", _min_cost, " max cost/theft=", _max_cost, " avg deq=", + // _mean_dequeue_cost/dequeues, " avg enq=", _mean_enqueue_cost/enqueues, " #deqs=", dequeues, " #enqs=", + // enqueues); + // Genode::log("Worker ", _id, " woke up again"); + yield_channels(_count_channels, nullptr); + deregister(); + sleep(); + + registrate(); + + if (yield_signaled()) { + handle_yield(); + return; + } + + wait_for_hooter(); + _thefts = 0; + /*_stealing_cost = 0; + _max_cost = 0; + _min_cost = 0; + _mean_enqueue_cost = 0; + _mean_dequeue_cost = 0; + enqueues = 1; + dequeues = 1;*/ + handle_resume(); + } + } + + inline void handle_resume() + { + if (!current) { + unsigned int loops = 0; + _may_steal = true; + while (!steal() ) + { + loops++; + handle_yield(); + handle_stop(); + } + // Genode::log("Worker ", _id, " stole ", static_cast(_count_channels), " channels."); + _excess_queues.fetch_sub(1); + current = _channels.pop_front(); + } + } + + void handle_channel_occupancy() + { + if (_may_steal && current->has_excessive_usage_prediction()) { + _may_steal = false; + yield_channels(_count_channels - 1, current); + //Genode::log("Worker ", _id, ": Got channel ", current->id(), " with excessive usage prediction."); + } + } + + void registrate(); + void deregister(); }; } // namespace mx::tasking \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/aligned_t.h b/repos/ealanos/src/lib/mx/util/aligned_t.h index 409570f52b..fe2427e82c 100644 --- a/repos/ealanos/src/lib/mx/util/aligned_t.h +++ b/repos/ealanos/src/lib/mx/util/aligned_t.h @@ -1,12 +1,11 @@ #pragma once -#include #include namespace mx::util { /** * Aligns the given data type with an alignment of 64. */ -template class alignas(system::cache::line_size()) aligned_t +template class alignas(64) aligned_t { public: constexpr aligned_t() noexcept = default; @@ -14,7 +13,7 @@ public: explicit constexpr aligned_t(const T &value) noexcept : _value(value) {} constexpr aligned_t(const aligned_t &other) = default; - template explicit aligned_t(Args &&...args) noexcept : _value(std::forward(args)...) {} + template explicit aligned_t(Args &&... args) noexcept : _value(std::forward(args)...) {} ~aligned_t() noexcept = default; @@ -60,6 +59,6 @@ public: } private: - T _value; + T _value = T(); }; } // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/atomic.h b/repos/ealanos/src/lib/mx/util/atomic.h new file mode 100644 index 0000000000..350eab3b9a --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/atomic.h @@ -0,0 +1,61 @@ +/* + * Atomic Operations + * + * Copyright (C) 2009-2011 Udo Steinberg + * Economic rights: Technische Universitaet Dresden (Germany) + * + * This file is part of the NOVA microhypervisor. + * + * NOVA is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * NOVA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License version 2 for more details. + */ + +#pragma once + +#include "compiler.h" + +class Atomic +{ + public: + template + + static inline bool cmp_swap (T &ptr, T o, T n) { return __sync_bool_compare_and_swap (&ptr, o, n); } + + template + + static inline T add (T &ptr, T v) { return __sync_add_and_fetch (&ptr, v); } + + template + + static inline T sub (T &ptr, T v) { return __sync_sub_and_fetch (&ptr, v); } + + template + + static inline void set_mask (T &ptr, T v) { __sync_or_and_fetch (&ptr, v); } + + template + + static inline void clr_mask (T &ptr, T v) { __sync_and_and_fetch (&ptr, ~v); } + + template + static inline bool test_set_bit (T &val, unsigned long bit) + { + bool ret; + asm volatile ("lock; bts %2, %1; setc %0" : "=q" (ret), "+m" (val) : "ir" (bit) : "cc"); + return ret; + } + + template + static inline bool test_clr_bit (T &val, unsigned long bit) + { + bool ret; + asm volatile ("lock; btr %2, %1; setc %0" : "=q" (ret), "+m" (val) : "ir" (bit) : "cc"); + return ret; + } +}; diff --git a/repos/ealanos/src/lib/mx/util/bit_alloc.h b/repos/ealanos/src/lib/mx/util/bit_alloc.h new file mode 100644 index 0000000000..8285a6d0cb --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/bit_alloc.h @@ -0,0 +1,154 @@ +/* + * Bit allocator + * + * Copyright (C) 2020 Alexander Boettcher, Genode Labs GmbH + * + * This file is part of the NOVA microhypervisor. + * + * NOVA is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * NOVA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License version 2 for more details. + */ + + +#pragma once + +#include "bits.h" +#include "atomic.h" + +namespace mx::util { + template class Bit_alloc; +} + +template +class mx::util::Bit_alloc +{ + private: + + alignas(64) std::uint64_t bits [C / 8 / sizeof(std::uint64_t)]; + std::uint64_t last { 0 }; + + enum { + BITS_CNT = sizeof(bits[0]) * 8, + MAX = sizeof(bits) / sizeof(bits [0]) + }; + + public: + + + inline std::uint64_t max() const { return C; } + + + inline Bit_alloc() + { + static_assert(MAX*BITS_CNT == C, "bit allocator"); + static_assert(INV < C, "bit allocator"); + + Atomic::test_set_bit(bits[INV / BITS_CNT], INV % BITS_CNT); + } + + + inline std::uint64_t alloc_with_mask(std::uint64_t bitmask[C/8/sizeof(std::uint64_t)], bool inverse = false) + { + for (std::uint64_t i = ACCESS_ONCE(last), j = 0; j < MAX; i++, j++) + { + i %= MAX; + + std::uint64_t mask = ~bits[i] & (inverse ? ~bitmask[i] : bitmask[i]); + + if (mask == 0UL) + continue; + + + long b = bit_scan_forward (mask); + if (b < 0 || b >= BITS_CNT || Atomic::test_set_bit (bits[i], b)) { + j--; + i--; + continue; + } + + if (bits[i] != ~0UL && last != i) + last = i; + + return i * BITS_CNT + b; + } + + return INV; + } + + + inline std::uint64_t alloc() + { + return alloc_with_mask(bits, true); + } + + + inline void release(std::uint64_t const id) + { + if (id == INV || id >= C) + return; + + std::uint64_t i = id / BITS_CNT; + std::uint64_t b = id % BITS_CNT; + + while (ACCESS_ONCE(bits[i]) & (1ul << b)) + Atomic::test_clr_bit (ACCESS_ONCE(bits[i]), b); + } + + + inline bool reserve(std::uint64_t const id) + { + + if (id == INV || id >= C) + return false; + + std::uint64_t i = id / BITS_CNT; + std::uint64_t b = id % BITS_CNT; + + return Atomic::test_set_bit (ACCESS_ONCE(bits[i]), b); + } + + void reserve(std::uint64_t const start, std::uint64_t const count) + { + if (start >= C) + return; + + std::uint64_t i = start / BITS_CNT; + std::uint64_t b = start % BITS_CNT; + + std::uint64_t cnt = count > C ? C : count; + if (start + cnt > C) + cnt = C - start; + + while (cnt) { + std::uint64_t const c = (cnt > BITS_CNT) ? std::uint64_t(BITS_CNT) : cnt; + std::uint64_t const bc = (c > (BITS_CNT - b)) ? std::uint64_t(BITS_CNT - b) : c; + if (bits[i] != ~0UL) { + if (bc >= BITS_CNT) { + bits[i] = ~0UL; + } else { + bits[i] |= ((1ul << bc) - 1) << b; + } + } + i++; + cnt -= bc; + b = 0; + } + } + + void reserve_with_mask(std::uint64_t const mask, std::uint64_t const offset) + { + Atomic::set_mask(bits[offset], mask); + } + + void dump_trace() + { + for (int i = 0; i < MAX; i++) + trace(0, "bitmap[%d]: %lx", i, bits[i]); + } +}; diff --git a/repos/ealanos/src/lib/mx/util/bits.h b/repos/ealanos/src/lib/mx/util/bits.h new file mode 100644 index 0000000000..95065e28d1 --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/bits.h @@ -0,0 +1,14 @@ +#pragma once +#include + +namespace mx::util { +inline long int bit_scan_forward(std::uint64_t val) +{ + if (!val) + return -1; + + asm volatile("bsf %1, %0" : "=r"(val) : "rm"(val)); + + return val; +} +} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/bits.old b/repos/ealanos/src/lib/mx/util/bits.old new file mode 100644 index 0000000000..95065e28d1 --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/bits.old @@ -0,0 +1,14 @@ +#pragma once +#include + +namespace mx::util { +inline long int bit_scan_forward(std::uint64_t val) +{ + if (!val) + return -1; + + asm volatile("bsf %1, %0" : "=r"(val) : "rm"(val)); + + return val; +} +} \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/queue/bound_mpmc.h b/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h similarity index 83% rename from repos/ealanos/src/lib/mx/queue/bound_mpmc.h rename to repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h index 36e02319b5..ec6a53ff61 100644 --- a/repos/ealanos/src/lib/mx/queue/bound_mpmc.h +++ b/repos/ealanos/src/lib/mx/util/bound_mpmc_queue.h @@ -7,18 +7,19 @@ #include #include #include +#include -namespace mx::queue { +namespace mx::util { /** * Multi producer, multi consumer queue with a fixed number of slots. * Every thread can push and pop values into the queue without using latches. * * Inspired by http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue */ -template class BoundMPMC +template class BoundMPMCQueue { public: - explicit BoundMPMC(const std::uint64_t capacity) noexcept : _capacity(capacity) + BoundMPMCQueue(const std::uint16_t capacity) noexcept : _capacity(capacity) { _storage = new (memory::GlobalHeap::allocate_cache_line_aligned(sizeof(std::pair) * capacity)) @@ -31,20 +32,17 @@ public: } } - ~BoundMPMC() noexcept { std::free(_storage); } + ~BoundMPMCQueue() noexcept { delete[] _storage; } - // BoundMPMC(const BoundMPMCQueue &) = delete; - // BoundMPMC(BoundMPMCQueue &&) = delete; - // - // BoundMPMC &operator=(const BoundMPMCQueue &) = delete; - // BoundMPMC &operator=(BoundMPMCQueue &&) = delete; + BoundMPMCQueue(const BoundMPMCQueue &) = delete; + BoundMPMCQueue(BoundMPMCQueue &&) = delete; - [[nodiscard]] bool empty() const noexcept { return _head.load() == _tail.load(); } + BoundMPMCQueue &operator=(const BoundMPMCQueue &) = delete; + BoundMPMCQueue &operator=(BoundMPMCQueue &&) = delete; /** * Inserts the given value. * May block until a slot is available. - * * @param item Data to insert. */ void push_back(const T &item) noexcept @@ -53,12 +51,12 @@ public: { system::builtin::pause(); } + _length.fetch_add(1); } /** * Takes out the next value. * May block until data is available. - * * @return The popped value. */ T pop_front() noexcept @@ -68,30 +66,32 @@ public: { system::builtin::pause(); } + _length.fetch_sub(1); return item; } /** * Tries to take out the next value or the given default value, * if no data is available. - * * @param default_value Data that will be returned if no data is available. * @return Popped data or default value. */ T pop_front_or(const T &default_value) noexcept { T item; - if (try_pop_front(item)) + if ( try_pop_front(item)) { + _length.fetch_sub(1); return item; } - - return default_value; + else + { + return default_value; + } } /** * Tries to insert value into the queue. - * * @param item Item to insert. * @return True, when successful inserted; false if no slot was available. */ @@ -128,7 +128,6 @@ public: /** * Tries to take the next value. - * * @param return_item Item where the next value will be stored. * @return True, when pop was successful; false if no data was available. */ @@ -163,17 +162,25 @@ public: return true; } + std::uint32_t size() { + return _length; + } + private: // Capacity of the queue. - const std::uint64_t _capacity; + const std::uint32_t _capacity; // Array of status flags and data slots. std::pair *_storage; + std::atomic _length{0}; + // Index of the head. alignas(64) std::atomic_uint64_t _head{0U}; // Index of the tail. alignas(64) std::atomic_uint64_t _tail{0U}; + + alignas(64) mx::synchronization::Spinlock _lock{}; }; -} // namespace mx::queue \ No newline at end of file +} // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/compiler.h b/repos/ealanos/src/lib/mx/util/compiler.h new file mode 100644 index 0000000000..33bd091b6c --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/compiler.h @@ -0,0 +1,26 @@ +/* + * Compiler Macros + * + * Copyright (C) 2009-2011 Udo Steinberg + * Economic rights: Technische Universitaet Dresden (Germany) + * + * Copyright (C) 2012-2013 Udo Steinberg, Intel Corporation. + * + * This file is part of the NOVA microhypervisor. + * + * NOVA is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * NOVA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License version 2 for more details. + */ + +#pragma once + + #define EXPECT_FALSE(X) __builtin_expect(!!(X), 0) + #define EXPECT_TRUE(X) __builtin_expect(!!(X), 1) + + #define ACCESS_ONCE(x) (*static_cast(&(x))) diff --git a/repos/ealanos/src/lib/mx/util/core_set.cpp b/repos/ealanos/src/lib/mx/util/core_set.cpp index 94056e6302..8da813b435 100644 --- a/repos/ealanos/src/lib/mx/util/core_set.cpp +++ b/repos/ealanos/src/lib/mx/util/core_set.cpp @@ -1,64 +1,69 @@ #include "core_set.h" #include -#include +#include #include #include #include +#include using namespace mx::util; -core_set core_set::build(std::uint16_t count_cores, const Order order) +core_set core_set::build(std::uint16_t cores, const Order order) { - count_cores = - std::min(count_cores, std::min(std::uint16_t(tasking::config::max_cores()), system::cpu::count_cores())); + cores = std::min(cores, std::min(std::uint16_t(tasking::config::max_cores()), + system::topology::count_cores())); - auto set = core_set{}; + core_set core_set; if (order == Ascending) { - for (auto i = 0U; i < count_cores; ++i) + for (auto i = 0U; i < cores; ++i) { - set.emplace_back(i); + core_set.emplace_back(i); } } else if (order == NUMAAware) { - /// List of all available core ids. - std::vector numa_sorted_core_ids(system::cpu::count_cores()); + std::vector cores_to_sort(system::topology::count_cores()); + std::iota(cores_to_sort.begin(), cores_to_sort.end(), 0U); + std::sort(cores_to_sort.begin(), cores_to_sort.end(), + [](const std::uint16_t &left, const std::uint16_t &right) { + const auto left_node = system::topology::node_id(left); + const auto right_node = system::topology::node_id(right); + if (left_node == right_node) + { + return left < right; + } - /// Fill from 0 to N-1. - std::iota(numa_sorted_core_ids.begin(), numa_sorted_core_ids.end(), 0U); - - /// Sort by NUMA Node IDs (lower... upper). - core_set::sort_by_numa(numa_sorted_core_ids); - - /// Emplace the first K core ids from the by NUMA sorted list.. - for (auto i = 0U; i < count_cores; ++i) + return left_node < right_node; + }); + for (auto i = 0U; i < cores; ++i) { - set.emplace_back(numa_sorted_core_ids[i]); + core_set.emplace_back(cores_to_sort[i]); } } - return set; + return core_set; } -void core_set::sort_by_numa(std::vector &core_ids) +core_set core_set::build(std::uint64_t *core_mask, std::uint16_t count) { - std::sort(core_ids.begin(), core_ids.end(), [](const std::uint16_t &left, const std::uint16_t &right) { - const auto left_node = system::cpu::node_id(left); - const auto right_node = system::cpu::node_id(right); - if (left_node == right_node) - { - return left < right; - } + core_set core_set; + for (int c = 0; c < count; ++count) + { + std::bitset mask{core_mask[c]}; + long core = 0; - return left_node < right_node; - }); + while ((core = util::bit_scan_forward(mask.to_ulong())) != -1) { + mask.reset(core); + core_set.emplace_back(core); + } + } } namespace mx::util { std::ostream &operator<<(std::ostream &stream, const core_set &core_set) { - for (auto i = 0U; i < core_set.count_cores(); i++) + for (auto i = 0U; i < core_set.size(); i++) { if (i > 0U) { diff --git a/repos/ealanos/src/lib/mx/util/core_set.d b/repos/ealanos/src/lib/mx/util/core_set.d index 718600b53b..2de00d1c1c 100644 --- a/repos/ealanos/src/lib/mx/util/core_set.d +++ b/repos/ealanos/src/lib/mx/util/core_set.d @@ -8,10 +8,7 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/c_global/cstdint \ /home/mml/genode-igb/repos/ealanos/src/lib/mx/memory/config.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h \ - /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h \ /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h \ /home/mml/genode-igb/repos/base-tukija/include/tukija/stdint.h \ /home/mml/genode-igb/repos/base/include/spec/64bit/base/fixed_stdint.h \ @@ -66,12 +63,41 @@ /home/mml/genode-igb/repos/base/include/base/allocator.h \ /home/mml/genode-igb/repos/base/include/util/register.h \ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h \ + /home/mml/genode-igb/repos/libports/include/libc/component.h \ + /home/mml/genode-igb/repos/base/include/base/env.h \ + /home/mml/genode-igb/repos/base/include/parent/parent.h \ + /home/mml/genode-igb/repos/base/include/base/id_space.h \ + /home/mml/genode-igb/repos/base/include/util/avl_tree.h \ + /home/mml/genode-igb/repos/base/include/session/capability.h \ + /home/mml/genode-igb/repos/base/include/root/capability.h \ + /home/mml/genode-igb/repos/base/include/root/root.h \ + /home/mml/genode-igb/repos/base/include/base/entrypoint.h \ + /home/mml/genode-igb/repos/base/include/util/reconstructible.h \ + /home/mml/genode-igb/repos/base/include/util/construct_at.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_server.h \ + /home/mml/genode-igb/repos/base/include/base/ipc.h \ + /home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h \ + /home/mml/genode-igb/repos/base/include/base/object_pool.h \ + /home/mml/genode-igb/repos/base/include/base/weak_ptr.h \ + /home/mml/genode-igb/repos/base/include/base/trace/events.h \ + /home/mml/genode-igb/repos/base/include/base/trace/policy.h \ + /home/mml/genode-igb/repos/base/include/pd_session/capability.h \ + /home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h \ + /home/mml/genode-igb/repos/base/include/base/attached_dataspace.h \ + /home/mml/genode-igb/repos/base/include/dataspace/client.h \ + /home/mml/genode-igb/repos/base/include/base/rpc_client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/connection.h \ + /home/mml/genode-igb/repos/base/include/rom_session/client.h \ + /home/mml/genode-igb/repos/base/include/rom_session/capability.h \ + /home/mml/genode-igb/repos/base/include/rom_session/rom_session.h \ + /home/mml/genode-igb/repos/base/include/base/connection.h \ + /home/mml/genode-igb/repos/base/include/util/retry.h \ + /home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h \ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector \ - /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric + /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric \ + /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector /home/mml/genode-igb/repos/ealanos/src/lib/mx/util/core_set.h: @@ -89,13 +115,7 @@ /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/chrono: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/iterator: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/cpu.h: - -/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/unordered_map: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/topology.h: /home/mml/genode-igb/repos/base-tukija/include/tukija/syscall-generic.h: @@ -205,14 +225,72 @@ /home/mml/genode-igb/repos/base/include/spec/x86/cpu/consts.h: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/optional: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/system/environment.h: + +/home/mml/genode-igb/repos/libports/include/libc/component.h: + +/home/mml/genode-igb/repos/base/include/base/env.h: + +/home/mml/genode-igb/repos/base/include/parent/parent.h: + +/home/mml/genode-igb/repos/base/include/base/id_space.h: + +/home/mml/genode-igb/repos/base/include/util/avl_tree.h: + +/home/mml/genode-igb/repos/base/include/session/capability.h: + +/home/mml/genode-igb/repos/base/include/root/capability.h: + +/home/mml/genode-igb/repos/base/include/root/root.h: + +/home/mml/genode-igb/repos/base/include/base/entrypoint.h: + +/home/mml/genode-igb/repos/base/include/util/reconstructible.h: + +/home/mml/genode-igb/repos/base/include/util/construct_at.h: + +/home/mml/genode-igb/repos/base/include/base/rpc_server.h: + +/home/mml/genode-igb/repos/base/include/base/ipc.h: + +/home/mml/genode-igb/repos/base/include/base/ipc_msgbuf.h: + +/home/mml/genode-igb/repos/base/include/base/object_pool.h: + +/home/mml/genode-igb/repos/base/include/base/weak_ptr.h: + +/home/mml/genode-igb/repos/base/include/base/trace/events.h: + +/home/mml/genode-igb/repos/base/include/base/trace/policy.h: + +/home/mml/genode-igb/repos/base/include/pd_session/capability.h: + +/home/mml/genode-igb/repos/base/include/base/attached_rom_dataspace.h: + +/home/mml/genode-igb/repos/base/include/base/attached_dataspace.h: + +/home/mml/genode-igb/repos/base/include/dataspace/client.h: + +/home/mml/genode-igb/repos/base/include/base/rpc_client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/connection.h: + +/home/mml/genode-igb/repos/base/include/rom_session/client.h: + +/home/mml/genode-igb/repos/base/include/rom_session/capability.h: + +/home/mml/genode-igb/repos/base/include/rom_session/rom_session.h: + +/home/mml/genode-igb/repos/base/include/base/connection.h: + +/home/mml/genode-igb/repos/base/include/util/retry.h: + +/home/mml/genode-igb/repos/ealanos/src/lib/mx/tasking/config.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/ostream: -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/sstream: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/string: - -/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: +/home/mml/genode-igb/repos/ealanos/src/lib/mx/util/bits.h: /home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/numeric: + +/home/mml/genode-igb/contrib/stdcxx-4eddc2a55a80ed5d3a50fee3f5c25e7ac42afd72/include/stdcxx/std/vector: diff --git a/repos/ealanos/src/lib/mx/util/core_set.h b/repos/ealanos/src/lib/mx/util/core_set.h index 170ec61c50..1189d89b36 100644 --- a/repos/ealanos/src/lib/mx/util/core_set.h +++ b/repos/ealanos/src/lib/mx/util/core_set.h @@ -5,13 +5,10 @@ #include #include #include -#include +#include #include -#include #include -#include -#include -#include +#include namespace mx::util { /** @@ -31,28 +28,8 @@ public: NUMAAware }; - /** - * Builds the core set for a fixed number of cores and specified ordering. - * @param channels Number of channels. - * @param cores Number of cores. - * @param order The order can be "Ascending" (for using the systems order) or "NUMA Aware". - * @return - */ - [[nodiscard]] static core_set build(std::uint16_t cores, Order order = Ascending); - - /** - * Builds the core set for all cores in the system and specified ordering. - * @param order The order can be "Ascending" (for using the systems order) or "NUMA Aware". - * @return - */ - [[nodiscard]] static core_set build(Order order = Ascending) - { - return core_set::build(system::cpu::count_cores(), order); - } - - constexpr core_set() noexcept = default; - - core_set(std::initializer_list &&core_ids) noexcept + constexpr core_set() noexcept : _core_identifier({0U}), _numa_nodes(0U) {} + explicit core_set(std::initializer_list &&core_ids) noexcept : core_set() { for (const auto core_id : core_ids) { @@ -63,16 +40,26 @@ public: core_set &operator=(const core_set &other) noexcept = default; - std::uint16_t operator[](const std::uint16_t index) const noexcept { return _worker_core_map[index]; } - [[nodiscard]] std::uint16_t front() const { return _worker_core_map.front(); } - [[nodiscard]] std::uint16_t back() const { return _worker_core_map.back(); } + /** + * Add a core to the core set. + * @param core_identifier Logical identifier of the core. + */ + void emplace_back(const std::uint16_t core_identifier) noexcept + { + _core_identifier[_size++] = core_identifier; + _numa_nodes[system::topology::node_id(core_identifier)] = true; + } - explicit operator bool() const noexcept { return _count_cores > 0U; } + std::uint16_t operator[](const std::uint16_t index) const noexcept { return _core_identifier[index]; } + std::uint16_t front() const { return _core_identifier.front(); } + std::uint16_t back() const { return _core_identifier.back(); } + + explicit operator bool() const noexcept { return _size > 0U; } /** * @return Number of included cores. */ - [[nodiscard]] std::uint16_t count_cores() const noexcept { return _count_cores; } + [[nodiscard]] std::uint16_t size() const noexcept { return _size; } /** * @return Number of included NUMA regions. @@ -86,7 +73,7 @@ public: */ [[nodiscard]] std::uint8_t numa_node_id(const std::uint16_t index) const noexcept { - return system::cpu::node_id(_worker_core_map[index]); + return system::topology::node_id(_core_identifier[index]); } /** @@ -94,19 +81,27 @@ public: */ [[nodiscard]] std::uint16_t max_core_id() const noexcept { - return *std::max_element(_worker_core_map.cbegin(), _worker_core_map.cbegin() + _count_cores); + return *std::max_element(_core_identifier.cbegin(), _core_identifier.cbegin() + _size); } + /** + * Builds the core set for a fixed number of cores and specified ordering. + * @param cores Number of cores. + * @param order The order can be "Ascending" (for using the systems order) or "NUMA Aware". + * @return + */ + static core_set build(std::uint16_t cores, Order order = Ascending); + + static core_set build(std::uint64_t *core_mask, std::uint16_t count); + bool operator==(const core_set &other) const noexcept { - return _worker_core_map == other._worker_core_map && _count_cores == other._count_cores && - _numa_nodes == other._numa_nodes; + return _core_identifier == other._core_identifier && _size == other._size && _numa_nodes == other._numa_nodes; } bool operator!=(const core_set &other) const noexcept { - return _worker_core_map != other._worker_core_map || _count_cores != other._count_cores || - _numa_nodes != other._numa_nodes; + return _core_identifier != other._core_identifier || _size != other._size || _numa_nodes != other._numa_nodes; } /** @@ -118,38 +113,17 @@ public: return _numa_nodes.test(numa_node_id); } - [[nodiscard]] auto begin() const noexcept { return _worker_core_map.begin(); } - [[nodiscard]] auto end() const noexcept { return _worker_core_map.begin() + _count_cores; } - - [[nodiscard]] std::string to_string() const noexcept - { - std::stringstream stream; - stream << *this; - return stream.str(); - } + [[nodiscard]] auto begin() const noexcept { return _core_identifier.begin(); } + [[nodiscard]] auto end() const noexcept { return _core_identifier.begin() + _size; } private: - // Maps from worker id (0..N) to core id. - std::array _worker_core_map{0U}; + // List of core identifiers. + std::array _core_identifier; // Number of cores in the set. - std::uint16_t _count_cores{0U}; + std::uint16_t _size{0U}; // Bitvector for represented NUMA regions. std::bitset _numa_nodes{0U}; - - /** - * Add a core to the core set. - * @param core_identifier Logical identifier of the core. - */ - void emplace_back(const std::uint16_t core_identifier) noexcept - { - const auto worker_id = _count_cores++; - - _worker_core_map[worker_id] = core_identifier; - _numa_nodes[system::cpu::node_id(core_identifier)] = true; - } - - static void sort_by_numa(std::vector &core_ids); }; } // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/field_alloc.h b/repos/ealanos/src/lib/mx/util/field_alloc.h new file mode 100644 index 0000000000..533ee87929 --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/field_alloc.h @@ -0,0 +1,56 @@ +#pragma once +#include "random.h" +#include +#include + +namespace mx::util { + template class Field_Allocator; +} + +template +class mx::util::Field_Allocator +{ + private: + struct field { + alignas(64) std::atomic reserved{false}; + }; + + alignas(64) struct field _fields[C]{}; + alignas(64) std::size_t _count; + std::atomic free_fields; + + public: + Field_Allocator(std::size_t count) : _count(count), free_fields(count) {} + + std::size_t alloc_randomly(unsigned offset, unsigned limit) { + if (free_fields.load(std::memory_order_relaxed) <= 0) + return 0; + + //mx::util::Random rng(Genode::Trace::timestamp()); + + //Genode::log("Searching queue"); + std::size_t candidate = offset; + // +rng.next(limit); + + if (candidate > (offset + limit)) + return 0; + + if (candidate == 0) + return 0; + + for (; candidate < offset + limit; candidate++) { + bool expect = false; + bool success = _fields[candidate].reserved.compare_exchange_strong(expect, true, std::memory_order_acquire, std::memory_order_relaxed); + if (success) { + free_fields.fetch_sub(1); + return candidate; + } + } + return 0; + } + + void release(std::size_t field) { + _fields[field].reserved.store(false); + free_fields.fetch_add(1); + } +}; \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/logger.h b/repos/ealanos/src/lib/mx/util/logger.h deleted file mode 100644 index 412edce827..0000000000 --- a/repos/ealanos/src/lib/mx/util/logger.h +++ /dev/null @@ -1,91 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace mx::util { -class Logger -{ -public: - enum Level - { - DEBUG, - INFO, - WARNING, - ERROR - }; - - static void debug([[maybe_unused]] std::string &&message) noexcept - { - if constexpr (system::Environment::is_debug()) - { - log(std::cout, std::move(message)); - } - } - - static void debug_if([[maybe_unused]] const bool guard, [[maybe_unused]] std::string &&message) noexcept - { - if constexpr (system::Environment::is_debug()) - { - log_if(guard, std::cout, std::move(message)); - } - } - - static void info(std::string &&message) noexcept { log(std::cout, std::move(message)); } - - static void info_if(const bool guard, std::string &&message) noexcept - { - log_if(guard, std::cout, std::move(message)); - } - - static void warn(std::string &&message) noexcept { log(std::cerr, std::move(message)); } - - static void warn_if(const bool guard, std::string &&message) noexcept - { - log_if(guard, std::cerr, std::move(message)); - } - - static void error(std::string &&message) noexcept { log(std::cerr, std::move(message)); } - - static void error_if(const bool guard, std::string &&message) noexcept - { - log_if(guard, std::cerr, std::move(message)); - } - -private: - template static void log(std::ostream &stream, std::string &&message) noexcept - { - stream << "[" << to_string() << "] " << message << std::endl; - } - - template static void log_if(const bool guard, std::ostream &stream, std::string &&message) noexcept - { - if (guard == true) - { - log(stream, std::move(message)); - } - } - - template [[nodiscard]] static std::string to_string() noexcept - { - if constexpr (L == Level::DEBUG) - { - return "debug "; - } - else if constexpr (L == Level::INFO) - { - return "info "; - } - else if constexpr (L == Level::WARNING) - { - return "warning"; - } - else - { - return "error "; - } - } -}; -} // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/queue/mpsc.h b/repos/ealanos/src/lib/mx/util/mpsc_queue.h similarity index 62% rename from repos/ealanos/src/lib/mx/queue/mpsc.h rename to repos/ealanos/src/lib/mx/util/mpsc_queue.h index dd02775198..44c97a29cd 100644 --- a/repos/ealanos/src/lib/mx/queue/mpsc.h +++ b/repos/ealanos/src/lib/mx/util/mpsc_queue.h @@ -5,24 +5,28 @@ #include #include #include -#include +#include +#include -namespace mx::queue { +namespace mx::util { /** * Multi producer, single consumer queue with unlimited slots. * Every thread can push values into the queue without using latches. * * Inspired by http://www.1024cores.net/home/lock-free-algorithms/queues/intrusive-mpsc-node-based-queue */ -template class MPSC +template class MPSCQueue { public: - constexpr MPSC() noexcept - : _head(reinterpret_cast(_stub.data())), _tail(reinterpret_cast(_stub.data())), - _end(reinterpret_cast(_stub.data())) + constexpr MPSCQueue() noexcept + : _head(reinterpret_cast(&_stub)), _tail(reinterpret_cast(&_stub)), + _end(reinterpret_cast(&_stub)) { + assert((reinterpret_cast(&_head) % 64 == 0) && (reinterpret_cast(&_tail) % 64 == 0) && + "head or tail not cacheline-aligned"); + reinterpret_cast(_stub).next(nullptr); } - ~MPSC() noexcept = default; + ~MPSCQueue() noexcept = default; /** * Inserts the given item into the queue. @@ -64,15 +68,7 @@ public: /** * @return Takes and removes the first item from the queue. */ - [[nodiscard]] T *pop_front() noexcept; - - /** - * Pops all items from the list. The items will be concatenated. - * This operation is NOT thread safe. - * - * @return Pair of first and last task - */ - [[nodiscard]] std::pair pop() noexcept; + T *pop_front() noexcept; private: // Head of the queue (accessed by every producer). @@ -85,10 +81,10 @@ private: alignas(16) T *const _end; // Dummy item for empty queue. - alignas(64) std::array _stub = {}; + alignas(64) std::array _stub; }; -template T *MPSC::pop_front() noexcept +template T *MPSCQueue::pop_front() noexcept { auto *tail = this->_tail; auto *next = tail->next(); @@ -128,38 +124,4 @@ template T *MPSC::pop_front() noexcept return nullptr; } -template std::pair MPSC::pop() noexcept -{ - T *head = nullptr; - /// Head and tail are interchanged, head is tail and tail is head. - if (this->_tail != nullptr) - { - if (this->_tail != this->_end) - { - head = this->_tail; - } - else - { - head = this->_tail->next(); - } - } - - if (head == nullptr) - { - return std::make_pair(nullptr, nullptr); - } - - if (this->_head == nullptr || this->_head == this->_end) - { - head->next(nullptr); - return std::make_pair(head, nullptr); - } - - auto *tail = std::exchange(this->_head, this->_end); - tail->next(nullptr); - this->_tail = this->_end; - - return std::make_pair(head, tail); -} - -} // namespace mx::queue \ No newline at end of file +} // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/queue.h b/repos/ealanos/src/lib/mx/util/queue.h new file mode 100644 index 0000000000..7bf9261cd2 --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/queue.h @@ -0,0 +1,80 @@ +#pragma once + +namespace mx::util { +/** + * Single producer, single consumer queue. This queue is not thread safe. + */ +template class Queue +{ +public: + constexpr Queue() noexcept = default; + ~Queue() noexcept = default; + + /** + * Inserts an item into the queue. + * @param item Item to be inserted. + */ + void push_back(T *item) noexcept + { + item->next(nullptr); + + if (_tail != nullptr) + { + _tail->next(item); + _tail = item; + } + else + { + _head = _tail = item; + } + } + + /** + * @return Begin of the queue. + */ + [[nodiscard]] T *begin() noexcept { return _head; } + + /** + * @return End of the queue. + */ + [[nodiscard]] const T *end() const noexcept { return _tail; } + + /** + * @return End of the queue. + */ + [[nodiscard]] T *end() noexcept { return _tail; } + + /** + * @return True, when the queue is empty. + */ + [[nodiscard]] bool empty() const noexcept { return _head == nullptr; } + + /** + * @return Takes and removes the first item from the queue. + */ + T *pop_front() noexcept + { + if (_head == nullptr) + { + return nullptr; + } + + auto *head = _head; + auto *new_head = head->next(); + if (new_head == nullptr) + { + _tail = nullptr; + } + + _head = new_head; + return head; + } + +private: + // Pointer to the head. + alignas(64) T *_head{nullptr}; + + // Pointer to the tail. + T *_tail{nullptr}; +}; +} // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/queue_item.h b/repos/ealanos/src/lib/mx/util/queue_item.h new file mode 100644 index 0000000000..bd56b6e8d7 --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/queue_item.h @@ -0,0 +1,27 @@ +#pragma once + +namespace mx::util { +/** + * Queue item as abstraction for MPSC and SPSC queues. + */ +class QueueItem +{ +public: + constexpr QueueItem() noexcept = default; + virtual ~QueueItem() noexcept = default; + + /** + * @return Next item in the queue after this one. + */ + [[nodiscard]] QueueItem *next() const noexcept { return _next; } + + /** + * @param item Item to be set as next. + */ + void next(QueueItem *item) noexcept { _next = item; } + +private: + QueueItem *_next{nullptr}; +}; + +} // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/reference_counter.h b/repos/ealanos/src/lib/mx/util/reference_counter.h index fe1ddbdd1c..d472f59403 100644 --- a/repos/ealanos/src/lib/mx/util/reference_counter.h +++ b/repos/ealanos/src/lib/mx/util/reference_counter.h @@ -16,17 +16,13 @@ template class reference_counter { public: explicit constexpr reference_counter(const std::uint16_t core_id) noexcept : _local_core_id(core_id) {} - constexpr reference_counter(const std::uint16_t core_id, const T counter) noexcept - : _local_core_id(core_id), _local_counter(counter) - { - } ~reference_counter() noexcept = default; /** * Increases the counter. * @param core_id Logical core identifier of the caller. - * @param count Number to increase. + * @param count Number of increase. */ void add(const std::uint16_t core_id, const T count = 1) noexcept { @@ -40,18 +36,6 @@ public: } } - /** - * Increases the counter and loads the new value. - * @param core_id Logical core identifier of the caller. - * @param count Number to increase. - * @return New value. - */ - [[nodiscard]] T add_fetch(const std::uint16_t core_id, const T count = 1) noexcept - { - add(core_id, count); - return load(); - } - /** * Decreases the counter. * @param core_id Logical core identifier of the caller. @@ -69,18 +53,6 @@ public: } } - /** - * Decreases the counter and loads the new value. - * @param core_id Logical core identifier of the caller. - * @param count Number of decrease. - * @return New value. - */ - [[nodiscard]] T sub_fetch(const std::uint16_t core_id, const T count = 1) noexcept - { - sub(core_id, count); - return load(); - } - /** * @return The current stored counter. */ diff --git a/repos/ealanos/src/lib/mx/util/split_counter.h b/repos/ealanos/src/lib/mx/util/split_counter.h deleted file mode 100644 index 0a251079a3..0000000000 --- a/repos/ealanos/src/lib/mx/util/split_counter.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include "aligned_t.h" -#include -#include -#include - -namespace mx::util { -template class split_counter -{ -public: - constexpr split_counter() noexcept = default; - ~split_counter() noexcept = default; - - void add(const std::uint16_t id, const T value) { _groups[id / GROUPS].value().fetch_add(value); } - - void sub(const std::uint16_t id, const T value) { _groups[id / GROUPS].value().fetch_sub(value); } - - T load() const noexcept - { - auto value = T{0}; - - for (const auto &val : _groups) - { - value += val.value().load(); - } - - return value; - } - - T sub_and_load(const std::uint16_t id, const T value) - { - sub(id, value); - return load(); - } - - T add_and_load(const std::uint16_t id, const T value) - { - add(id, value); - return load(); - } - -private: - std::array>, MAX / GROUPS> _groups; -}; -} // namespace mx::util \ No newline at end of file diff --git a/repos/ealanos/src/lib/mx/util/util.h b/repos/ealanos/src/lib/mx/util/util.h new file mode 100644 index 0000000000..3221f74243 --- /dev/null +++ b/repos/ealanos/src/lib/mx/util/util.h @@ -0,0 +1,33 @@ +/* + * Utility Functions + * + * Copyright (C) 2009-2011 Udo Steinberg + * Economic rights: Technische Universitaet Dresden (Germany) + * + * This file is part of the NOVA microhypervisor. + * + * NOVA is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * NOVA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License version 2 for more details. + */ + +#pragma once + +#include "compiler.h" + +template +static inline T min (T v1, T v2) +{ + return v1 < v2 ? v1 : v2; +} + +template +static inline T max (T v1, T v2) +{ + return v1 > v2 ? v1 : v2; +} diff --git a/repos/ealanos/src/lib/mx/util/vector.h b/repos/ealanos/src/lib/mx/util/vector.h index 9a403edf5c..0485ea509d 100644 --- a/repos/ealanos/src/lib/mx/util/vector.h +++ b/repos/ealanos/src/lib/mx/util/vector.h @@ -168,7 +168,7 @@ private: static void release(pointer_type data, const std::size_t capacity) noexcept { const auto size = sizeof(value_type) * capacity; - memory::GlobalHeap::free(static_cast(data), size); + memory::GlobalHeap::free(static_cast(data), size, _numa_node_id); } }; } // namespace mx::util \ No newline at end of file