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
a438de76
Commit
a438de76
authored
6 years ago
by
mihairenea
Browse files
Options
Downloads
Patches
Plain Diff
comment keyword changes for consistency. pb_init_rq() changed to pb_submit_plan()
parent
6bb67961
Branches
Branches containing commit
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
+2
-2
2 additions, 2 deletions
kernel/sched/pb.c
kernel/sched/sched.h
+21
-21
21 additions, 21 deletions
kernel/sched/sched.h
with
23 additions
and
23 deletions
kernel/sched/pb.c
+
2
−
2
View file @
a438de76
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
kernel/sched/sched.h
+
21
−
21
View file @
a438de76
...
...
@@ -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
);
...
...
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