|
Udipe 1.0
Solving the riddle of high-throughput UDP
|
Buffering configuration. More...
#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | udipe_buffer_config_s |
| struct | udipe_buffer_configurator_s |
Macros | |
| #define | UDIPE_MAX_BUFFERS ((size_t)64) |
Typedefs | |
| typedef struct udipe_buffer_config_s | udipe_buffer_config_t |
| typedef udipe_buffer_config_t(* | udipe_buffer_config_callback_t) (void *) |
| typedef struct udipe_buffer_configurator_s | udipe_buffer_configurator_t |
This header is the home of udipe_buffer_config_t, the data structure that configures the buffering policy of libudipe worker threads, along with related type and constant definitions.
| #define UDIPE_MAX_BUFFERS ((size_t)64) |
Maximum number of buffers that a worker thread can manage
Any attempt to set up a worker thread that manages more than this amount of buffers will fail.
If automatic configuration logic determines that the optimal amount of buffers is above this limit, then it will log a warning and stick with this amount of buffers.
| typedef udipe_buffer_config_t(* udipe_buffer_config_callback_t) (void *) |
Worker thread memory management configuration callback
You may specify such a callback as part of udipe_buffer_configurator_t in order to tune the buffering policy of individual libudipe worker threads.
It will be invoked by each worker thread on startup (and must therefore be thread-safe since worker threads start concurrently), and it is responsible for returning a udipe_buffer_config_t that adjusts the worker thread's buffering policy. See the documentation of this struct for more info on available tunable parameters.
The input void* parameter is of your choosing. It is specified via udipe_buffer_configurator_t::context and passed in as is to each invocation of the callback. You can use it to pass any information that your callback needs to compute its memory management configuration. For example...
const udipe_buffer_config_t* that points to the parameters shared by all threads.hwloc_topology_t) that is used to figure out relevant cache parameters for the active thread.The intent behind this callback-based design is to let you...
libudipe will spawn, and their pinning to CPU cores or lack thereof, is an opaque implementation detail of libudipe.| typedef struct udipe_buffer_config_s udipe_buffer_config_t |
Tunable buffering parameters for one worker thread
This is the value returned by the udipe_buffer_config_callback_t for each worker thread, used to tune each thread's memory management policy.
| typedef struct udipe_buffer_configurator_s udipe_buffer_configurator_t |
Memory management configuration
This struct can be used to control the memory management policy of libudipe.