Message ID | 20221004033548.2508712-1-jeffrey.lane@canonical.com |
---|---|
Headers | show |
Series | limit "Dummy wait" to old Intel systems | expand |
On 10/3/22 21:35, Jeff Lane wrote: > BugLink: https://bugs.launchpad.net/bugs/1990985 > > Old, circa 2002 chipsets have a bug: they don't go idle when they are > supposed to. So, a workaround was added to slow the CPU down and > ensure that the CPU waits a bit for the chipset to actually go idle. > This workaround is ancient and has been in place in some form since > the original kernel ACPI implementation. > > But, this workaround is very painful on modern systems. The "inl()" > can take thousands of cycles (see Link: for some more detailed > numbers and some fun kernel archaeology). > > First and foremost, modern systems should not be using this code. > Typical Intel systems have not used it in over a decade because it is > horribly inferior to MWAIT-based idle. > > Despite this, people do seem to be tripping over this workaround on > AMD system today. > > Limit the "dummy wait" workaround to Intel systems. Keep Modern AMD > systems from tripping over the workaround. Remotely modern Intel > systems use intel_idle instead of this code and will, in practice, > remain unaffected by the dummy wait. > > Small patch cleanly picks to both Bionic and Focal. > > > > Dave Hansen (1): > ACPI: processor idle: Practically limit "Dummy wait" workaround to old > Intel systems > > Yin Fengwei (1): > ACPI: processor_idle: Skip dummy wait if kernel is in guest > > drivers/acpi/processor_idle.c | 38 +++++++++++++++++++++++++++++------ > 1 file changed, 32 insertions(+), 6 deletions(-) > Acked-by: Tim Gardner <tim.gardner@canonical.com>
On 04.10.22 05:35, Jeff Lane wrote: > BugLink: https://bugs.launchpad.net/bugs/1990985 > > Old, circa 2002 chipsets have a bug: they don't go idle when they are > supposed to. So, a workaround was added to slow the CPU down and > ensure that the CPU waits a bit for the chipset to actually go idle. > This workaround is ancient and has been in place in some form since > the original kernel ACPI implementation. > > But, this workaround is very painful on modern systems. The "inl()" > can take thousands of cycles (see Link: for some more detailed > numbers and some fun kernel archaeology). > > First and foremost, modern systems should not be using this code. > Typical Intel systems have not used it in over a decade because it is > horribly inferior to MWAIT-based idle. > > Despite this, people do seem to be tripping over this workaround on > AMD system today. > > Limit the "dummy wait" workaround to Intel systems. Keep Modern AMD > systems from tripping over the workaround. Remotely modern Intel > systems use intel_idle instead of this code and will, in practice, > remain unaffected by the dummy wait. > > Small patch cleanly picks to both Bionic and Focal. > > > > Dave Hansen (1): > ACPI: processor idle: Practically limit "Dummy wait" workaround to old > Intel systems > > Yin Fengwei (1): > ACPI: processor_idle: Skip dummy wait if kernel is in guest > > drivers/acpi/processor_idle.c | 38 +++++++++++++++++++++++++++++------ > 1 file changed, 32 insertions(+), 6 deletions(-) > Acked-by: Stefan Bader <stefan.bader@canonical.com>
On 04.10.22 05:35, Jeff Lane wrote: > BugLink: https://bugs.launchpad.net/bugs/1990985 > > Old, circa 2002 chipsets have a bug: they don't go idle when they are > supposed to. So, a workaround was added to slow the CPU down and > ensure that the CPU waits a bit for the chipset to actually go idle. > This workaround is ancient and has been in place in some form since > the original kernel ACPI implementation. > > But, this workaround is very painful on modern systems. The "inl()" > can take thousands of cycles (see Link: for some more detailed > numbers and some fun kernel archaeology). > > First and foremost, modern systems should not be using this code. > Typical Intel systems have not used it in over a decade because it is > horribly inferior to MWAIT-based idle. > > Despite this, people do seem to be tripping over this workaround on > AMD system today. > > Limit the "dummy wait" workaround to Intel systems. Keep Modern AMD > systems from tripping over the workaround. Remotely modern Intel > systems use intel_idle instead of this code and will, in practice, > remain unaffected by the dummy wait. > > Small patch cleanly picks to both Bionic and Focal. > > > > Dave Hansen (1): > ACPI: processor idle: Practically limit "Dummy wait" workaround to old > Intel systems > > Yin Fengwei (1): > ACPI: processor_idle: Skip dummy wait if kernel is in guest > > drivers/acpi/processor_idle.c | 38 +++++++++++++++++++++++++++++------ > 1 file changed, 32 insertions(+), 6 deletions(-) > Applied to focal,bionic:linux/master-next. Thanks. -Stefan