aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/hypervisor-ifs/sched_ctl.h
blob: 0c298f76d6c667e4283cb3f916ab1993ed921387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
 * Generic scheduler control interface.
 *
 * Mark Williamson, (C) 2004 Intel Research Cambridge
 */

#ifndef __SCHED_CTL_H__
#define __SCHED_CTL_H__

/* Scheduler types */
#define SCHED_BVT      0
#define SCHED_ATROPOS  2
#define SCHED_RROBIN   3

/* these describe the intended direction used for a scheduler control or domain
 * command */
#define SCHED_INFO_PUT 0
#define SCHED_INFO_GET 1

/*
 * Generic scheduler control command - used to adjust system-wide scheduler
 * parameters
 */
struct sched_ctl_cmd
{
    u32 sched_id;                     /*  0 */
    u32 direction;                    /*  4 */
    union {                           /*  8 */
        struct bvt_ctl
        {
            /* IN variables. */
            u32 ctx_allow;            /*  8: context switch allowance */
        } PACKED bvt;

        struct rrobin_ctl
        {
            /* IN variables */
            u64 slice;                /*  8: round robin time slice */
        } PACKED rrobin;
    } PACKED u;
} PACKED; /* 16 bytes */

struct sched_adjdom_cmd
{
    u32     sched_id;                 /*  0 */
    u32     direction;                /*  4 */
    domid_t domain;                   /*  8 */
    u16     __pad0;
    u32     __pad1;
    union {                           /* 16 */
        struct bvt_adjdom
        {
            u32 mcu_adv;            /* 16: mcu advance: inverse of weight */
            u32 warpback;           /* 20: warp? */
            s32 warpvalue;          /* 24: warp value */
            long long warpl;        /* 32: warp limit */
            long long warpu;        /* 40: unwarp time requirement */
        } PACKED bvt;

        struct atropos_adjdom
        {
            u64 nat_period; /* 16 */
            u64 nat_slice;  /* 24 */
            u64 latency;    /* 32 */
            u32 xtratime;   /* 36 */
        } PACKED atropos;
    } PACKED u;
} PACKED; /* 40 bytes */

#endif /* __SCHED_CTL_H__ */