Struct ucp_worker_params

struct ucp_worker_params

Tuning parameters for the UCP worker.

The structure defines the parameters that are used for the UCP worker tuning during the UCP worker creation.

Public Members

uint64_t field_mask

Mask of valid fields in this structure, using bits from ucp_worker_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.

ucs_thread_mode_t thread_mode

The parameter thread_mode suggests the thread safety mode which worker and the associated resources should be created with. This is an optional parameter. The default value is UCS_THREAD_MODE_SINGLE and it is used when the value of the parameter is not set. When this parameter along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_THREAD_MODE is set, the ucp_worker_create attempts to create worker with this thread mode. The thread mode with which worker is created can differ from the suggested mode. The actual thread mode of the worker should be obtained using the query interface ucp_worker_query.

ucs_cpu_set_t cpu_mask

Mask of which CPUs worker resources should preferably be allocated on. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_CPU_MASK), resources are allocated according to system’s default policy.

unsigned events

Mask of events (ucp_wakeup_event_t) which are expected on wakeup. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_EVENTS), all types of events will trigger on wakeup.

void *user_data

User data associated with the current worker. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_USER_DATA), it will default to NULL.

int event_fd

External event file descriptor. This value is optional. If UCP_WORKER_PARAM_FIELD_EVENT_FD is set in the field_mask, events on the worker will be reported on the provided event file descriptor. In this case, calling ucp_worker_get_efd will result in an error. The provided file descriptor must be capable of aggregating notifications for arbitrary events, for example epoll(7) on Linux systems. user_data will be used as the event user-data on systems which support it. For example, on Linux, it will be placed in epoll_data_t::ptr, when returned from epoll_wait(2).

Otherwise, events will be reported to the event file descriptor returned from ucp_worker_get_efd().

uint64_t flags

Worker flags. This value is optional. If UCP_WORKER_PARAM_FIELD_FLAGS is not set in the field_mask, the value of this field will default to 0.

const char *name

Tracing and analysis tools can identify the worker using this name. To retrieve the worker’s name, use ucp_worker_query, as the name you supply may be changed by UCX under some circumstances, e.g. a name conflict. This field is only assigned if you set UCP_WORKER_PARAM_FIELD_NAME in the field mask. If not, then a default unique name will be created for you.

size_t am_alignment

Minimal address alignment of the active message data pointer as passed in argument data to the active message handler, defined as ucp_am_recv_callback_t.

uint64_t client_id

Client id that is sent as part of the connection request payload when connecting to a remote socket address. On the remote side, this value can be obtained from ucp_conn_request_h using ucp_conn_request_query.