2015-04-15 14:13:22 +00:00
|
|
|
/* -*- c -*- */
|
2016-01-25 15:30:27 +00:00
|
|
|
enum {
|
|
|
|
VIR_TYPED_PARAM_INT = 1,
|
|
|
|
VIR_TYPED_PARAM_UINT = 2,
|
|
|
|
VIR_TYPED_PARAM_LLONG = 3,
|
|
|
|
VIR_TYPED_PARAM_ULLONG = 4,
|
|
|
|
VIR_TYPED_PARAM_DOUBLE = 5,
|
|
|
|
VIR_TYPED_PARAM_BOOLEAN = 6,
|
|
|
|
VIR_TYPED_PARAM_STRING = 7,
|
|
|
|
};
|
|
|
|
struct admin_typed_param_value {
|
|
|
|
int type;
|
|
|
|
union {
|
|
|
|
int i;
|
|
|
|
u_int ui;
|
|
|
|
int64_t l;
|
|
|
|
uint64_t ul;
|
|
|
|
double d;
|
|
|
|
int b;
|
|
|
|
admin_nonnull_string s;
|
|
|
|
} admin_typed_param_value_u;
|
|
|
|
};
|
|
|
|
struct admin_typed_param {
|
|
|
|
admin_nonnull_string field;
|
|
|
|
admin_typed_param_value value;
|
|
|
|
};
|
2015-08-13 14:20:27 +00:00
|
|
|
struct admin_nonnull_server {
|
|
|
|
admin_nonnull_string name;
|
|
|
|
};
|
2016-04-13 08:35:26 +00:00
|
|
|
struct admin_nonnull_client {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
uint64_t id;
|
|
|
|
int64_t timestamp;
|
|
|
|
u_int transport;
|
|
|
|
};
|
2015-12-10 12:46:45 +00:00
|
|
|
struct admin_connect_open_args {
|
2015-04-15 14:13:22 +00:00
|
|
|
u_int flags;
|
|
|
|
};
|
2015-12-10 12:46:45 +00:00
|
|
|
struct admin_connect_get_lib_version_ret {
|
2015-10-05 15:17:51 +00:00
|
|
|
uint64_t libVer;
|
|
|
|
};
|
2015-08-14 07:17:01 +00:00
|
|
|
struct admin_connect_list_servers_args {
|
|
|
|
u_int need_results;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_connect_list_servers_ret {
|
|
|
|
struct {
|
|
|
|
u_int servers_len;
|
|
|
|
admin_nonnull_server * servers_val;
|
|
|
|
} servers;
|
|
|
|
u_int ret;
|
|
|
|
};
|
2016-03-01 16:33:37 +00:00
|
|
|
struct admin_connect_lookup_server_args {
|
|
|
|
admin_nonnull_string name;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_connect_lookup_server_ret {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
};
|
2015-11-23 11:41:32 +00:00
|
|
|
struct admin_server_get_threadpool_parameters_args {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_server_get_threadpool_parameters_ret {
|
|
|
|
struct {
|
|
|
|
u_int params_len;
|
|
|
|
admin_typed_param * params_val;
|
|
|
|
} params;
|
|
|
|
};
|
admin: Introduce virAdmServerSetThreadPoolParameters
Since threadpool increments the current number of threads according to current
load, i.e. how many jobs are waiting in the queue. The count however, is
constrained by max and min limits of workers. The logic of this new API works
like this:
1) setting the minimum
a) When the limit is increased, depending on the current number of
threads, new threads are possibly spawned if the current number of
threads is less than the new minimum limit
b) Decreasing the minimum limit has no possible effect on the current
number of threads
2) setting the maximum
a) Icreasing the maximum limit has no immediate effect on the current
number of threads, it only allows the threadpool to spawn more
threads when new jobs, that would otherwise end up queued, arrive.
b) Decreasing the maximum limit may affect the current number of
threads, if the current number of threads is less than the new
maximum limit. Since there may be some ongoing time-consuming jobs
that would effectively block this API from killing any threads.
Therefore, this API is asynchronous with best-effort execution,
i.e. the necessary number of workers will be terminated once they
finish their previous job, unless other workers had already
terminated, decreasing the limit to the requested value.
3) setting priority workers
- both increase and decrease in count of these workers have an
immediate impact on the current number of workers, new ones will be
spawned or some of them get terminated respectively.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
2016-02-22 13:24:04 +00:00
|
|
|
struct admin_server_set_threadpool_parameters_args {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
struct {
|
|
|
|
u_int params_len;
|
|
|
|
admin_typed_param * params_val;
|
|
|
|
} params;
|
|
|
|
u_int flags;
|
|
|
|
};
|
2016-04-14 22:20:11 +00:00
|
|
|
struct admin_server_list_clients_args {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
u_int need_results;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_server_list_clients_ret {
|
|
|
|
struct {
|
|
|
|
u_int clients_len;
|
|
|
|
admin_nonnull_client * clients_val;
|
|
|
|
} clients;
|
|
|
|
u_int ret;
|
|
|
|
};
|
2016-04-22 07:47:09 +00:00
|
|
|
struct admin_server_lookup_client_args {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
uint64_t id;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_server_lookup_client_ret {
|
|
|
|
admin_nonnull_client clnt;
|
|
|
|
};
|
2016-04-22 11:05:42 +00:00
|
|
|
struct admin_client_get_info_args {
|
|
|
|
admin_nonnull_client clnt;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_client_get_info_ret {
|
|
|
|
struct {
|
|
|
|
u_int params_len;
|
|
|
|
admin_typed_param * params_val;
|
|
|
|
} params;
|
|
|
|
};
|
2016-04-28 08:26:25 +00:00
|
|
|
struct admin_client_close_args {
|
|
|
|
admin_nonnull_client clnt;
|
|
|
|
u_int flags;
|
|
|
|
};
|
2016-04-04 08:28:22 +00:00
|
|
|
struct admin_server_get_client_limits_args {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct admin_server_get_client_limits_ret {
|
|
|
|
struct {
|
|
|
|
u_int params_len;
|
|
|
|
admin_typed_param * params_val;
|
|
|
|
} params;
|
|
|
|
};
|
2016-04-04 12:24:52 +00:00
|
|
|
struct admin_server_set_client_limits_args {
|
|
|
|
admin_nonnull_server srv;
|
|
|
|
struct {
|
|
|
|
u_int params_len;
|
|
|
|
admin_typed_param * params_val;
|
|
|
|
} params;
|
|
|
|
u_int flags;
|
|
|
|
};
|
2015-04-15 14:13:22 +00:00
|
|
|
enum admin_procedure {
|
2015-12-10 12:46:45 +00:00
|
|
|
ADMIN_PROC_CONNECT_OPEN = 1,
|
|
|
|
ADMIN_PROC_CONNECT_CLOSE = 2,
|
|
|
|
ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3,
|
2015-08-14 07:17:01 +00:00
|
|
|
ADMIN_PROC_CONNECT_LIST_SERVERS = 4,
|
2016-03-01 16:33:37 +00:00
|
|
|
ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5,
|
2015-11-23 11:41:32 +00:00
|
|
|
ADMIN_PROC_SERVER_GET_THREADPOOL_PARAMETERS = 6,
|
admin: Introduce virAdmServerSetThreadPoolParameters
Since threadpool increments the current number of threads according to current
load, i.e. how many jobs are waiting in the queue. The count however, is
constrained by max and min limits of workers. The logic of this new API works
like this:
1) setting the minimum
a) When the limit is increased, depending on the current number of
threads, new threads are possibly spawned if the current number of
threads is less than the new minimum limit
b) Decreasing the minimum limit has no possible effect on the current
number of threads
2) setting the maximum
a) Icreasing the maximum limit has no immediate effect on the current
number of threads, it only allows the threadpool to spawn more
threads when new jobs, that would otherwise end up queued, arrive.
b) Decreasing the maximum limit may affect the current number of
threads, if the current number of threads is less than the new
maximum limit. Since there may be some ongoing time-consuming jobs
that would effectively block this API from killing any threads.
Therefore, this API is asynchronous with best-effort execution,
i.e. the necessary number of workers will be terminated once they
finish their previous job, unless other workers had already
terminated, decreasing the limit to the requested value.
3) setting priority workers
- both increase and decrease in count of these workers have an
immediate impact on the current number of workers, new ones will be
spawned or some of them get terminated respectively.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
2016-02-22 13:24:04 +00:00
|
|
|
ADMIN_PROC_SERVER_SET_THREADPOOL_PARAMETERS = 7,
|
2016-04-14 22:20:11 +00:00
|
|
|
ADMIN_PROC_SERVER_LIST_CLIENTS = 8,
|
2016-04-22 07:47:09 +00:00
|
|
|
ADMIN_PROC_SERVER_LOOKUP_CLIENT = 9,
|
2016-04-22 11:05:42 +00:00
|
|
|
ADMIN_PROC_CLIENT_GET_INFO = 10,
|
2016-04-28 08:26:25 +00:00
|
|
|
ADMIN_PROC_CLIENT_CLOSE = 11,
|
2016-04-04 08:28:22 +00:00
|
|
|
ADMIN_PROC_SERVER_GET_CLIENT_LIMITS = 12,
|
2016-04-04 12:24:52 +00:00
|
|
|
ADMIN_PROC_SERVER_SET_CLIENT_LIMITS = 13,
|
2015-04-15 14:13:22 +00:00
|
|
|
};
|