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

Remove restriction on maximum number of core events #28

Open
PrzemekWirkus opened this issue Oct 14, 2024 · 1 comment
Open

Remove restriction on maximum number of core events #28

PrzemekWirkus opened this issue Oct 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@PrzemekWirkus
Copy link
Collaborator

Currently we have hard limit on how many core PMU events Kernel Driver can count (and multiplex). In some situations number of core events can be insufficient.

[FutureDev] Arm Telemetry Solution metrics and other methodologies keep evolving we would need to be able to handle more events. In theory CPUs can have up to 31 GPCs (General Purpose Counters).

Number of events is specified with wperf padding algorithm, see ….. and with CLI (using -e).

wperf stat -e e0,e1,e2,e3.....,e127

Background

Currently we allocate up to MAX_MANAGED_CORE_EVENTS for user events, see https://gitlab.com/Linaro/WindowsPerf/windowsperf/-/blob/main/wperf-common/macros.h?ref_type=heads#L46:

wperf-common/macros.h:46:#define MAX_MANAGED_CORE_EVENTS             128

This is not as flexible solution and can be changed so that we can dynamically allocate number of events.

Notes:

Definition of done

  • High level: Replace all fixed data structures which use MAX_MANAGED_CORE_EVENTS with dynamic allocation.
    • We can keep static max core event support value but we can increase it to e.g. 512. So:
      • MAX_MANAGED_CORE_EVENTS would be 512 and new value of
      • “max core events per IOCTRL transfer” will be used to slice:
        • total number of events defined with -e <EVENTS_LIST> into separate IOCTRL packets what are sent to the driver from the wperf app.
          • See:
            • PMU_CTL_ASSIGN_EVENTS IOCTRL message.
            • void pmu_device::events_assign(uint32_t core_idx, std::map<enum evt_class, std::vector<struct evt_noted>> events, bool include_kernel) function.
        • total number of events' counts sent back to the app from the driver.
          • See:
            • PMU_CTL_READ_COUNTING IOCTRL message.
            • void pmu_device::core_events_read() function.
  • Use ENABLE_MAX_CORE_EVENTS macro to enable / disable in code this feature. See how we use e.g. ENABLE_SPE to weave in SPE features.
@PrzemekWirkus PrzemekWirkus added the enhancement New feature or request label Oct 14, 2024
@PrzemekWirkus
Copy link
Collaborator Author

This was investigated by Kush and we have internal Wiki page with this design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant