Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/runqlen.bt: remove 'runnable_weight' field #2790

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

AboorvaDevarajan
Copy link
Contributor

@AboorvaDevarajan AboorvaDevarajan commented Oct 6, 2023

In this commit, the 'runnable_weight' field has been removed from the 'cfs_rq' struct in runqlen.bt to align with the current version of Linux, which no longer includes this field.

Reference to the Linux kernel commit (introduced from 5.7-rc1):

torvalds/linux@0dacee1


This script always return 0 as runqlen even when the it is actually non-zero.

Force run 4 processes affinitize'd to a single CPU (say, CPU 20) thereby making the runqlen of CPU 20 - 3-4.

Workload:
# taskset -c 20 stress-ng --cpu 4
stress-ng: info:  [68396] defaulting to a 1 day, 0 secs run per stressor
stress-ng: info:  [68396] dispatching hogs: 4 cpu
..
Running
Run the script while the workload is running
Before Patch: (value is always 0)
# ./tools/runqlen.bt 
Attaching 2 probes...
Sampling run queue length at 99 Hertz... Hit Ctrl-C to end.
^C

@runqlen: 
[0, 1)             60129 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
After Patch:
 ./tools/runqlen.bt 
Attaching 2 probes...
Sampling run queue length at 99 Hertz... Hit Ctrl-C to end.
^C

@runqlen: 
[0, 1)             57536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[1, 2)                 2 |                                                    |
[2, 3)                 0 |                                                    |
[3, 4)               454 |                                                    |
Checklist
  • Language changes are updated in man/adoc/bpftrace.adoc and if needed in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md
  • The new behaviour is covered by tests

tools/runqlen.bt Outdated Show resolved Hide resolved
In this commit, the 'runnable_weight' field has been removed from the
'cfs_rq' struct in runqlen.bt to align with the current  version of
Linux, which no longer includes this field.

Reference to the Linux kernel commit (introduced from 5.7-rc1):

torvalds/linux@0dacee1

Signed-off-by: Aboorva Devarajan <aboorvad@linux.vnet.ibm.com>
@viktormalik viktormalik merged commit 281a67a into bpftrace:master Oct 6, 2023
21 checks passed
@AboorvaDevarajan AboorvaDevarajan deleted the fix_runqlen branch October 25, 2023 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants