All of lore.kernel.org
 help / color / mirror / Atom feed
* About dynamic switch to offload/nocb on non-server Intel machines
@ 2022-07-08 17:19 Joel Fernandes
       [not found] ` <CAFzL-7uaWeS6_UR_OYzfkBb34pbLVOeyr3mwWozonqd_ViyV0Q@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Fernandes @ 2022-07-08 17:19 UTC (permalink / raw)
  To: rcu, paulmck, frederic; +Cc: len.brown

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:

> intel_pstate.c demonstrates how to detect a server when ACPI is present:
>
>
>
> #ifdef CONFIG_ACPI
>
>
>
> static bool intel_pstate_acpi_pm_profile_server(void)
>
> {
>
>         if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=
|
>
>             acpi_gbl_FADT.preferred_profile =3D=3D PM_PERFORMANCE_SERVER)
>
>                 return true;
>
>
>
>         return false;
>
> }
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About dynamic switch to offload/nocb on non-server Intel machines
       [not found] ` <CAFzL-7uaWeS6_UR_OYzfkBb34pbLVOeyr3mwWozonqd_ViyV0Q@mail.gmail.com>
@ 2022-07-08 17:40   ` Alison Chaiken
  2022-07-08 18:16     ` Joel Fernandes
  2022-07-08 18:29     ` Paul E. McKenney
  0 siblings, 2 replies; 4+ messages in thread
From: Alison Chaiken @ 2022-07-08 17:40 UTC (permalink / raw)
  To: rcu

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

-- Alison

---

On Fri, Jul 8, 2022 at 10:19 AM Joel Fernandes <joel@joelfernandes.org> wrote:
>
> 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.

>
> 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:
>
> > intel_pstate.c demonstrates how to detect a server when ACPI is present:
> >
> >
> >
> > #ifdef CONFIG_ACPI
> >
> >
> >
> > static bool intel_pstate_acpi_pm_profile_server(void)
> >
> > {
> >
> >         if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=
> |
> >
> >             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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About dynamic switch to offload/nocb on non-server Intel machines
  2022-07-08 17:40   ` Alison Chaiken
@ 2022-07-08 18:16     ` Joel Fernandes
  2022-07-08 18:29     ` Paul E. McKenney
  1 sibling, 0 replies; 4+ messages in thread
From: Joel Fernandes @ 2022-07-08 18:16 UTC (permalink / raw)
  To: Alison Chaiken; +Cc: rcu

Alison, Nice to hear from you!

> On Fri, Jul 8, 2022 at 10:19 AM Joel Fernandes <joel@joelfernandes.org> wrote:
> >
> > 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.

> > 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:
> >
> > > intel_pstate.c demonstrates how to detect a server when ACPI is present:
> > >
> > >
> > >
> > > #ifdef CONFIG_ACPI
> > >
> > >
> > >
> > > static bool intel_pstate_acpi_pm_profile_server(void)
> > >
> > > {
> > >
> > >         if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=
> > |
> > >
> > >             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.

Fair enough, I had to ask...

thanks,

 - Joel

> Best wishes,
> Alison Chaiken
> Aurora Innovation
> 
> 
> *That was a joke.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About dynamic switch to offload/nocb on non-server Intel machines
  2022-07-08 17:40   ` Alison Chaiken
  2022-07-08 18:16     ` Joel Fernandes
@ 2022-07-08 18:29     ` Paul E. McKenney
  1 sibling, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2022-07-08 18:29 UTC (permalink / raw)
  To: Alison Chaiken; +Cc: rcu

On Fri, Jul 08, 2022 at 10:40:52AM -0700, Alison Chaiken wrote:
> Resending to mailng list due to HTML formatting . . . sorry.
> 
> -- Alison
> 
> ---
> 
> On Fri, Jul 8, 2022 at 10:19 AM Joel Fernandes <joel@joelfernandes.org> wrote:
> >
> > 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.
> 
> > 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:
> >
> > > intel_pstate.c demonstrates how to detect a server when ACPI is present:
> > >
> > >
> > >
> > > #ifdef CONFIG_ACPI
> > >
> > >
> > >
> > > static bool intel_pstate_acpi_pm_profile_server(void)
> > >
> > > {
> > >
> > >         if (acpi_gbl_FADT.preferred_profile =3D=3D PM_ENTERPRISE_SERVER |=
> > |
> > >
> > >             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.

I want a CONFIG_DO_THE_RIGHT_THING!

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

							Thanx, Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-08 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 17:19 About dynamic switch to offload/nocb on non-server Intel machines Joel Fernandes
     [not found] ` <CAFzL-7uaWeS6_UR_OYzfkBb34pbLVOeyr3mwWozonqd_ViyV0Q@mail.gmail.com>
2022-07-08 17:40   ` Alison Chaiken
2022-07-08 18:16     ` Joel Fernandes
2022-07-08 18:29     ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.