-
Notifications
You must be signed in to change notification settings - Fork 195
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
setting GRUB_CMDLINE_LINUX, example usage of perf c2c #420
base: main
Are you sure you want to change the base?
Conversation
perfrunbook/debug_hw_perf.md
Outdated
@@ -230,6 +231,11 @@ the samples directly, you can use the [Arm SPE Parser](https://gitlab.arm.com/te | |||
|
|||
Be aware that SPE produces a large of volume of data (many GBs) if the sampling period is low and you collect the data over a long time. | |||
|
|||
### Capturing cache coherence issues | |||
The `perf c2c` command can be used to analyze cache coherence issues and false sharing in multi-core systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add info that this uses SPE on Graviton, which is only available on metal instances, and requires loading the SPE driver (apt-get install linux-modules-extra-$(uname -r) && modprobe arm_spe_pmu
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add for AL as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing text does have instructions to load the SPE driver. So, not adding those again in this PR.
perfrunbook/debug_hw_perf.md
Outdated
@@ -213,7 +213,8 @@ On Ubuntu to enable SPE requires four extra steps | |||
# Install the arm_spe_pmu.ko module | |||
sudo apt install linux-modules-extra-$(uname -r) | |||
|
|||
# Add kpti=off to the kernel boot command line | |||
# Add kpti=off to the kernel boot command line: GRUB_CMDLINE_LINUX, to set it for all the installed kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Modify the kernel boot arguments for all installed kernels by adding kpti=off
to GRUB_CMDLINE_LINUX in /etc/default/grub"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe provide a quick inline change cmd to it? something like:
sed -i -E 's/^(GRUB_CMDLINE_LINUX=".*)"/\1 kpti=off"/g' /etc/default/grub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sed
command is tricky to get right in all situations, e.g. what if the line already sets kpti
, or there is no GRUB_CMDLINE_LINUX
line?
It's better to explain what to do so the user knows where/what to modify, rather than copy/paste something harder to understand and potentially faulty or suboptimal.
Signed-off-by: Rama Malladi <[email protected]>
efb5540
to
078d051
Compare
This PR adds an example usage of
perf c2c
and setting theGRUB_CMDLINE_LINUX
for using SPE.Related issues: #415
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.