mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
@ 2024-12-19  9:11 Xuewen Yan
  2024-12-19  9:18 ` Lukasz Luba
  0 siblings, 1 reply; 7+ messages in thread
From: Xuewen Yan @ 2024-12-19  9:11 UTC (permalink / raw)
  To: rafael, lukasz.luba, len.brown, pavel
  Cc: linux-pm, linux-kernel, ke.wang, xuewen.yan94, jeson.gao, di.shen

From: Jeson Gao <jeson.gao@unisoc.com>

Now not only CPUs can use energy efficiency models, but GPUs
can also use. On the other hand, even with only one CPU, we can also
use energy_model to align control in thermal.
So remove the dependence of SMP, and add the DEVFREQ.

Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
---
 kernel/power/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index afce8130d8b9..c532aee09e12 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -361,8 +361,7 @@ config CPU_PM
 
 config ENERGY_MODEL
 	bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
-	depends on SMP
-	depends on CPU_FREQ
+	depends on CPU_FREQ || PM_DEVFREQ
 	help
 	  Several subsystems (thermal and/or the task scheduler for example)
 	  can leverage information about the energy consumed by devices to
-- 
2.25.1


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

* Re: [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
  2024-12-19  9:11 [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL Xuewen Yan
@ 2024-12-19  9:18 ` Lukasz Luba
  2025-02-13  2:18   ` Xuewen Yan
  0 siblings, 1 reply; 7+ messages in thread
From: Lukasz Luba @ 2024-12-19  9:18 UTC (permalink / raw)
  To: Xuewen Yan
  Cc: linux-pm, rafael, len.brown, linux-kernel, ke.wang, xuewen.yan94,
	jeson.gao, di.shen, pavel



On 12/19/24 09:11, Xuewen Yan wrote:
> From: Jeson Gao <jeson.gao@unisoc.com>
> 
> Now not only CPUs can use energy efficiency models, but GPUs
> can also use. On the other hand, even with only one CPU, we can also
> use energy_model to align control in thermal.
> So remove the dependence of SMP, and add the DEVFREQ.

That's true, there are 1-CPU platforms supported. Also, GPU can have
the EM alone.

> 
> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
> ---
>   kernel/power/Kconfig | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> index afce8130d8b9..c532aee09e12 100644
> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -361,8 +361,7 @@ config CPU_PM
>   
>   config ENERGY_MODEL
>   	bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
> -	depends on SMP
> -	depends on CPU_FREQ
> +	depends on CPU_FREQ || PM_DEVFREQ
>   	help
>   	  Several subsystems (thermal and/or the task scheduler for example)
>   	  can leverage information about the energy consumed by devices to

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

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

* Re: [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
  2024-12-19  9:18 ` Lukasz Luba
@ 2025-02-13  2:18   ` Xuewen Yan
  2025-03-05  9:50     ` Lukasz Luba
  0 siblings, 1 reply; 7+ messages in thread
From: Xuewen Yan @ 2025-02-13  2:18 UTC (permalink / raw)
  To: Lukasz Luba
  Cc: Xuewen Yan, linux-pm, rafael, len.brown, linux-kernel, ke.wang,
	jeson.gao, di.shen, pavel

Hi Rafael,

I noticed that this patch has not been merged yet. Do you have any comments?

BR

On Thu, Dec 19, 2024 at 5:17 PM Lukasz Luba <lukasz.luba@arm.com> wrote:
>
>
>
> On 12/19/24 09:11, Xuewen Yan wrote:
> > From: Jeson Gao <jeson.gao@unisoc.com>
> >
> > Now not only CPUs can use energy efficiency models, but GPUs
> > can also use. On the other hand, even with only one CPU, we can also
> > use energy_model to align control in thermal.
> > So remove the dependence of SMP, and add the DEVFREQ.
>
> That's true, there are 1-CPU platforms supported. Also, GPU can have
> the EM alone.
>
> >
> > Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
> > ---
> >   kernel/power/Kconfig | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > index afce8130d8b9..c532aee09e12 100644
> > --- a/kernel/power/Kconfig
> > +++ b/kernel/power/Kconfig
> > @@ -361,8 +361,7 @@ config CPU_PM
> >
> >   config ENERGY_MODEL
> >       bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
> > -     depends on SMP
> > -     depends on CPU_FREQ
> > +     depends on CPU_FREQ || PM_DEVFREQ
> >       help
> >         Several subsystems (thermal and/or the task scheduler for example)
> >         can leverage information about the energy consumed by devices to
>
> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

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

* Re: [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
  2025-02-13  2:18   ` Xuewen Yan
@ 2025-03-05  9:50     ` Lukasz Luba
  2025-03-05 14:57       ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Lukasz Luba @ 2025-03-05  9:50 UTC (permalink / raw)
  To: rafael
  Cc: Xuewen Yan, Xuewen Yan, linux-pm, len.brown, linux-kernel,
	ke.wang, jeson.gao, di.shen, pavel

Hi Rafael,

On 2/13/25 02:18, Xuewen Yan wrote:
> Hi Rafael,
> 
> I noticed that this patch has not been merged yet. Do you have any comments?
> 
> BR
> 
> On Thu, Dec 19, 2024 at 5:17 PM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>>
>>
>> On 12/19/24 09:11, Xuewen Yan wrote:
>>> From: Jeson Gao <jeson.gao@unisoc.com>
>>>
>>> Now not only CPUs can use energy efficiency models, but GPUs
>>> can also use. On the other hand, even with only one CPU, we can also
>>> use energy_model to align control in thermal.
>>> So remove the dependence of SMP, and add the DEVFREQ.
>>
>> That's true, there are 1-CPU platforms supported. Also, GPU can have
>> the EM alone.
>>
>>>
>>> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
>>> ---
>>>    kernel/power/Kconfig | 3 +--
>>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
>>> index afce8130d8b9..c532aee09e12 100644
>>> --- a/kernel/power/Kconfig
>>> +++ b/kernel/power/Kconfig
>>> @@ -361,8 +361,7 @@ config CPU_PM
>>>
>>>    config ENERGY_MODEL
>>>        bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
>>> -     depends on SMP
>>> -     depends on CPU_FREQ
>>> +     depends on CPU_FREQ || PM_DEVFREQ
>>>        help
>>>          Several subsystems (thermal and/or the task scheduler for example)
>>>          can leverage information about the energy consumed by devices to
>>
>> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

Gentle ping. You probably have missed that change for the v6.15 queue

Regards,
Lukasz

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

* Re: [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
  2025-03-05  9:50     ` Lukasz Luba
@ 2025-03-05 14:57       ` Rafael J. Wysocki
  2025-03-05 15:14         ` Lukasz Luba
  2025-03-06 19:38         ` Rafael J. Wysocki
  0 siblings, 2 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2025-03-05 14:57 UTC (permalink / raw)
  To: Lukasz Luba, Xuewen Yan
  Cc: Xuewen Yan, linux-pm, len.brown, linux-kernel, ke.wang,
	jeson.gao, di.shen, pavel

Hi,

On Wed, Mar 5, 2025 at 10:51 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>
> Hi Rafael,
>
> On 2/13/25 02:18, Xuewen Yan wrote:
> > Hi Rafael,
> >
> > I noticed that this patch has not been merged yet. Do you have any comments?
> >
> > BR
> >
> > On Thu, Dec 19, 2024 at 5:17 PM Lukasz Luba <lukasz.luba@arm.com> wrote:
> >>
> >>
> >>
> >> On 12/19/24 09:11, Xuewen Yan wrote:
> >>> From: Jeson Gao <jeson.gao@unisoc.com>
> >>>
> >>> Now not only CPUs can use energy efficiency models, but GPUs
> >>> can also use. On the other hand, even with only one CPU, we can also
> >>> use energy_model to align control in thermal.
> >>> So remove the dependence of SMP, and add the DEVFREQ.
> >>
> >> That's true, there are 1-CPU platforms supported. Also, GPU can have
> >> the EM alone.
> >>
> >>>
> >>> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
> >>> ---
> >>>    kernel/power/Kconfig | 3 +--
> >>>    1 file changed, 1 insertion(+), 2 deletions(-)
> >>>
> >>> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> >>> index afce8130d8b9..c532aee09e12 100644
> >>> --- a/kernel/power/Kconfig
> >>> +++ b/kernel/power/Kconfig
> >>> @@ -361,8 +361,7 @@ config CPU_PM
> >>>
> >>>    config ENERGY_MODEL
> >>>        bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
> >>> -     depends on SMP
> >>> -     depends on CPU_FREQ
> >>> +     depends on CPU_FREQ || PM_DEVFREQ
> >>>        help
> >>>          Several subsystems (thermal and/or the task scheduler for example)
> >>>          can leverage information about the energy consumed by devices to
> >>
> >> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
>
> Gentle ping. You probably have missed that change for the v6.15 queue

Indeed, I have missed this one.

Now applied as 6.15 material, thanks!

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

* Re: [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
  2025-03-05 14:57       ` Rafael J. Wysocki
@ 2025-03-05 15:14         ` Lukasz Luba
  2025-03-06 19:38         ` Rafael J. Wysocki
  1 sibling, 0 replies; 7+ messages in thread
From: Lukasz Luba @ 2025-03-05 15:14 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Xuewen Yan, Xuewen Yan, linux-pm, len.brown, linux-kernel,
	ke.wang, jeson.gao, di.shen, pavel



On 3/5/25 14:57, Rafael J. Wysocki wrote:
> Hi,
> 
> On Wed, Mar 5, 2025 at 10:51 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>> Hi Rafael,
>>
>> On 2/13/25 02:18, Xuewen Yan wrote:
>>> Hi Rafael,
>>>
>>> I noticed that this patch has not been merged yet. Do you have any comments?
>>>
>>> BR
>>>
>>> On Thu, Dec 19, 2024 at 5:17 PM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>>>
>>>>
>>>>
>>>> On 12/19/24 09:11, Xuewen Yan wrote:
>>>>> From: Jeson Gao <jeson.gao@unisoc.com>
>>>>>
>>>>> Now not only CPUs can use energy efficiency models, but GPUs
>>>>> can also use. On the other hand, even with only one CPU, we can also
>>>>> use energy_model to align control in thermal.
>>>>> So remove the dependence of SMP, and add the DEVFREQ.
>>>>
>>>> That's true, there are 1-CPU platforms supported. Also, GPU can have
>>>> the EM alone.
>>>>
>>>>>
>>>>> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
>>>>> ---
>>>>>     kernel/power/Kconfig | 3 +--
>>>>>     1 file changed, 1 insertion(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
>>>>> index afce8130d8b9..c532aee09e12 100644
>>>>> --- a/kernel/power/Kconfig
>>>>> +++ b/kernel/power/Kconfig
>>>>> @@ -361,8 +361,7 @@ config CPU_PM
>>>>>
>>>>>     config ENERGY_MODEL
>>>>>         bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
>>>>> -     depends on SMP
>>>>> -     depends on CPU_FREQ
>>>>> +     depends on CPU_FREQ || PM_DEVFREQ
>>>>>         help
>>>>>           Several subsystems (thermal and/or the task scheduler for example)
>>>>>           can leverage information about the energy consumed by devices to
>>>>
>>>> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
>>
>> Gentle ping. You probably have missed that change for the v6.15 queue
> 
> Indeed, I have missed this one.
> 
> Now applied as 6.15 material, thanks!

Thanks Rafael!

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

* Re: [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL
  2025-03-05 14:57       ` Rafael J. Wysocki
  2025-03-05 15:14         ` Lukasz Luba
@ 2025-03-06 19:38         ` Rafael J. Wysocki
  1 sibling, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2025-03-06 19:38 UTC (permalink / raw)
  To: Lukasz Luba, Xuewen Yan
  Cc: Xuewen Yan, linux-pm, len.brown, linux-kernel, ke.wang,
	jeson.gao, di.shen, pavel

On Wed, Mar 5, 2025 at 3:57 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> Hi,
>
> On Wed, Mar 5, 2025 at 10:51 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
> >
> > Hi Rafael,
> >
> > On 2/13/25 02:18, Xuewen Yan wrote:
> > > Hi Rafael,
> > >
> > > I noticed that this patch has not been merged yet. Do you have any comments?
> > >
> > > BR
> > >
> > > On Thu, Dec 19, 2024 at 5:17 PM Lukasz Luba <lukasz.luba@arm.com> wrote:
> > >>
> > >>
> > >>
> > >> On 12/19/24 09:11, Xuewen Yan wrote:
> > >>> From: Jeson Gao <jeson.gao@unisoc.com>
> > >>>
> > >>> Now not only CPUs can use energy efficiency models, but GPUs
> > >>> can also use. On the other hand, even with only one CPU, we can also
> > >>> use energy_model to align control in thermal.
> > >>> So remove the dependence of SMP, and add the DEVFREQ.
> > >>
> > >> That's true, there are 1-CPU platforms supported. Also, GPU can have
> > >> the EM alone.
> > >>
> > >>>
> > >>> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
> > >>> ---
> > >>>    kernel/power/Kconfig | 3 +--
> > >>>    1 file changed, 1 insertion(+), 2 deletions(-)
> > >>>
> > >>> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > >>> index afce8130d8b9..c532aee09e12 100644
> > >>> --- a/kernel/power/Kconfig
> > >>> +++ b/kernel/power/Kconfig
> > >>> @@ -361,8 +361,7 @@ config CPU_PM
> > >>>
> > >>>    config ENERGY_MODEL
> > >>>        bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
> > >>> -     depends on SMP
> > >>> -     depends on CPU_FREQ
> > >>> +     depends on CPU_FREQ || PM_DEVFREQ
> > >>>        help
> > >>>          Several subsystems (thermal and/or the task scheduler for example)
> > >>>          can leverage information about the energy consumed by devices to
> > >>
> > >> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
> >
> > Gentle ping. You probably have missed that change for the v6.15 queue
>
> Indeed, I have missed this one.
>
> Now applied as 6.15 material, thanks!

And dropped because of

https://lore.kernel.org/linux-pm/202503070326.9hEUez42-lkp@intel.com/

Thanks!

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

end of thread, other threads:[~2025-03-06 19:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19  9:11 [PATCH] power: energy_model: Rework the depends on for CONFIG_ENERGY_MODEL Xuewen Yan
2024-12-19  9:18 ` Lukasz Luba
2025-02-13  2:18   ` Xuewen Yan
2025-03-05  9:50     ` Lukasz Luba
2025-03-05 14:57       ` Rafael J. Wysocki
2025-03-05 15:14         ` Lukasz Luba
2025-03-06 19:38         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®