Skip to content
Snippets Groups Projects
Commit a438de76 authored by mihairenea's avatar mihairenea
Browse files

comment keyword changes for consistency. pb_init_rq() changed to pb_submit_plan()

parent 6bb67961
Branches
No related tags found
No related merge requests found
......@@ -2,9 +2,9 @@
//#include "sched.h"
/*
* It is possible to initialize a runqueue only if no plan is currently executed
* It is possible submit a plan only if no plan is currently executed
*/
int pb_init_rq(struct pb_init_struct *initstr, struct rq *rq)
int pb_submit_plan(struct pb_init_struct *initstr, struct rq *rq)
{
/*
* Must be volatile to ensure correct initialization order
......
......@@ -504,44 +504,44 @@ struct cfs_rq {
* Mode of the PB scheduler
*/
enum pb_mode{
PB_DISABLED_MODE, // PB scheduler is disabled (no plan available)
PB_EXEC_MODE, // PB task is being executed
PB_ADMIN_MODE // Admin task is being executed
PB_DISABLED_MODE, // PB scheduler is disabled (no plan available)
PB_EXEC_MODE, // PB task is being executed
PB_ADMIN_MODE // Admin task is being executed
};
#define PB_MAX_PLAN_LENGTH 100
/*
* Entry for PB-Task
* A PB-Task consists of one or more 'plan_entry'
*/
struct plan_entry {
u64 n_instr; // number of instructions for a task
u64 n_instr; // number of instructions in the entry
u64 task_id;
struct task_struct *task_struct; // linux task struct
struct task_struct *task_struct; // linux task struct
};
struct pb_init_struct {
struct plan_entry *plan; // PB plan
unsigned int size; // size of the plan
struct plan_entry *plan; // plan
unsigned int size; // size of the plan
u64 n_pb_cycles; // amount of timer ticks before admin tasks are allowed to run
u64 n_admin_cycles; // amount of timer ticks before PB tasks are allowed to run
u64 n_pb_cycles; // amount of timer ticks before admin tasks are allowed to run
u64 n_admin_cycles; // amount of timer ticks before PB tasks are allowed to run
};
struct pb_rq {
struct plan_entry *plan; // PB plan
unsigned int size; // size of the plan
unsigned int c_entry; // index of currently executed entry
struct plan_entry *plan; // plan
unsigned int size; // size of the plan
unsigned int c_entry; // index of currently executed entry
u64 n_pb_cycles; // amount of timer ticks before admin tasks are allowed to run
u64 count_pb_cycles; // current timer tick count for PB tasks
u64 n_pb_cycles; // amount of timer ticks before admin tasks are allowed to run
u64 count_pb_cycles; // current timer tick count for PB tasks
u64 n_admin_cycles; // amount of timer ticks before PB tasks are allowed to run
u64 count_admin_cycles; // current timer tick count for admin tasks
u64 n_admin_cycles; // amount of timer ticks before PB tasks are allowed to run
u64 count_admin_cycles; // current timer tick count for admin tasks
enum pb_mode mode;
struct perf_event *pevent; // linux perf handle
struct perf_event *pevent; // linux perf handle
/*
* flag determining whether the plan is completely initialized and should be run
......@@ -550,7 +550,7 @@ struct pb_rq {
volatile int is_initialized;
};
int pb_init_rq(struct pb_init_struct *initstr, struct rq *rq);
int pb_submit_plan(struct pb_init_struct *initstr, struct rq *rq);
static inline int rt_bandwidth_enabled(void)
{
......@@ -2074,8 +2074,8 @@ extern void init_rt_rq(struct rt_rq *rt_rq);
extern void init_pb_rq(struct pb_rq *pb_rq);
extern void init_dl_rq(struct dl_rq *dl_rq);
extern void set_pb_plan_size(struct pb_rq *pb_rq, unsigned int size);
extern void set_pb_plan_entry(struct pb_rq *pb_rq, unsigned int i, u64 n_instr, u64 task_id, struct task_struct *task_struct);
extern void set_pb_plan_size(struct pb_rq *pb_rq, unsigned int size); // TODO: delet dis
extern void set_pb_plan_entry(struct pb_rq *pb_rq, unsigned int i, u64 n_instr, u64 task_id, struct task_struct *task_struct); // TODO: delet dis
extern void cfs_bandwidth_usage_inc(void);
extern void cfs_bandwidth_usage_dec(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment