Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

[Draft] [SPE] Add jitter to SPE functionality #70

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PrzemekWirkus
Copy link
Collaborator

@PrzemekWirkus PrzemekWirkus commented Nov 8, 2024

Description

** This is work in progress **

In this patch I'm introducing jitter to SPE configuration. Below two new arm_+spe_0

  • jitter=1 - use jitter to avoid resonance when sampling (PMSIRR.RND).
  • period=<n> - The sample period is set in Linux perf from the -c option. We will pass it to SPE configuration as new filter period=<n> as -c is taken in wperf CLI for other setting.
    • Because the minimum interval is used by default it’s recommended to set this to a higher value. The value is written to PMSIRR.INTERVAL.
  • added isb() after every sysreg write to make sure change propagates.

Testing

This patch is causing below issue in WindowsPerf, and needs further investigation.

>wperf record -e arm_spe_0/ld=1/ -c 7 --timeout 10 -- cpython\PCbuild\arm64\python_d.exe -c 10**10**100
...
runtime delta: 0x7ff69a700000
sampling ...error: DeviceIoControl failed: GetLastError=ea
PMU_CTL_SPE_GET_BUFFER failed

- The sample period is set from the `period`, and because the minimum
interval is used by default it’s recommended to set this to a higher
value. The value is written to PMSIRR.INTERVAL.
- `jitter=1` - use jitter to avoid resonance when sampling (PMSIRR.RND).
@PrzemekWirkus PrzemekWirkus marked this pull request as draft November 8, 2024 13:05
@PrzemekWirkus PrzemekWirkus self-assigned this Nov 8, 2024
@PrzemekWirkus PrzemekWirkus added the enhancement New feature or request label Nov 8, 2024
@PrzemekWirkus PrzemekWirkus added this to the v4.0.0 milestone Nov 8, 2024
@PrzemekWirkus PrzemekWirkus changed the title [Draft] [SPE] Add jutter to SPE functionality [Draft] [SPE] Add jitter to SPE functionality Nov 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants