Skip to contentSkip to conversation

About dynamic switch to offload/nocb on non-server Intel machines

DISCUSSION Joel Fernandes 3 participants 4 messages Jul 8, 2022 1 message not in the archive RCU

lore
Share & tools
lore
#0 lore raw

Dear Paul and Frederic,

Len Brown on CC provided a good idea in a meeting on using intel_pstate to detect if device is a server or a consumer device.

Can we perhaps use this to trigger the offload/nocb mechanisms on consumer devices / distros? I was thinking the dynamic offload and the "one kernel" work that Frederic did can be trigger from such detection.

It is true userspace can do the trigger, but maybe it is better to not leave it to userspace so we'd save power on bad userspaces.

Come to think of it, this can even be done at boot time if we can read the below state early enough:

Quoted 8 lines

intel_pstate.c demonstrates how to detect a server when ACPI is present:

#ifdef CONFIG_ACPI

Quoted 5 lines

static bool intel_pstate_acpi_pm_profile_server(void)

{

        if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=

|

Quoted 11 lines
            acpi_gbl_FADT.preferred_profile =3D=3D PM_PERFORMANCE_SERVER)

                return true;



        return false;

}

A message that is not in the archive (sent off-list or not yet received): CAFzL-7uaWeS6_UR_OYzfkBb34pbLVOeyr3mwWozonqd_ViyV0Q@mail.gmail.com

#2 lore raw

Resending to mailng list due to HTML formatting . . . sorry.

-- Alison

---

Quoted 5 lines · Joel Fernandes

Dear Paul and Frederic,

Len Brown on CC provided a good idea in a meeting on using intel_pstate to detect if device is a server or a consumer device.

Robots are neither a server nor a consumer device. Please let's not
force industrial users of RT to choose between two inapt sets of configuration options.

Quoted 19 lines

Can we perhaps use this to trigger the offload/nocb mechanisms on consumer devices / distros? I was thinking the dynamic offload and the "one kernel" work that Frederic did can be trigger from such detection.

It is true userspace can do the trigger, but maybe it is better to not leave it to userspace so we'd save power on bad userspaces.

Come to think of it, this can even be done at boot time if we can read the below state early enough:

Quoted 8 lines

intel_pstate.c demonstrates how to detect a server when ACPI is present:

#ifdef CONFIG_ACPI

Quoted 17 lines
Quoted 5 lines

static bool intel_pstate_acpi_pm_profile_server(void)

{

        if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=

|

Quoted 11 lines
            acpi_gbl_FADT.preferred_profile =3D=3D PM_PERFORMANCE_SERVER)

                return true;



        return false;

}

Robotics applications often rely on fairly "big iron" that is
configured with CONFIG_CPU_FREQ_GOV_PERFORMANCE=y. Servers and
robotics are quite different use cases, so setting configuration that would be useful for servers whenever the CPU_FREQ_GOV_PERFORMANCE is selected would create a headache for many users.

I know, how about a new CONFIG_ANDROID?*

Best wishes,
Alison Chaiken
Aurora Innovation

*That was a joke.

#3 lore raw

Alison, Nice to hear from you!

Quoted 11 lines · Joel Fernandes
Quoted 5 lines

Dear Paul and Frederic,

Len Brown on CC provided a good idea in a meeting on using intel_pstate to detect if device is a server or a consumer device.

Robots are neither a server nor a consumer device. Please let's not
force industrial users of RT to choose between two inapt sets of configuration options.

I see your point.

Quoted 37 lines
Quoted 18 lines

Can we perhaps use this to trigger the offload/nocb mechanisms on consumer devices / distros? I was thinking the dynamic offload and the "one kernel" work that Frederic did can be trigger from such detection.

It is true userspace can do the trigger, but maybe it is better to not leave it to userspace so we'd save power on bad userspaces.

Come to think of it, this can even be done at boot time if we can read the below state early enough:

Quoted 8 lines

intel_pstate.c demonstrates how to detect a server when ACPI is present:

#ifdef CONFIG_ACPI

Quoted 17 lines
Quoted 5 lines

static bool intel_pstate_acpi_pm_profile_server(void)

{

        if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=

|

Quoted 11 lines
            acpi_gbl_FADT.preferred_profile =3D=3D PM_PERFORMANCE_SERVER)

                return true;



        return false;

}

Quoted 5 lines

Robotics applications often rely on fairly "big iron" that is
configured with CONFIG_CPU_FREQ_GOV_PERFORMANCE=y. Servers and
robotics are quite different use cases, so setting configuration that would be useful for servers whenever the CPU_FREQ_GOV_PERFORMANCE is selected would create a headache for many users.

Fair enough, I had to ask...

thanks,

- Joel

Quoted 6 lines

Best wishes,
Alison Chaiken
Aurora Innovation

*That was a joke.

maintainer
#4 lore raw
In reply to Alison Chaiken
Quoted 60 lines · Alison Chaiken

Resending to mailng list due to HTML formatting . . . sorry.

-- Alison

---

Quoted 5 lines · Joel Fernandes

Dear Paul and Frederic,

Len Brown on CC provided a good idea in a meeting on using intel_pstate to detect if device is a server or a consumer device.

Robots are neither a server nor a consumer device. Please let's not
force industrial users of RT to choose between two inapt sets of configuration options.

Quoted 18 lines

Can we perhaps use this to trigger the offload/nocb mechanisms on consumer devices / distros? I was thinking the dynamic offload and the "one kernel" work that Frederic did can be trigger from such detection.

It is true userspace can do the trigger, but maybe it is better to not leave it to userspace so we'd save power on bad userspaces.

Come to think of it, this can even be done at boot time if we can read the below state early enough:

Quoted 8 lines

intel_pstate.c demonstrates how to detect a server when ACPI is present:

#ifdef CONFIG_ACPI

Quoted 17 lines
Quoted 5 lines

static bool intel_pstate_acpi_pm_profile_server(void)

{

        if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=

|

Quoted 11 lines
            acpi_gbl_FADT.preferred_profile =3D=3D PM_PERFORMANCE_SERVER)

                return true;



        return false;

}

Robotics applications often rely on fairly "big iron" that is
configured with CONFIG_CPU_FREQ_GOV_PERFORMANCE=y. Servers and
robotics are quite different use cases, so setting configuration that would be useful for servers whenever the CPU_FREQ_GOV_PERFORMANCE is selected would create a headache for many users.

Quoted 8 lines

I know, how about a new CONFIG_ANDROID?*

Best wishes,
Alison Chaiken
Aurora Innovation

*That was a joke.

I want a CONFIG_DO_THE_RIGHT_THING!

No, I am not volunteering to implement it. Why do you ask? ;-)

Thanx, Paul