Condy v1.5.0
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
condy::RingSettings Class Reference

Settings manager for io_uring. More...

#include <ring.hpp>

Public Member Functions

int apply_iowq_aff (size_t cpusz, const cpu_set_t *mask) noexcept
 Apply I/O worker queue affinity settings.
int remove_iowq_aff () noexcept
 Remove I/O worker queue affinity settings.
int set_iowq_max_workers (unsigned int *values) noexcept
 Set the maximum number of I/O workers.
io_uring_probe * get_probe () noexcept
 Get the io_uring probe for the ring.
uint32_t get_features () const noexcept
 Get the supported features of the ring.
int apply_napi (io_uring_napi *napi) noexcept
 Apply NAPI settings to the io_uring instance.
int remove_napi (io_uring_napi *napi=nullptr) noexcept
 Remove NAPI settings from the io_uring instance.
int set_clock (io_uring_clock_register *clock_reg) noexcept
 Set the clock registration for the io_uring instance.
int set_rings_size (io_uring_params *params) noexcept
 Resize the rings of the io_uring instance.
int set_iowait (bool enable_iowait) noexcept
 Enable or disable iowait for the io_uring instance.

Detailed Description

Settings manager for io_uring.

This class provides an interface to manage various runtime settings for an io_uring instance, including NAPI, clock, and other features.

Definition at line 215 of file ring.hpp.

Member Function Documentation

◆ apply_iowq_aff()

int condy::RingSettings::apply_iowq_aff ( size_t cpusz,
const cpu_set_t * mask )
inlinenoexcept

Apply I/O worker queue affinity settings.

See io_uring_register_iowq_aff for more details.

Parameters
cpuszNumber of CPUs in the affinity mask.
maskPointer to the CPU affinity mask.

Definition at line 238 of file ring.hpp.

◆ apply_napi()

int condy::RingSettings::apply_napi ( io_uring_napi * napi)
inlinenoexcept

Apply NAPI settings to the io_uring instance.

See io_uring_register_napi for more details.

Parameters
napiPointer to the io_uring_napi structure.

Definition at line 284 of file ring.hpp.

◆ get_features()

uint32_t condy::RingSettings::get_features ( ) const
inlinenoexcept

Get the supported features of the ring.

Returns
uint32_t Supported features bitmask.

Definition at line 276 of file ring.hpp.

◆ get_probe()

io_uring_probe * condy::RingSettings::get_probe ( )
inlinenoexcept

Get the io_uring probe for the ring.

Returns
io_uring_probe* Pointer to the io_uring probe structure. User shall not free the returned pointer.

Definition at line 264 of file ring.hpp.

◆ remove_iowq_aff()

int condy::RingSettings::remove_iowq_aff ( )
inlinenoexcept

Remove I/O worker queue affinity settings.

Returns
int Returns 0 on success or a negative error code on failure

Definition at line 245 of file ring.hpp.

◆ remove_napi()

int condy::RingSettings::remove_napi ( io_uring_napi * napi = nullptr)
inlinenoexcept

Remove NAPI settings from the io_uring instance.

Parameters
napiPointer to the io_uring_napi structure. Can be nullptr.

Definition at line 291 of file ring.hpp.

◆ set_clock()

int condy::RingSettings::set_clock ( io_uring_clock_register * clock_reg)
inlinenoexcept

Set the clock registration for the io_uring instance.

See io_uring_register_clock for more details.

Parameters
clock_regPointer to the io_uring_clock_register structure.

Definition at line 302 of file ring.hpp.

◆ set_iowait()

int condy::RingSettings::set_iowait ( bool enable_iowait)
inlinenoexcept

Enable or disable iowait for the io_uring instance.

See io_uring_set_iowait for more details.

Parameters
enable_iowaitBoolean flag to enable or disable iowait mode.

Definition at line 324 of file ring.hpp.

◆ set_iowq_max_workers()

int condy::RingSettings::set_iowq_max_workers ( unsigned int * values)
inlinenoexcept

Set the maximum number of I/O workers.

See io_uring_register_iowq_max_workers for more details.

Parameters
valuesPointer to an array with 2 elements representing the max_workers

Definition at line 255 of file ring.hpp.

◆ set_rings_size()

int condy::RingSettings::set_rings_size ( io_uring_params * params)
inlinenoexcept

Resize the rings of the io_uring instance.

See io_uring_resize_rings for more details.

Parameters
paramsPointer to the io_uring_params structure.

Definition at line 313 of file ring.hpp.


The documentation for this class was generated from the following file: