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
77bca1ae
Commit
77bca1ae
authored
2 years ago
by
fu5520tp
Browse files
Options
Downloads
Patches
Plain Diff
cleanup proc fs output method
parent
6538d597
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/sched/pb.c
+5
-25
5 additions, 25 deletions
kernel/sched/pb.c
with
5 additions
and
25 deletions
kernel/sched/pb.c
+
5
−
25
View file @
77bca1ae
...
@@ -144,7 +144,7 @@ void init_pb_rq(struct pb_rq *pb_rq)
...
@@ -144,7 +144,7 @@ void init_pb_rq(struct pb_rq *pb_rq)
pb_rq
->
n_admin_cycles
=
20
;
pb_rq
->
n_admin_cycles
=
20
;
pb_rq
->
count_admin_cycles
=
0
;
pb_rq
->
count_admin_cycles
=
0
;
pb_rq
->
mode
=
PB_DISABLED_MODE
;
pb_rq
->
mode
=
PB_DISABLED_MODE
;
pb_rq
->
c_entry
=
-
1
;
pb_rq
->
c_entry
=
0
;
pb_rq
->
size
=
0
;
pb_rq
->
size
=
0
;
pb_rq
->
pevent
=
NULL
;
pb_rq
->
pevent
=
NULL
;
pb_rq
->
is_initialized
=
0
;
pb_rq
->
is_initialized
=
0
;
...
@@ -375,12 +375,10 @@ const struct sched_class pb_sched_class = {
...
@@ -375,12 +375,10 @@ const struct sched_class pb_sched_class = {
EXPORT_SYMBOL
(
pb_sched_class
);
EXPORT_SYMBOL
(
pb_sched_class
);
///////////////////// ProcFS Ausgabe ///////////////////////////////////
/***********************************************************************
static
struct
plan_entry
dummy_plan
=
{
* /proc filesystem entry
.
n_instr
=
20000
,
* use 'cat /proc/pbsched' to read
.
task_id
=
0xCAFE
,
**********************************************************************/
.
task_struct
=
NULL
,
};
static
int
show_pbsched
(
struct
seq_file
*
seq
,
void
*
v
)
static
int
show_pbsched
(
struct
seq_file
*
seq
,
void
*
v
)
{
{
...
@@ -393,12 +391,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
...
@@ -393,12 +391,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
struct
rq
*
rq
;
struct
rq
*
rq
;
struct
pb_rq
*
pb
;
struct
pb_rq
*
pb
;
// perf event stuff here is for testing and will be deleted in the future
struct
perf_event
*
event
;
int
perf_init_res
;
u64
perf_counter
;
u64
read_error
;
int
i
;
int
i
;
struct
plan_entry
*
plan
;
struct
plan_entry
*
plan
;
...
@@ -406,8 +398,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
...
@@ -406,8 +398,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
rq
=
cpu_rq
(
cpu
);
rq
=
cpu_rq
(
cpu
);
pb
=
&
(
rq
->
pb
);
pb
=
&
(
rq
->
pb
);
perf_init_res
=
init_perf_event
(
&
dummy_plan
,
&
event
);
switch
(
pb
->
mode
)
{
switch
(
pb
->
mode
)
{
case
PB_DISABLED_MODE
:
mode
=
'D'
;
break
;
case
PB_DISABLED_MODE
:
mode
=
'D'
;
break
;
case
PB_EXEC_MODE
:
mode
=
'E'
;
break
;
case
PB_EXEC_MODE
:
mode
=
'E'
;
break
;
...
@@ -415,16 +405,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
...
@@ -415,16 +405,6 @@ static int show_pbsched(struct seq_file *seq, void *v)
default:
mode
=
'U'
;
break
;
default:
mode
=
'U'
;
break
;
}
}
read_error
=
get_perf_counter
(
event
,
&
perf_counter
);
printk
(
KERN_WARNING
"get_perf_counter: %llu
\n
"
,
perf_counter
);
terminate_perf_event
(
event
);
if
(
read_error
)
{
printk
(
KERN_WARNING
"Hi! FETCHING PERFORMANCE COUNTER IN PB SCHEDULER FAILED WITH %llu
\n
"
,
read_error
);
}
/* runqueue-specific stats */
/* runqueue-specific stats */
seq_printf
(
seq
,
seq_printf
(
seq
,
"cpu%d %c %u %llu %llu
\n
"
,
"cpu%d %c %u %llu %llu
\n
"
,
...
...
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