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

scx_layered: Refactor dsq_lat script #1058

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

hodgesds
Copy link
Contributor

@hodgesds hodgesds commented Dec 6, 2024

Refactor the dsq_lat.bt script to be more precise with accounting for DSQ latencies by timestamping when a task is put onto a DSQ. Track the DSQ that the task was dispatched onto in a separate BPF map. Add support for filtering by DSQ.

Example with scx_layered:

@dsq_hist_usec[4]: 
[4, 8)               195 |                                                    |
[8, 16)            10438 |@@@@@                                               |
[16, 32)            7056 |@@@                                                 |
[32, 64)            3010 |@                                                   |
[64, 128)            699 |                                                    |
[128, 256)           381 |                                                    |
[256, 512)           153 |                                                    |
[512, 1K)          98524 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[1K, 2K)            2002 |@                                                   |
[2K, 4K)              46 |                                                    |

@dsq_hist_usec[5]: 
[4, 8)               111 |                                                    |
[8, 16)             9211 |@@@@                                                |
[16, 32)           13030 |@@@@@@@                                             |
[32, 64)            7571 |@@@@                                                |
[64, 128)           1162 |                                                    |
[128, 256)           567 |                                                    |
[256, 512)           286 |                                                    |
[512, 1K)          96681 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[1K, 2K)            2064 |@                                                   |
[2K, 4K)              15 |                                                    |

@dsq_hist_usec[6]: 
[1]                   69 |                                                    |
[2, 4)              2241 |@@@@                                                |
[4, 8)             10292 |@@@@@@@@@@@@@@@@@@@@                                |
[8, 16)            26206 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[16, 32)           19143 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@               |
[32, 64)           16863 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                   |
[64, 128)          15885 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                     |
[128, 256)         16185 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                    |
[256, 512)         18688 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@               |
[512, 1K)          20684 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@           |
[1K, 2K)            4282 |@@@@@@@@                                            |
[2K, 4K)            1163 |@@                                                  |
[4K, 8K)             368 |                                                    |
[8K, 16K)            117 |                                                    |

@dsq_lat_avg_usec[6]: 272
@dsq_lat_avg_usec[1]: 715
@dsq_lat_avg_usec[5]: 768
@dsq_lat_avg_usec[7]: 826
@dsq_lat_avg_usec[4]: 835
@dsq_lat_avg_usec[1024]: 21111
@dsq_lat_avg_usec[1025]: 73858

Refactor the dsq_lat.bt script to be more precise with accounting for
DSQ latencies by timestamping when a task is put onto a DSQ. Track the
DSQ that the task was dispatched onto in a separate BPF map. Add support
for filtering by DSQ.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
Copy link
Contributor

@likewhatevs likewhatevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hodgesds hodgesds added this pull request to the merge queue Dec 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 7, 2024
@hodgesds hodgesds added this pull request to the merge queue Dec 7, 2024
Merged via the queue into sched-ext:main with commit fefe29b Dec 7, 2024
23 checks passed
@hodgesds hodgesds deleted the dsq-lat-refactor branch December 7, 2024 14:33
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.

3 participants