diff options
author | Dimitri Staessens <[email protected]> | 2024-02-17 10:19:46 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2024-02-19 11:49:07 +0100 |
commit | 06ee3370998f965b469d1c2859e3e34159c71e20 (patch) | |
tree | 93881747a4f1e99f6932231b0cb2358941cb9741 /src/irmd/CMakeLists.txt | |
parent | 7bb8aed15c7f29de4d9719acf8db7fdf73731af5 (diff) | |
download | ouroboros-06ee3370998f965b469d1c2859e3e34159c71e20.tar.gz ouroboros-06ee3370998f965b469d1c2859e3e34159c71e20.zip |
irmd: Revise IRMd internals
This is a full revision of the IRMd internal implementation.
The registry is now a proper subcomponent managing its own internal
lock (a single mutex). Some tests are added for the registry and its
data structures. Some macros for tests are added in <ouroboros/test.h>.
Flow allocation is now more symmetric between the client side (alloc)
and server size (accept). Each will create a flow in pending state
(ALLOC_PENDING/ACCEPT_PENDING) that is potentially fulfilled by an
IPCP using respond_alloc and respond_accept primitives. Deallocation
is split in flow_dealloc (application side) and ipcp_flow_dealloc
(IPCP side) to get the flow in DEALLOC_PENDING and DEALLOCATED state.
Cleanup of failed flow allocation is now properly handled instead of
relying on the sanitizer thread. The new sanitizer only needs to
monitor crashed processes.
On shutdown, the IRMd will now detect hanging processes and SIGKILL
them and clean up their fuse mountpoints if needed.
A lot of other things have been cleaned up and shuffled around a bit.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/CMakeLists.txt')
-rw-r--r-- | src/irmd/CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/irmd/CMakeLists.txt b/src/irmd/CMakeLists.txt index fba63a62..3a5be324 100644 --- a/src/irmd/CMakeLists.txt +++ b/src/irmd/CMakeLists.txt @@ -38,7 +38,7 @@ else () unset(HAVE_TOML) endif () -set(IRMD_REQ_ARR_TIMEOUT 500 CACHE STRING +set(IRMD_REQ_ARR_TIMEOUT 1000 CACHE STRING "Timeout for an application to respond to a new flow (ms)") set(IRMD_FLOW_TIMEOUT 5000 CACHE STRING "Timeout for a flow allocation response (ms)") @@ -53,9 +53,13 @@ set(QUERY_TIMEOUT 3000 CACHE STRING set(CONNECT_TIMEOUT 60000 CACHE STRING "Timeout to connect an IPCP to another IPCP (ms)") set(IRMD_MIN_THREADS 8 CACHE STRING - "Minimum number of worker threads in the IRMd.") + "Minimum number of worker threads in the IRMd") set(IRMD_ADD_THREADS 8 CACHE STRING "Number of extra threads to start when the IRMD faces thread starvation") +set(IRMD_PKILL_TIMEOUT 30 CACHE STRING + "Number of seconds to wait before sending SIGKILL to subprocesses on exit") +set(IRMD_KILL_ALL_PROCESSES TRUE CACHE BOOL + "Kill all processes on exit") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) @@ -65,12 +69,12 @@ set(SOURCE_FILES ipcp.c configfile.c main.c - utils.c reg/flow.c reg/ipcp.c reg/proc.c reg/prog.c reg/name.c + reg/reg.c ) add_executable (irmd ${SOURCE_FILES}) @@ -86,4 +90,5 @@ endif () install(TARGETS irmd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}) # Enable once irmd has tests -# add_subdirectory(tests) +#add_subdirectory(tests) +add_subdirectory(reg) |