mlxbf-pmc: Support 64-bit counter and counting cycles
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-bluefield (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
SRU Justification:
[Impact]
Currently, there is no method to keep track of the cycle count when an event is being monitored. And since cycle count increments quickly, the 32-bit counter values could wrap around and hence support for 64-bit counters is also needed for the same.
[Fix]
Expose 2 additional sysfs entries: count_clock and use_odd_counter. These fields are supported in BlueField-3 PMC hardware and each bit in count_clock corresponds to each counter, while each bit in use_odd_counter corresponds to an even counter.Exposing these fields will allow the user to program any counter of choice to monitor the cycle count for the required duration. Similarly, use_odd_counter can be set to couple 2 adjacent odd and even counters to form a 64-bit counter.
[Test Case]
1. Verify that count_clock and use_odd_counter sysfs entries are created for each BlueField-3 HW block. These are not supported by BlueField-1 or BlueField-2 HW.
2. Set any bit in count_clock and check if the corresponding counter values increment after enabling.
3. Set any bit in use_odd_counter and check if the cycle count increments on 2 counters with the odd counter being the lower 32 bits and the even counter being the upper 32 bits.
[Regression Potential]
Can be considered minimal.
Changed in linux-bluefield (Ubuntu): | |
status: | New → Invalid |
Changed in linux-bluefield (Ubuntu Jammy): | |
status: | New → Fix Committed |
tags: |
added: verification-done-jammy-linux-bluefield removed: verification-needed-jammy-linux-bluefield |
This bug is awaiting verification that the linux-bluefield /5.15.0- 1031.33 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification- needed- jammy-linux- bluefield' to 'verification- done-jammy- linux-bluefield '. If the problem still exists, change the tag 'verification- needed- jammy-linux- bluefield' to 'verification- failed- jammy-linux- bluefield' .
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you!