FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
threads.c File Reference
+ Include dependency graph for threads.c:

Go to the source code of this file.

Macros

#define BARRIER_MINIMUM_OPEN_LIMIT   0.001
 
#define BARRIER_MINIMUM_OPEN_FACTOR   3
 

Functions

u32 vl (void *p)
 
static void barrier_trace_sync (f64 t_entry, f64 t_open, f64 t_closed)
 
static void barrier_trace_sync_rec (f64 t_entry)
 
static void barrier_trace_release_rec (f64 t_entry)
 
static void barrier_trace_release (f64 t_entry, f64 t_closed_total, f64 t_update_main)
 
uword os_get_nthreads (void)
 
void vlib_set_thread_name (char *name)
 
static int sort_registrations_by_no_clone (void *a0, void *a1)
 
static uwordclib_sysfs_list_to_bitmap (char *filename)
 
clib_error_tvlib_thread_init (vlib_main_t *vm)
 
vlib_frame_queue_tvlib_frame_queue_alloc (int nelts)
 
void vl_msg_api_handler_no_free (void *)
 
void vlib_worker_thread_init (vlib_worker_thread_t *w)
 
void * vlib_worker_thread_bootstrap_fn (void *arg)
 
static void vlib_get_thread_core_socket (vlib_worker_thread_t *w, unsigned cpu_id)
 
static clib_error_tvlib_launch_thread_int (void *fp, vlib_worker_thread_t *w, unsigned cpu_id)
 
static clib_error_tstart_workers (vlib_main_t *vm)
 
static void worker_thread_node_runtime_update_internal (void)
 
void vlib_worker_thread_node_refork (void)
 
void vlib_worker_thread_node_runtime_update (void)
 
u32 unformat_sched_policy (unformat_input_t *input, va_list *args)
 
static clib_error_tcpu_config (vlib_main_t *vm, unformat_input_t *input)
 
void vnet_main_fixup (vlib_fork_fixup_t which)
 
void vlib_worker_thread_fork_fixup (vlib_fork_fixup_t which)
 
void vlib_worker_thread_initial_barrier_sync_and_release (vlib_main_t *vm)
 
u8 vlib_worker_thread_barrier_held (void)
 Return true if the wroker thread barrier is held. More...
 
void vlib_worker_thread_barrier_sync_int (vlib_main_t *vm, const char *func_name)
 
void vlib_worker_thread_barrier_release (vlib_main_t *vm)
 
void vlib_worker_wait_one_loop (void)
 Wait until each of the workers has been once around the track. More...
 
int vlib_frame_queue_dequeue (vlib_main_t *vm, vlib_frame_queue_main_t *fqm)
 
void vlib_worker_thread_fn (void *arg)
 
 VLIB_REGISTER_THREAD (worker_thread_reg, static)
 
u32 vlib_frame_queue_main_init (u32 node_index, u32 frame_queue_nelts)
 
int vlib_thread_cb_register (struct vlib_main_t *vm, vlib_thread_callbacks_t *cb)
 
void vlib_process_signal_event_mt_helper (vlib_process_signal_event_mt_args_t *args)
 
void vlib_rpc_call_main_thread (void *callback, u8 *args, u32 arg_size)
 
clib_error_tthreads_init (vlib_main_t *vm)
 
static clib_error_tshow_clock_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

 DECLARE_CJ_GLOBAL_LOG
 
vlib_worker_thread_tvlib_worker_threads
 
vlib_thread_main_t vlib_thread_main
 
void * rpc_call_main_thread_cb_fn
 
static vlib_cli_command_t f_command
 (constructor) VLIB_CLI_COMMAND (f_command) More...
 

Macro Definition Documentation

◆ BARRIER_MINIMUM_OPEN_FACTOR

#define BARRIER_MINIMUM_OPEN_FACTOR   3

Definition at line 1389 of file threads.c.

◆ BARRIER_MINIMUM_OPEN_LIMIT

#define BARRIER_MINIMUM_OPEN_LIMIT   0.001

Definition at line 1385 of file threads.c.

Function Documentation

◆ barrier_trace_release()

static void barrier_trace_release ( f64  t_entry,
f64  t_closed_total,
f64  t_update_main 
)
inlinestatic

Definition at line 121 of file threads.c.

+ Here is the caller graph for this function:

◆ barrier_trace_release_rec()

static void barrier_trace_release_rec ( f64  t_entry)
inlinestatic

Definition at line 99 of file threads.c.

+ Here is the caller graph for this function:

◆ barrier_trace_sync()

static void barrier_trace_sync ( f64  t_entry,
f64  t_open,
f64  t_closed 
)
inlinestatic

Definition at line 48 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ barrier_trace_sync_rec()

static void barrier_trace_sync_rec ( f64  t_entry)
inlinestatic

Definition at line 75 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_sysfs_list_to_bitmap()

static uword* clib_sysfs_list_to_bitmap ( char *  filename)
static

Definition at line 180 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cpu_config()

static clib_error_t* cpu_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 1226 of file threads.c.

+ Here is the call graph for this function:

◆ os_get_nthreads()

uword os_get_nthreads ( void  )

Definition at line 149 of file threads.c.

+ Here is the caller graph for this function:

◆ show_clock_command_fn()

static clib_error_t* show_clock_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1920 of file threads.c.

+ Here is the call graph for this function:

◆ sort_registrations_by_no_clone()

static int sort_registrations_by_no_clone ( void *  a0,
void *  a1 
)
static

Definition at line 170 of file threads.c.

◆ start_workers()

static clib_error_t* start_workers ( vlib_main_t vm)
static

Definition at line 643 of file threads.c.

+ Here is the call graph for this function:

◆ threads_init()

clib_error_t* threads_init ( vlib_main_t vm)

Definition at line 1911 of file threads.c.

+ Here is the caller graph for this function:

◆ unformat_sched_policy()

u32 unformat_sched_policy ( unformat_input_t input,
va_list *  args 
)

Definition at line 1212 of file threads.c.

+ Here is the caller graph for this function:

◆ vl()

u32 vl ( void *  p)

Definition at line 32 of file threads.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_handler_no_free()

void vl_msg_api_handler_no_free ( void *  v)

Definition at line 414 of file threads.c.

+ Here is the caller graph for this function:

◆ vlib_frame_queue_alloc()

vlib_frame_queue_t* vlib_frame_queue_alloc ( int  nelts)

Definition at line 380 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_frame_queue_dequeue()

int vlib_frame_queue_dequeue ( vlib_main_t vm,
vlib_frame_queue_main_t fqm 
)

Definition at line 1666 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_frame_queue_main_init()

u32 vlib_frame_queue_main_init ( u32  node_index,
u32  frame_queue_nelts 
)

Definition at line 1834 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_get_thread_core_socket()

static void vlib_get_thread_core_socket ( vlib_worker_thread_t w,
unsigned  cpu_id 
)
static

Definition at line 596 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_launch_thread_int()

static clib_error_t* vlib_launch_thread_int ( void *  fp,
vlib_worker_thread_t w,
unsigned  cpu_id 
)
static

Definition at line 616 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_process_signal_event_mt_helper()

void vlib_process_signal_event_mt_helper ( vlib_process_signal_event_mt_args_t args)

Definition at line 1888 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VLIB_REGISTER_THREAD()

VLIB_REGISTER_THREAD ( worker_thread_reg  ,
static   
)
+ Here is the caller graph for this function:

◆ vlib_rpc_call_main_thread()

void vlib_rpc_call_main_thread ( void *  callback,
u8 args,
u32  arg_size 
)

Definition at line 1899 of file threads.c.

+ Here is the caller graph for this function:

◆ vlib_set_thread_name()

void vlib_set_thread_name ( char *  name)

Definition at line 155 of file threads.c.

+ Here is the caller graph for this function:

◆ vlib_thread_cb_register()

int vlib_thread_cb_register ( struct vlib_main_t vm,
vlib_thread_callbacks_t cb 
)

Definition at line 1875 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_thread_init()

clib_error_t* vlib_thread_init ( vlib_main_t vm)

Definition at line 210 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_worker_thread_barrier_held()

u8 vlib_worker_thread_barrier_held ( void  )

Return true if the wroker thread barrier is held.

Definition at line 1421 of file threads.c.

+ Here is the caller graph for this function:

◆ vlib_worker_thread_barrier_release()

void vlib_worker_thread_barrier_release ( vlib_main_t vm)

Definition at line 1520 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_worker_thread_barrier_sync_int()

void vlib_worker_thread_barrier_sync_int ( vlib_main_t vm,
const char *  func_name 
)

Definition at line 1430 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_worker_thread_bootstrap_fn()

void* vlib_worker_thread_bootstrap_fn ( void *  arg)

Definition at line 578 of file threads.c.

◆ vlib_worker_thread_fn()

void vlib_worker_thread_fn ( void *  arg)

Definition at line 1800 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_worker_thread_fork_fixup()

void vlib_worker_thread_fork_fixup ( vlib_fork_fixup_t  which)

Definition at line 1355 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_worker_thread_init()

void vlib_worker_thread_init ( vlib_worker_thread_t w)

Definition at line 541 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_worker_thread_initial_barrier_sync_and_release()

void vlib_worker_thread_initial_barrier_sync_and_release ( vlib_main_t vm)

Definition at line 1393 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_worker_thread_node_refork()

void vlib_worker_thread_node_refork ( void  )

Definition at line 1016 of file threads.c.

+ Here is the call graph for this function:

◆ vlib_worker_thread_node_runtime_update()

void vlib_worker_thread_node_runtime_update ( void  )

Definition at line 1202 of file threads.c.

+ Here is the caller graph for this function:

◆ vlib_worker_wait_one_loop()

void vlib_worker_wait_one_loop ( void  )

Wait until each of the workers has been once around the track.

Definition at line 1629 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_main_fixup()

void vnet_main_fixup ( vlib_fork_fixup_t  which)

Definition at line 1350 of file threads.c.

+ Here is the caller graph for this function:

◆ worker_thread_node_runtime_update_internal()

static void worker_thread_node_runtime_update_internal ( void  )
inlinestatic

Definition at line 964 of file threads.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DECLARE_CJ_GLOBAL_LOG

DECLARE_CJ_GLOBAL_LOG

Definition at line 28 of file threads.c.

◆ f_command

vlib_cli_command_t f_command
static
Initial value:
=
{
.path = "show clock",
.short_help = "show clock",
.function = show_clock_command_fn,
}
static clib_error_t * show_clock_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: threads.c:1920

(constructor) VLIB_CLI_COMMAND (f_command)

Definition at line 1949 of file threads.c.

◆ rpc_call_main_thread_cb_fn

void* rpc_call_main_thread_cb_fn

Definition at line 1896 of file threads.c.

◆ vlib_thread_main

vlib_thread_main_t vlib_thread_main

Definition at line 38 of file threads.c.

◆ vlib_worker_threads

vlib_worker_thread_t* vlib_worker_threads

Definition at line 37 of file threads.c.