Skip to content
Snippets Groups Projects
Commit b764171b authored by kelvin's avatar kelvin
Browse files

Avoid term "idle time" rather use "free time"

parent 6176c2fb
No related branches found
No related tags found
No related merge requests found
......@@ -11,17 +11,17 @@ void set_pb_plan_size(struct pb_rq *pb_rq, unsigned int size)
}
EXPORT_SYMBOL(set_pb_plan_size);
void set_pb_plan_entry(struct pb_rq *pb_rq, unsigned int i, u64 exec_t, u64 idle_t)
void set_pb_plan_entry(struct pb_rq *pb_rq, unsigned int i, u64 exec_time, u64 free_time)
{
pb_rq->plan[i].exec_t = exec_t;
pb_rq->plan[i].idle_t = idle_t;
pb_rq->plan[i].exec_time = exec_time;
pb_rq->plan[i].free_time = free_time;
}
EXPORT_SYMBOL(set_pb_plan_entry);
// called by core.c sched_init
void init_pb_rq(struct pb_rq *pb_rq)
{
pb_rq->idle_until = 0;
pb_rq->free_until = 0;
pb_rq->exec_until = 0;
pb_rq->mode = PB_DISABLED_MODE;
pb_rq->current_entry = 0;
......@@ -86,8 +86,8 @@ pick_next_task_pb(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
next_mode == PB_EXEC_MODE)
{
rq->pb.mode = next_mode;
rq->pb.idle_until = 0;
rq->pb.exec_until = rq->pb.plan[rq->pb.current_entry].exec_t + now;
rq->pb.free_until = 0;
rq->pb.exec_until = rq->pb.plan[rq->pb.current_entry].exec_time + now;
picked = rq->pb.loop_task;
if (current_mode == PB_IDLE_MODE)
......@@ -98,7 +98,7 @@ pick_next_task_pb(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
else if (current_mode == PB_EXEC_MODE && next_mode == PB_IDLE_MODE)
{
rq->pb.mode = next_mode;
rq->pb.idle_until = rq->pb.plan[rq->pb.current_entry].idle_t + now;
rq->pb.free_until = rq->pb.plan[rq->pb.current_entry].free_time + now;
rq->pb.exec_until = 0;
printk(KERN_DEBUG "EXEC,STOP,%u,%llu\n", rq->pb.current_entry, now);
......
......@@ -518,9 +518,9 @@ static inline int rt_bandwidth_enabled(void)
struct plan_entry {
// the amount of time the task should be executed
u64 exec_t;
// the amount of time the scheduler should idle after execution
u64 idle_t;
u64 exec_time;
// the amount of time other scheduler modules are used after the task is executed
u64 free_time;
};
struct pb_rq {
......@@ -531,8 +531,8 @@ struct pb_rq {
unsigned int current_entry;
// pointer to the dummy task
struct task_struct *loop_task;
// absolute times, which are result of current_time + exec_t or current_time + idle_t
u64 idle_until;
// absolute times, which are result of current_time + exec_time or current_time + free_time
u64 free_until;
u64 exec_until;
// mode of the PB-Scheduler (introduced to improve the readability)
// one of PB_DISABLED_MODE, PB_EXEC_MODE, PB_IDLE_MODE
......@@ -867,7 +867,7 @@ static inline int determine_next_mode_pd(u64 time, struct rq *rq)
}
else if (rq->pb.mode == PB_IDLE_MODE)
{
mode = (rq->pb.idle_until < time + IDLE_PRE_SCHED_TIME) ? PB_EXEC_MODE : PB_IDLE_MODE;
mode = (rq->pb.free_until < time + IDLE_PRE_SCHED_TIME) ? PB_EXEC_MODE : PB_IDLE_MODE;
}
}
}
......@@ -2034,7 +2034,7 @@ 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 exec_t, u64 idle_t);
extern void set_pb_plan_entry(struct pb_rq *pb_rq, unsigned int i, u64 exec_time, u64 free_time);
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