Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kernel Program Behaviour Models
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixkhals
Kernel Program Behaviour Models
Commits
b764171b
"...git@git.imp.fu-berlin.de:joschi/ixd-coding.git" did not exist on "2cf08158bee3e7e00878e7efb3568d07821864ff"
Commit
b764171b
authored
7 years ago
by
kelvin
Browse files
Options
Downloads
Patches
Plain Diff
Avoid term "idle time" rather use "free time"
parent
6176c2fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kernel/sched/pb.c
+7
-7
7 additions, 7 deletions
kernel/sched/pb.c
kernel/sched/sched.h
+7
-7
7 additions, 7 deletions
kernel/sched/sched.h
with
14 additions
and
14 deletions
kernel/sched/pb.c
+
7
−
7
View file @
b764171b
...
...
@@ -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_t
ime
,
u64
free_time
)
{
pb_rq
->
plan
[
i
].
exec_t
=
exec_t
;
pb_rq
->
plan
[
i
].
idle_t
=
idle_t
;
pb_rq
->
plan
[
i
].
exec_t
ime
=
exec_t
ime
;
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
->
idl
e_until
=
0
;
pb_rq
->
fre
e_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
.
idl
e_until
=
0
;
rq
->
pb
.
exec_until
=
rq
->
pb
.
plan
[
rq
->
pb
.
current_entry
].
exec_t
+
now
;
rq
->
pb
.
fre
e_until
=
0
;
rq
->
pb
.
exec_until
=
rq
->
pb
.
plan
[
rq
->
pb
.
current_entry
].
exec_t
ime
+
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
.
idl
e_until
=
rq
->
pb
.
plan
[
rq
->
pb
.
current_entry
].
idle_t
+
now
;
rq
->
pb
.
fre
e_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
);
...
...
This diff is collapsed.
Click to expand it.
kernel/sched/sched.h
+
7
−
7
View file @
b764171b
...
...
@@ -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
execut
ion
u64
idle_t
;
u64
exec_t
ime
;
// the amount of time
o
the
r
scheduler
modules are used after the task is
execut
ed
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
idl
e_until
;
// absolute times, which are result of current_time + exec_t
ime
or current_time +
free_time
u64
fre
e_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
.
idl
e_until
<
time
+
IDLE_PRE_SCHED_TIME
)
?
PB_EXEC_MODE
:
PB_IDLE_MODE
;
mode
=
(
rq
->
pb
.
fre
e_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_t
ime
,
u64
free_time
);
extern
void
cfs_bandwidth_usage_inc
(
void
);
extern
void
cfs_bandwidth_usage_dec
(
void
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment