vshost-util-vserver

Build script and sources for util-vserver.
git clone https://ccx.te2000.cz/git/vshost-util-vserver
Log | Files | Refs

sched_cmd.h (1944B)


      1 #ifndef _VX_SCHED_CMD_H
      2 #define _VX_SCHED_CMD_H
      3 
      4 
      5 /*  sched vserver commands */
      6 
      7 #define VCMD_set_sched_v2	VC_CMD(SCHED, 1, 2)
      8 #define VCMD_set_sched_v3	VC_CMD(SCHED, 1, 3)
      9 #define VCMD_set_sched_v4	VC_CMD(SCHED, 1, 4)
     10 
     11 struct	vcmd_set_sched_v2 {
     12 	int32_t fill_rate;
     13 	int32_t interval;
     14 	int32_t tokens;
     15 	int32_t tokens_min;
     16 	int32_t tokens_max;
     17 	uint64_t cpu_mask;
     18 };
     19 
     20 struct	vcmd_set_sched_v3 {
     21 	uint32_t set_mask;
     22 	int32_t fill_rate;
     23 	int32_t interval;
     24 	int32_t tokens;
     25 	int32_t tokens_min;
     26 	int32_t tokens_max;
     27 	int32_t priority_bias;
     28 };
     29 
     30 struct	vcmd_set_sched_v4 {
     31 	uint32_t set_mask;
     32 	int32_t fill_rate;
     33 	int32_t interval;
     34 	int32_t tokens;
     35 	int32_t tokens_min;
     36 	int32_t tokens_max;
     37 	int32_t prio_bias;
     38 	int32_t cpu_id;
     39 	int32_t bucket_id;
     40 };
     41 
     42 #define VCMD_set_sched		VC_CMD(SCHED, 1, 5)
     43 #define VCMD_get_sched		VC_CMD(SCHED, 2, 5)
     44 
     45 struct	vcmd_sched_v5 {
     46 	uint32_t mask;
     47 	int32_t cpu_id;
     48 	int32_t bucket_id;
     49 	int32_t fill_rate[2];
     50 	int32_t interval[2];
     51 	int32_t tokens;
     52 	int32_t tokens_min;
     53 	int32_t tokens_max;
     54 	int32_t prio_bias;
     55 };
     56 
     57 #define VXSM_FILL_RATE		0x0001
     58 #define VXSM_INTERVAL		0x0002
     59 #define VXSM_FILL_RATE2		0x0004
     60 #define VXSM_INTERVAL2		0x0008
     61 #define VXSM_TOKENS		0x0010
     62 #define VXSM_TOKENS_MIN		0x0020
     63 #define VXSM_TOKENS_MAX		0x0040
     64 #define VXSM_PRIO_BIAS		0x0100
     65 
     66 #define VXSM_IDLE_TIME		0x0200
     67 #define VXSM_FORCE		0x0400
     68 
     69 #define	VXSM_V3_MASK		0x0173
     70 #define	VXSM_SET_MASK		0x01FF
     71 
     72 #define VXSM_CPU_ID		0x1000
     73 #define VXSM_BUCKET_ID		0x2000
     74 
     75 #define VXSM_MSEC		0x4000
     76 
     77 #define SCHED_KEEP		(-2)	/* only for v2 */
     78 
     79 
     80 #define VCMD_sched_info		VC_CMD(SCHED, 3, 0)
     81 
     82 struct	vcmd_sched_info {
     83 	int32_t cpu_id;
     84 	int32_t bucket_id;
     85 	uint64_t user_msec;
     86 	uint64_t sys_msec;
     87 	uint64_t hold_msec;
     88 	uint32_t token_usec;
     89 	int32_t vavavoom;
     90 };
     91 
     92 struct	vcmd_prio_bias {
     93 	int32_t cpu_id;
     94 	int32_t prio_bias;
     95 };
     96 
     97 #define VCMD_set_prio_bias	VC_CMD(SCHED, 4, 0)
     98 #define VCMD_get_prio_bias	VC_CMD(SCHED, 5, 0)
     99 
    100 #endif	/* _VX_SCHED_CMD_H */