-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs #6051
Conversation
Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
retest vsimage please |
what if the platform uses non intel cpu? like amd cpu or arm cpu? |
@shlomibitton please check if we can read a parameter which identify this is intel cpu and add it only for it. |
@lguohan I added a condition to change it only for 'Intel' CPUs. |
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.
As comment
is this incorrect? state should be 0, right? |
check out this one. why do they set both processor.max-cstate=1 and intel_idle.max_cstate=0? why do you only set intel_idle.max_cstate? |
No, state 0 means the CPU is currently active.
by using "processor.max-cstate=1" we limit the c-states level to a certain level, but this is not needed when using "intel_idle.max_cstate=0" because this is disables the driver, forcing it to stay active all the time. |
…6051) Usually for a use case like networking - should not be configured to reach c6, the maximum used is c1e – due to the added latency getting in & out of states (bad for networking). Following a recommendation by Intel, networking system should avoid getting in & out of states which introduce latency. The recommended state is c1e and no state change enabling. In addition, c-state sole purpose is to save power and when inside a networking switch its really negligent being such a tiny consumer vs. the whole cluster. Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
The motivation of these changes is to fix (#6051): - Why I did it To fix CPU cstates configuration - How I did it Updated code to be POSIX compatible - How to verify it root@sonic:/home/admin# sonic_installer install sonic-mellanox.bin Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
The motivation of these changes is to fix (#6051): - Why I did it To fix CPU cstates configuration - How I did it Updated code to be POSIX compatible - How to verify it root@sonic:/home/admin# sonic_installer install sonic-mellanox.bin Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
The motivation of these changes is to fix (#6051): - Why I did it To fix CPU cstates configuration - How I did it Updated code to be POSIX compatible - How to verify it root@sonic:/home/admin# sonic_installer install sonic-mellanox.bin Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
The motivation of these changes is to fix (sonic-net#6051): - Why I did it To fix CPU cstates configuration - How I did it Updated code to be POSIX compatible - How to verify it root@sonic:/home/admin# sonic_installer install sonic-mellanox.bin Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
The motivation of these changes is to fix (sonic-net#6051): - Why I did it To fix CPU cstates configuration - How I did it Updated code to be POSIX compatible - How to verify it root@sonic:/home/admin# sonic_installer install sonic-mellanox.bin Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
Why I did it This is a fix for PR [kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs by shlomibitton · Pull Request #6051 · sonic-net/sonic-buildimage (github.com) The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. How I did it Add the option to installer file beside intel_idle.max_cstate=0
Why I did it This is a fix for PR [kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs by shlomibitton · Pull Request sonic-net#6051 · sonic-net/sonic-buildimage (github.com) The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. How I did it Add the option to installer file beside intel_idle.max_cstate=0
Why I did it This is a fix for PR [kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs by shlomibitton · Pull Request #6051 · sonic-net/sonic-buildimage (github.com) The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. How I did it Add the option to installer file beside intel_idle.max_cstate=0
…tel cpu (#16371) This is a fix for PR #6051 The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. Work item tracking Microsoft ADO (number only): 24867921 How I did it Add the option to installer file beside intel_idle.max_cstate=0 Signed-off-by: Xichen Lin <lukelin0907@gmail.com>
Why I did it This is a fix for PR [kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs by shlomibitton · Pull Request sonic-net#6051 · sonic-net/sonic-buildimage (github.com) The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. How I did it Add the option to installer file beside intel_idle.max_cstate=0
Why I did it This is a fix for PR [kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs by shlomibitton · Pull Request sonic-net#6051 · sonic-net/sonic-buildimage (github.com) The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. How I did it Add the option to installer file beside intel_idle.max_cstate=0
This is a fix for PR [kernel] Change grub cmdline to set c-states to 0 for "Intel" CPUs by shlomibitton · Pull Request #6051 · sonic-net/sonic-buildimage (github.com) The original PR will disable intel idle driver but it cannot limit the max c-state to 1 due to system will fall back to acpi idle driver. Currently intel_idle.max_cstate=0 is already present, which will disable intel idle driver. With the added option, common idle driver will be disabled as well, so there will not be idle management. This is to prevent a bug that can be triggered by idle instruction on intel platform. Work item tracking Microsoft ADO (number only): 24867921
Signed-off-by: Shlomi Bitton shlomibi@nvidia.com
- Why I did it
Usually for a use case like networking - should not be configured to reach c6, the maximum used is c1e – due to the added latency getting in & out of states (bad for networking).
Following a recommendation by Intel, networking system should avoid getting in & out of states which introduce latency. The recommended state is c1e and no state change enabling.
In addition, c-state sole purpose is to save power and when inside a networking switch its really negligent being such a tiny consumer vs. the whole cluster.
- How I did it
Added a new argument to the grub cmdline to set c-states to 0.
- How to verify it
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)