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
6bb67961
Commit
6bb67961
authored
6 years ago
by
meto
Browse files
Options
Downloads
Patches
Plain Diff
Fixing kernel builds.
Deleted new headers Fixed pointers Fixed loop includes
parent
17fc54fb
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/perf_error_detection.c
+1
-1
1 addition, 1 deletion
kernel/sched/perf_error_detection.c
kernel/sched/sched.h
+47
-46
47 additions, 46 deletions
kernel/sched/sched.h
with
48 additions
and
47 deletions
kernel/sched/perf_error_detection.c
+
1
−
1
View file @
6bb67961
...
@@ -21,7 +21,7 @@ int init_perf_event(struct plan_entry *plan_entry, struct perf_event **pevent){
...
@@ -21,7 +21,7 @@ int init_perf_event(struct plan_entry *plan_entry, struct perf_event **pevent){
pe
.
type
=
PERF_TYPE_HARDWARE
;
pe
.
type
=
PERF_TYPE_HARDWARE
;
pe
.
size
=
sizeof
(
struct
perf_event_attr
);
pe
.
size
=
sizeof
(
struct
perf_event_attr
);
pe
.
config
=
PERF_COUNT_HW_INSTRUCTIONS
;
pe
.
config
=
PERF_COUNT_HW_INSTRUCTIONS
;
pe
.
sample_period
=
plan_entry
.
n_instr
;
pe
.
sample_period
=
plan_entry
->
n_instr
;
pe
.
disabled
=
0
;
// start the counter as soon as we're in userland
pe
.
disabled
=
0
;
// start the counter as soon as we're in userland
pe
.
pinned
=
1
;
// ?
pe
.
pinned
=
1
;
// ?
pe
.
exclude_kernel
=
1
;
pe
.
exclude_kernel
=
1
;
...
...
This diff is collapsed.
Click to expand it.
kernel/sched/sched.h
+
47
−
46
View file @
6bb67961
...
@@ -551,52 +551,6 @@ struct pb_rq {
...
@@ -551,52 +551,6 @@ struct pb_rq {
};
};
int
pb_init_rq
(
struct
pb_init_struct
*
initstr
,
struct
rq
*
rq
);
int
pb_init_rq
(
struct
pb_init_struct
*
initstr
,
struct
rq
*
rq
);
// used to determine the next mode of the PB-Scheduler
// This function is located in sched.h since pb.c and fair.c are using this function
static
inline
int
determine_next_mode_pb
(
struct
rq
*
rq
)
{
int
mode
=
PB_DISABLED_MODE
;
struct
pb_rq
*
pb
=
&
(
rq
->
pb
);
if
(
pb
->
c_entry
<
pb
->
size
)
{
// initial switch
if
(
pb
->
mode
==
PB_DISABLED_MODE
&&
pb
->
is_initialized
)
{
return
PB_EXEC_MODE
;
}
else
{
if
(
pb
->
mode
==
PB_EXEC_MODE
)
{
//stay for n timer interrupts cycles in exec mode
/*
* Is the tick interrupt active in this moment?
*/
if
(
pb
->
count_pb_cycles
>
pb
->
n_pb_cycles
){
mode
=
PB_ADMIN_MODE
;
pb
->
count_pb_cycles
=
0
;
}
else
{
mode
=
PB_EXEC_MODE
;
}
}
else
if
(
pb
->
mode
==
PB_ADMIN_MODE
)
{
//stay for n timer interrupt cylces in uall mode for admin tasks
/*
* Is the tick interrupt active in this moment?
*/
if
(
pb
->
count_admin_cycles
>
pb
->
n_admin_cycles
){
mode
=
PB_EXEC_MODE
;
pb
->
count_admin_cycles
=
0
;
}
else
{
mode
=
PB_ADMIN_MODE
;
}
}
}
}
return
mode
;
}
static
inline
int
rt_bandwidth_enabled
(
void
)
static
inline
int
rt_bandwidth_enabled
(
void
)
{
{
...
@@ -914,6 +868,53 @@ static inline int cpu_of(struct rq *rq)
...
@@ -914,6 +868,53 @@ static inline int cpu_of(struct rq *rq)
#endif
#endif
}
}
// used to determine the next mode of the PB-Scheduler
// This function is located in sched.h since pb.c and fair.c are using this function
static
inline
int
determine_next_mode_pb
(
struct
rq
*
rq
)
{
int
mode
=
PB_DISABLED_MODE
;
struct
pb_rq
*
pb
=
&
(
rq
->
pb
);
if
(
pb
->
c_entry
<
pb
->
size
)
{
// initial switch
if
(
pb
->
mode
==
PB_DISABLED_MODE
&&
pb
->
is_initialized
)
{
return
PB_EXEC_MODE
;
}
else
{
if
(
pb
->
mode
==
PB_EXEC_MODE
)
{
//stay for n timer interrupts cycles in exec mode
/*
* Is the tick interrupt active in this moment?
*/
if
(
pb
->
count_pb_cycles
>
pb
->
n_pb_cycles
){
mode
=
PB_ADMIN_MODE
;
pb
->
count_pb_cycles
=
0
;
}
else
{
mode
=
PB_EXEC_MODE
;
}
}
else
if
(
pb
->
mode
==
PB_ADMIN_MODE
)
{
//stay for n timer interrupt cylces in uall mode for admin tasks
/*
* Is the tick interrupt active in this moment?
*/
if
(
pb
->
count_admin_cycles
>
pb
->
n_admin_cycles
){
mode
=
PB_EXEC_MODE
;
pb
->
count_admin_cycles
=
0
;
}
else
{
mode
=
PB_ADMIN_MODE
;
}
}
}
}
return
mode
;
}
#ifdef CONFIG_SCHED_SMT
#ifdef CONFIG_SCHED_SMT
...
...
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