All of lore.kernel.org
 help / color / mirror / Atom feed
* power capping values on dbus
@ 2020-05-26 12:46 Zbyszek
  2020-05-26 13:01 ` Adrian Ambrożewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Zbyszek @ 2020-05-26 12:46 UTC (permalink / raw)
  To: openbmc

Hi everyone!

I would like to expose on dbus values like min and max power capping.
These values could be read from files provided by hwmon like:
   power[1-*]_cap_max,
   power[1-*]_cap_min
which are describe here:
https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

I have noticed that this interface:
https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Sensor/Value.interface.yaml
is already exposing something like MinValue and MaxValue,
but current implementation in dbus-sensors always sets these
attributes to some const values.
My understanding of the power capping values is that they could be used as these
MinValue and MaxValue if hwmon provides them otherwise some default
should be used as it is now.


My questions:
1. Should I create a new interface for the capping readings?
2. Or should I extend the existing Value.interface.yaml with new
attributes like MinCapValue, MaxCapValue?
3  Or the correct approach would be to read the cap values if provided
and expose them under already existing MinValue, MaxValue?


Regards,
Zbigniew.

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

* Re: power capping values on dbus
  2020-05-26 12:46 power capping values on dbus Zbyszek
@ 2020-05-26 13:01 ` Adrian Ambrożewicz
  2020-05-27 10:26   ` Zbyszek
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Ambrożewicz @ 2020-05-26 13:01 UTC (permalink / raw)
  To: Zbyszek, openbmc

I don't think it's clear from your message what you are trying to achieve:
a) ability to expose power capping information as dbus-sensor just as 
read-only information
b) ability to set the cap through D-Bus interface

I suspect it's the former (just exposing data). If that's so I don't 
think you need any new interface at all. You could just add a 'Cap' 
sensor, eg Cpu0PowerCap and all the values fits nicely.

For latter, there already exist interface for configuring power capping 
(https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Control/Power/Cap.interface.yaml), 
however it doesn't specify properties for Min and Max values.

Regards,
Adrian

W dniu 5/26/2020 o 14:46, Zbyszek pisze:
> Hi everyone!
> 
> I would like to expose on dbus values like min and max power capping.
> These values could be read from files provided by hwmon like:
>     power[1-*]_cap_max,
>     power[1-*]_cap_min
> which are describe here:
> https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
> 
> I have noticed that this interface:
> https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Sensor/Value.interface.yaml
> is already exposing something like MinValue and MaxValue,
> but current implementation in dbus-sensors always sets these
> attributes to some const values.
> My understanding of the power capping values is that they could be used as these
> MinValue and MaxValue if hwmon provides them otherwise some default
> should be used as it is now.
> 
> 
> My questions:
> 1. Should I create a new interface for the capping readings?
> 2. Or should I extend the existing Value.interface.yaml with new
> attributes like MinCapValue, MaxCapValue?
> 3  Or the correct approach would be to read the cap values if provided
> and expose them under already existing MinValue, MaxValue?
> 
> 
> Regards,
> Zbigniew.
> 

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

* Re: power capping values on dbus
  2020-05-26 13:01 ` Adrian Ambrożewicz
@ 2020-05-27 10:26   ` Zbyszek
  0 siblings, 0 replies; 3+ messages in thread
From: Zbyszek @ 2020-05-27 10:26 UTC (permalink / raw)
  To: Adrian Ambrożewicz; +Cc: openbmc

wt., 26 maj 2020 o 15:01 Adrian Ambrożewicz
<adrian.ambrozewicz@linux.intel.com> napisał(a):
>
> I don't think it's clear from your message what you are trying to achieve:
> a) ability to expose power capping information as dbus-sensor just as
> read-only information
> b) ability to set the cap through D-Bus interface
>
> I suspect it's the former (just exposing data). If that's so I don't
> think you need any new interface at all. You could just add a 'Cap'
> sensor, eg Cpu0PowerCap and all the values fits nicely.

Yes, that is exactly what I want to achieve :)
Your solution sound very good, it will allow me to expose power
capping information
without any modifications to dbus-interfaces at all.
I will soon push some implementation to review under dbus-sensor.
Thanks.

>
> For latter, there already exist interface for configuring power capping
> (https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Control/Power/Cap.interface.yaml),
> however it doesn't specify properties for Min and Max values.
>
> Regards,
> Adrian
>
> W dniu 5/26/2020 o 14:46, Zbyszek pisze:
> > Hi everyone!
> >
> > I would like to expose on dbus values like min and max power capping.
> > These values could be read from files provided by hwmon like:
> >     power[1-*]_cap_max,
> >     power[1-*]_cap_min
> > which are describe here:
> > https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
> >
> > I have noticed that this interface:
> > https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Sensor/Value.interface.yaml
> > is already exposing something like MinValue and MaxValue,
> > but current implementation in dbus-sensors always sets these
> > attributes to some const values.
> > My understanding of the power capping values is that they could be used as these
> > MinValue and MaxValue if hwmon provides them otherwise some default
> > should be used as it is now.
> >
> >
> > My questions:
> > 1. Should I create a new interface for the capping readings?
> > 2. Or should I extend the existing Value.interface.yaml with new
> > attributes like MinCapValue, MaxCapValue?
> > 3  Or the correct approach would be to read the cap values if provided
> > and expose them under already existing MinValue, MaxValue?
> >
> >
> > Regards,
> > Zbigniew.
> >

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

end of thread, other threads:[~2020-05-27 10:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 12:46 power capping values on dbus Zbyszek
2020-05-26 13:01 ` Adrian Ambrożewicz
2020-05-27 10:26   ` Zbyszek

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.