|
Dynamic Load Balance 3.6.1+32-59d1
|
#include "LB_comm/shmem_cpuinfo.h"#include "LB_comm/shmem.h"#include "LB_core/spd.h"#include "apis/dlb_errors.h"#include "apis/dlb_types.h"#include "support/debug.h"#include "support/types.h"#include "support/mytime.h"#include "support/tracing.h"#include "support/options.h"#include "support/mask_utils.h"#include "support/queues.h"#include "support/small_array.h"#include "support/atomic.h"#include <limits.h>#include <sched.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/ioctl.h>#include "support/array_template.h"#include "support/queue_template.h"
Data Structures | |
| struct | lewi_mask_request_t |
| struct | cpuinfo_t |
| struct | cpuinfo_flags_t |
| struct | shdata_t |
Macros | |
| #define | ARRAY_T cpuid_t |
| #define | ARRAY_T cpuinfo_task_t |
| #define | ARRAY_KEY_T pid_t |
| #define | QUEUE_T pid_t |
| #define | QUEUE_SIZE 8 |
| #define | QUEUE_T lewi_mask_request_t |
| #define | QUEUE_KEY_T pid_t |
| #define | QUEUE_SIZE 1024 |
Enumerations | |
| enum | { NOBODY = 0 } |
| enum | cpu_state_t { CPU_DISABLED = 0 , CPU_BUSY , CPU_LENT , CPU_STATE_UNKNOWN = 0 , CPU_STATE_IDLE = 1 << 0 , CPU_STATE_LENT = 1 << 1 , CPU_STATE_RECLAIMED = 1 << 2 , CPU_STATE_IN_PARALLEL = 1 << 3 , CPU_STATE_FREE_AGENT_ENABLED = 1 << 4 } |
| enum | { SHMEM_CPUINFO_VERSION = 6 } |
Functions | |
| int | shmem_cpuinfo__init (pid_t pid, pid_t preinit_pid, const cpu_set_t *process_mask, const char *shmem_key, int shmem_color) |
| int | shmem_cpuinfo_ext__init (const char *shmem_key, int shmem_color) |
| int | shmem_cpuinfo_ext__preinit (pid_t pid, const cpu_set_t *mask, dlb_drom_flags_t flags) |
| int | shmem_cpuinfo__finalize (pid_t pid, const char *shmem_key, int shmem_color) |
| int | shmem_cpuinfo_ext__finalize (void) |
| int | shmem_cpuinfo_ext__postfinalize (pid_t pid) |
| int | shmem_cpuinfo__lend_cpu (pid_t pid, int cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__lend_cpu_mask (pid_t pid, const cpu_set_t *restrict mask, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__reclaim_all (pid_t pid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__reclaim_cpu (pid_t pid, int cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__reclaim_cpus (pid_t pid, int ncpus, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__reclaim_cpu_mask (pid_t pid, const cpu_set_t *restrict mask, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__acquire_cpu (pid_t pid, int cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__acquire_from_cpu_subset (pid_t pid, const array_cpuid_t *restrict array_cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__acquire_ncpus_from_cpu_subset (pid_t pid, int *restrict requested_ncpus, const array_cpuid_t *restrict cpus_priority_array, lewi_affinity_t lewi_affinity, int max_parallelism, int64_t *restrict last_borrow, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__borrow_cpu (pid_t pid, int cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__borrow_from_cpu_subset (pid_t pid, const array_cpuid_t *restrict array_cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__borrow_ncpus_from_cpu_subset (pid_t pid, int *restrict requested_ncpus, const array_cpuid_t *restrict cpus_priority_array, lewi_affinity_t lewi_affinity, int max_parallelism, int64_t *restrict last_borrow, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__return_all (pid_t pid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__return_cpu (pid_t pid, int cpuid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__return_cpu_mask (pid_t pid, const cpu_set_t *mask, array_cpuinfo_task_t *restrict tasks) |
| void | shmem_cpuinfo__return_async_cpu (pid_t pid, cpuid_t cpuid) |
| void | shmem_cpuinfo__return_async_cpu_mask (pid_t pid, const cpu_set_t *mask) |
| int | shmem_cpuinfo__deregister (pid_t pid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__reset (pid_t pid, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__update_max_parallelism (pid_t pid, unsigned int max, array_cpuinfo_task_t *restrict tasks) |
| void | shmem_cpuinfo__update_ownership (pid_t pid, const cpu_set_t *restrict process_mask, array_cpuinfo_task_t *restrict tasks) |
| int | shmem_cpuinfo__get_thread_binding (pid_t pid, int thread_num) |
| int | shmem_cpuinfo__get_nth_non_owned_cpu (pid_t pid, int nth_cpu) |
| int | shmem_cpuinfo__get_number_of_non_owned_cpus (pid_t pid) |
| int | shmem_cpuinfo__check_cpu_availability (pid_t pid, int cpuid) |
| int | shmem_cpuinfo__is_cpu_enabled (int cpuid) |
| bool | shmem_cpuinfo__exists (void) |
| void | shmem_cpuinfo__enable_request_queues (void) |
| void | shmem_cpuinfo__remove_requests (pid_t pid) |
| int | shmem_cpuinfo__version (void) |
| size_t | shmem_cpuinfo__size (void) |
| void | shmem_cpuinfo__print_info (const char *shmem_key, int shmem_color, int columns, dlb_printshmem_flags_t print_flags) |
| int | shmem_cpuinfo_testing__get_num_proc_requests (void) |
| int | shmem_cpuinfo_testing__get_num_cpu_requests (int cpuid) |
| const cpu_set_t * | shmem_cpuinfo_testing__get_free_cpu_set (void) |
| const cpu_set_t * | shmem_cpuinfo_testing__get_occupied_core_set (void) |
| #define ARRAY_T cpuid_t |
| #define ARRAY_T cpuinfo_task_t |
| #define ARRAY_KEY_T pid_t |
| #define QUEUE_T pid_t |
| #define QUEUE_SIZE 8 |
| #define QUEUE_T lewi_mask_request_t |
| #define QUEUE_KEY_T pid_t |
| #define QUEUE_SIZE 1024 |
| enum cpu_state_t |
| int shmem_cpuinfo__init | ( | pid_t | pid, |
| pid_t | preinit_pid, | ||
| const cpu_set_t * | process_mask, | ||
| const char * | shmem_key, | ||
| int | shmem_color | ||
| ) |
| int shmem_cpuinfo_ext__init | ( | const char * | shmem_key, |
| int | shmem_color | ||
| ) |
| int shmem_cpuinfo_ext__preinit | ( | pid_t | pid, |
| const cpu_set_t * | mask, | ||
| dlb_drom_flags_t | flags | ||
| ) |
| int shmem_cpuinfo__finalize | ( | pid_t | pid, |
| const char * | shmem_key, | ||
| int | shmem_color | ||
| ) |
| int shmem_cpuinfo_ext__finalize | ( | void | ) |
| int shmem_cpuinfo_ext__postfinalize | ( | pid_t | pid | ) |
| int shmem_cpuinfo__lend_cpu | ( | pid_t | pid, |
| int | cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__lend_cpu_mask | ( | pid_t | pid, |
| const cpu_set_t *restrict | mask, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__reclaim_all | ( | pid_t | pid, |
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__reclaim_cpu | ( | pid_t | pid, |
| int | cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__reclaim_cpus | ( | pid_t | pid, |
| int | ncpus, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__reclaim_cpu_mask | ( | pid_t | pid, |
| const cpu_set_t *restrict | mask, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__acquire_cpu | ( | pid_t | pid, |
| int | cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__acquire_from_cpu_subset | ( | pid_t | pid, |
| const array_cpuid_t *restrict | array_cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__acquire_ncpus_from_cpu_subset | ( | pid_t | pid, |
| int *restrict | requested_ncpus, | ||
| const array_cpuid_t *restrict | cpus_priority_array, | ||
| lewi_affinity_t | lewi_affinity, | ||
| int | max_parallelism, | ||
| int64_t *restrict | last_borrow, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__borrow_cpu | ( | pid_t | pid, |
| int | cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__borrow_from_cpu_subset | ( | pid_t | pid, |
| const array_cpuid_t *restrict | array_cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__borrow_ncpus_from_cpu_subset | ( | pid_t | pid, |
| int *restrict | requested_ncpus, | ||
| const array_cpuid_t *restrict | cpus_priority_array, | ||
| lewi_affinity_t | lewi_affinity, | ||
| int | max_parallelism, | ||
| int64_t *restrict | last_borrow, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__return_all | ( | pid_t | pid, |
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__return_cpu | ( | pid_t | pid, |
| int | cpuid, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__return_cpu_mask | ( | pid_t | pid, |
| const cpu_set_t * | mask, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| void shmem_cpuinfo__return_async_cpu | ( | pid_t | pid, |
| cpuid_t | cpuid | ||
| ) |
| void shmem_cpuinfo__return_async_cpu_mask | ( | pid_t | pid, |
| const cpu_set_t * | mask | ||
| ) |
| int shmem_cpuinfo__deregister | ( | pid_t | pid, |
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__reset | ( | pid_t | pid, |
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__update_max_parallelism | ( | pid_t | pid, |
| unsigned int | max, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| void shmem_cpuinfo__update_ownership | ( | pid_t | pid, |
| const cpu_set_t *restrict | process_mask, | ||
| array_cpuinfo_task_t *restrict | tasks | ||
| ) |
| int shmem_cpuinfo__get_thread_binding | ( | pid_t | pid, |
| int | thread_num | ||
| ) |
| int shmem_cpuinfo__get_nth_non_owned_cpu | ( | pid_t | pid, |
| int | nth_cpu | ||
| ) |
| int shmem_cpuinfo__get_number_of_non_owned_cpus | ( | pid_t | pid | ) |
| int shmem_cpuinfo__check_cpu_availability | ( | pid_t | pid, |
| int | cpuid | ||
| ) |
| int shmem_cpuinfo__is_cpu_enabled | ( | int | cpuid | ) |
| bool shmem_cpuinfo__exists | ( | void | ) |
| void shmem_cpuinfo__enable_request_queues | ( | void | ) |
| void shmem_cpuinfo__remove_requests | ( | pid_t | pid | ) |
| int shmem_cpuinfo__version | ( | void | ) |
| size_t shmem_cpuinfo__size | ( | void | ) |
| void shmem_cpuinfo__print_info | ( | const char * | shmem_key, |
| int | shmem_color, | ||
| int | columns, | ||
| dlb_printshmem_flags_t | print_flags | ||
| ) |
| int shmem_cpuinfo_testing__get_num_proc_requests | ( | void | ) |
| int shmem_cpuinfo_testing__get_num_cpu_requests | ( | int | cpuid | ) |
| const cpu_set_t * shmem_cpuinfo_testing__get_free_cpu_set | ( | void | ) |
| const cpu_set_t * shmem_cpuinfo_testing__get_occupied_core_set | ( | void | ) |