Skip to content

Add PMU_L3D_Cache_WB suite - #731

Open
vnarapar wants to merge 2 commits into
qualcomm-linux:mainfrom
vnarapar:pmu-l3d-cache-wb
Open

vnarapar wants to merge 2 commits into
qualcomm-linux:mainfrom
vnarapar:pmu-l3d-cache-wb

Conversation

@vnarapar

Copy link
Copy Markdown
Contributor

Summary

Adds the PMU_L3D_Cache_WB suite (PR 5 of 5 PMU validation PRs): run.sh, LAVA YAML and README under Runner/suites/Kernel/Baseport/PMU_L3D_Cache_WB.

l3d_cache_wb encodes as event=0x2c, counts on each PMU instance exposing it, counts in N concurrent perf sessions (event sharing), and groups with cycles. SKIPs when no PMU exposes the event.

Merge order

Depends on #727 - merge #727 first. This suite uses Runner/utils/lib_pmu.sh introduced there. This branch is based on #727, so until it merges the diff also shows its commit. Once #727 is merged, only this suite's commit remains. PRs 2-5 are independent of each other and can merge in any order after #727.

Validation

  • ShellCheck 0.9.0 with the CI flags (-s sh -e SC1091,SC2230,SC3043): clean.
  • sh -n syntax check: clean. Git modes: run.sh 100755, YAML and README 100644.
  • Not yet run on target hardware. SKIPs when perf or an armv8_pmuv3 PMU is absent.

if [ -n "$share_cpu" ]; then
n=1
while [ "$n" -le "$SHARE_SESSIONS" ]; do
(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can pass without exercising concurrent event sharing. Each background job starts its own short workload immediately, and the verdict only checks that every CSV has a positive count, so a fast target can finish one session before the later sessions start and still report sharing PASS. Add a start gate or a shared long-running workload, then verify the sessions overlapped before accepting the counts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 8012261. Sessions are held at a start gate until all are running, then each streams memory for --share-seconds (default 3). The test records start/end times and fails unless the latest start is before the earliest end.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified against the current head, the start gate and timestamp check now require real session overlap before reporting the sharing PASS. No further action is needed on this thread.

fi
;;
2|3)
test_result_record FAIL "$dev/$EVENT_NAME/ is exposed in sysfs but cannot be counted, see $out"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perf failures leave the decisive error only in target-local CSV files, while the YAML publishes only the .res file. Replay the saved perf output with the existing log_file_with_label helper after preserving the command status, and apply the same pattern to the discovery perf-list failure and the L3D shared and grouped failures.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 8012261. Per-PMU, shared-session and grouped failures now replay the perf output with pmu_replay_output. The discovery perf list failures are covered in the #727 commit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified against the current head, the retained perf output is replayed before the affected discovery, per-PMU, shared-session and grouped failures are recorded. No further action is needed on this thread.

Add Runner/utils/lib_pmu.sh with helpers to discover armv8_pmuv3 PMU
instances from sysfs and to run bounded, optionally CPU-pinned perf stat
measurements. Add the PMU_Discovery suite that validates the perf type id,
event format, named and architected events, CPU coverage and perf hardware
event listing.

Signed-off-by: Vamsee Narapareddi <vnarapar@qti.qualcomm.com>
Validate the armv8_pmuv3 l3d_cache_wb event: encoding, counting, concurrent event sharing across perf sessions and grouping with cycles.

Signed-off-by: Vamsee Narapareddi <vnarapar@qti.qualcomm.com>

This branch has not been deployed

No deployments
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