19 #ifndef _COBALT_KERNEL_SCHED_QUOTA_H 20 #define _COBALT_KERNEL_SCHED_QUOTA_H 22 #ifndef _COBALT_KERNEL_SCHED_H 23 #error "please don't include cobalt/kernel/sched-quota.h directly" 31 #ifdef CONFIG_XENO_OPT_SCHED_QUOTA 33 #define XNSCHED_QUOTA_MIN_PRIO 1 34 #define XNSCHED_QUOTA_MAX_PRIO 255 35 #define XNSCHED_QUOTA_NR_PRIO \ 36 (XNSCHED_QUOTA_MAX_PRIO - XNSCHED_QUOTA_MIN_PRIO + 1) 38 extern struct xnsched_class xnsched_class_quota;
40 struct xnsched_quota_group {
43 xnticks_t quota_peak_ns;
44 xnticks_t run_start_ns;
45 xnticks_t run_budget_ns;
46 xnticks_t run_credit_ns;
47 struct list_head members;
48 struct list_head expired;
49 struct list_head next;
54 int quota_peak_percent;
57 struct xnsched_quota {
59 struct xntimer refill_timer;
60 struct xntimer limit_timer;
61 struct list_head groups;
64 static inline int xnsched_quota_init_thread(
struct xnthread *thread)
67 INIT_LIST_HEAD(&thread->quota_expired);
72 int xnsched_quota_create_group(
struct xnsched_quota_group *tg,
76 int xnsched_quota_destroy_group(
struct xnsched_quota_group *tg,
80 void xnsched_quota_set_limit(
struct xnsched_quota_group *tg,
81 int quota_percent,
int quota_peak_percent,
84 struct xnsched_quota_group *
85 xnsched_quota_find_group(
struct xnsched *sched,
int tgid);
87 int xnsched_quota_sum_all(
struct xnsched *sched);
Scheduling information structure.
Definition: sched.h:58