Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
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
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
tools
Commits
f8dd4a36
Commit
f8dd4a36
authored
5 years ago
by
qctecmdr
Committed by
Gerrit - the friendly Code Review server
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "ldrp-v2: schedinfo: Fix online cpus mask check"
parents
cc96ebf7
b8271792
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/sched_info.py
+41
-9
41 additions, 9 deletions
linux-ramdump-parser-v2/sched_info.py
with
41 additions
and
9 deletions
linux-ramdump-parser-v2/sched_info.py
+
41
−
9
View file @
f8dd4a36
...
...
@@ -15,15 +15,23 @@ from print_out import print_out_str
DEFAULT_MIGRATION_NR
=
32
DEFAULT_MIGRATION_COST
=
500000
def
mask_bitset_pos
(
cpumask
):
obj
=
[
i
for
i
in
range
(
cpumask
.
bit_length
())
if
cpumask
&
(
1
<<
i
)]
if
len
(
obj
)
==
0
:
return
None
else
:
return
obj
def
verify_active_cpus
(
ramdump
):
core_sib_off
=
ramdump
.
field_offset
(
'
struct cpu_topology
'
,
'
core_sibling
'
)
cpu_topology_addr
=
ramdump
.
address_of
(
'
cpu_topology
'
)
cpu_topology_size
=
ramdump
.
sizeof
(
'
struct cpu_topology
'
)
if
(
ramdump
.
kernel_version
>=
(
4
,
19
,
0
)):
cluster_id_off
=
ramdump
.
field_offset
(
'
struct cpu_topology
'
,
'
package_id
'
)
core_sib_off
=
ramdump
.
field_offset
(
'
struct cpu_topology
'
,
'
core_possible_sibling
'
)
else
:
cluster_id_off
=
ramdump
.
field_offset
(
'
struct cpu_topology
'
,
'
cluster_id
'
)
core_sib_off
=
ramdump
.
field_offset
(
'
struct cpu_topology
'
,
'
core_sibling
'
)
if
(
ramdump
.
kernel_version
>=
(
4
,
9
,
0
)):
cpu_online_bits
=
ramdump
.
read_word
(
'
__cpu_online_mask
'
)
...
...
@@ -72,11 +80,14 @@ def verify_active_cpus(ramdump):
min_req_cpus
=
1
if
((
cluster_nr_oncpus
-
cluster_nr_isocpus
)
<
min_req_cpus
):
print_out_str
(
"
\n
************ WARNING **************
\n
"
)
print_out_str
(
"
\t
Minimum active cpus are not available in the cluster {0}
\n
"
.
format
(
i
))
print_out_str
(
"
\t
Cluster cpus: {0:b} Online cpus: {1:b} Isolated cpus: {2:b}
\n
"
.
format
(
cluster_cpus
,
cluster_online_cpus
,
cluster_isolated_cpus
))
print_out_str
(
"
\n
***********************************
\n
"
)
print_out_str
(
"
\n
"
+
"
*
"
*
10
+
"
WARNING
"
+
"
*
"
*
10
+
"
\n
"
)
print_out_str
(
"
\t
Minimum active cpus are not available in the cluster {0}
\n
"
.
format
(
i
))
print_out_str
(
"
\t
Cluster cpus: {0} Online cpus: {1} Isolated cpus: {2}
\n
"
.
format
(
mask_bitset_pos
(
cluster_cpus
),
mask_bitset_pos
(
cluster_online_cpus
),
mask_bitset_pos
(
cluster_isolated_cpus
)))
print_out_str
(
"
*
"
*
10
+
"
WARNING
"
+
"
*
"
*
10
+
"
\n
"
)
@register_parser
(
'
--sched-info
'
,
'
Verify scheduler
\'
s various parameter status
'
)
class
Schedinfo
(
RamParser
):
...
...
@@ -87,20 +98,41 @@ class Schedinfo(RamParser):
# verify nr_migrates
sched_nr_migrate
=
self
.
ramdump
.
read_u32
(
'
sysctl_sched_nr_migrate
'
)
if
(
sched_nr_migrate
!=
DEFAULT_MIGRATION_NR
):
print_out_str
(
"
\n
************ WARNING **************
\n
"
)
print_out_str
(
"
*
"
*
5
+
"
WARNING:
"
+
"
\n
"
)
print_out_str
(
"
\t
sysctl_sched_nr_migrate has changed!!
\n
"
)
print_out_str
(
"
\t
If it is single digit, scheduler
'
s load balancer has broken in the dump
\n
"
)
# verify migration cost
sched_migration_cost
=
self
.
ramdump
.
read_u32
(
'
sysctl_sched_migration_cost
'
)
if
(
sched_migration_cost
!=
DEFAULT_MIGRATION_COST
):
print_out_str
(
"
\n
************ WARNING **************
\n
"
)
print_out_str
(
"
*
"
*
5
+
"
WARNING:
"
+
"
\n
"
)
print_out_str
(
"
\t
sysctl_sched_migration_cost has changed!!
\n
"
)
print_out_str
(
"
\t\t
Default: 500000 and Value in dump:{0}
\n
"
.
format
(
sched_migration_cost
))
# verify CFS BANDWIDTH enabled
cfs_bandwidth_enabled
=
self
.
ramdump
.
read_u32
(
'
sysctl_sched_cfs_bandwidth_slice
'
)
if
cfs_bandwidth_enabled
is
not
None
:
print_out_str
(
"
\n
************ INFORMATION **************
\n
"
)
print_out_str
(
"
*
"
*
5
+
"
INFORMATION:
"
+
"
\n
"
)
print_out_str
(
"
\t
CFS_BANDWIDTH is enabled in the dump!!
\n
"
)
print_out_str
(
"
\t
Bandwidth slice: {0}
\n
"
.
format
(
cfs_bandwidth_enabled
))
# verify rq root domain
if
(
self
.
ramdump
.
kernel_version
>=
(
4
,
9
,
0
)):
cpu_online_bits
=
self
.
ramdump
.
read_word
(
'
__cpu_online_mask
'
)
else
:
cpu_online_bits
=
self
.
ramdump
.
read_word
(
'
cpu_online_bits
'
)
runqueues_addr
=
self
.
ramdump
.
address_of
(
'
runqueues
'
)
rd_offset
=
self
.
ramdump
.
field_offset
(
'
struct rq
'
,
'
rd
'
)
sd_offset
=
self
.
ramdump
.
field_offset
(
'
struct rq
'
,
'
sd
'
)
def_rd_addr
=
self
.
ramdump
.
address_of
(
'
def_root_domain
'
)
for
cpu
in
(
mask_bitset_pos
(
cpu_online_bits
)):
rq_addr
=
runqueues_addr
+
self
.
ramdump
.
per_cpu_offset
(
cpu
)
rd
=
self
.
ramdump
.
read_word
(
rq_addr
+
rd_offset
)
sd
=
self
.
ramdump
.
read_word
(
rq_addr
+
sd_offset
)
if
rd
==
def_rd_addr
:
print_out_str
(
"
*
"
*
5
+
"
WARNING:
"
+
"
\n
"
)
print_out_str
(
"
Online cpu:{0} has attached to default sched root domain {1:x}
\n
"
.
format
(
cpu
,
def_rd_addr
))
if
sd
==
0
or
sd
==
None
:
print_out_str
(
"
*
"
*
5
+
"
WARNING:
"
+
"
\n
"
)
print_out_str
(
"
Online cpu:{0} has Null sched_domain!!
\n
"
.
format
(
cpu
))
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