* Does it make sense to create a centralized fan control module? @ 2021-06-11 1:14 Heyi Guo 2021-06-11 1:23 ` Heyi Guo 2021-06-16 16:26 ` Ed Tanous 0 siblings, 2 replies; 7+ messages in thread From: Heyi Guo @ 2021-06-11 1:14 UTC (permalink / raw) To: openbmc Hi All, Right now fan related data like tacho and PWM is fetched in dbus-sensors, and published to d-bus as sensor data, while fan control is made in another module like pid-control, which can fetch data and set value via d-bus. In some common sense, we may think about putting all fan related work into one single module (which may be based on pid-control), i.e. it can read tacho and PWM from hardware directly, calculate the required PWM by some algorithm like PID, and then write to PWM hardware directly; the data will also be published to d-bus for other modules to consume, like fansensor from dbus-sensors. Does it make sense to do that? Or is there any reason for the current design? I'm new to OpenBMC and some of my understanding may be totally wrong. Looking forward to your expert advice. Thanks, Heyi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Does it make sense to create a centralized fan control module? 2021-06-11 1:14 Does it make sense to create a centralized fan control module? Heyi Guo @ 2021-06-11 1:23 ` Heyi Guo 2021-06-16 2:02 ` Heyi Guo 2021-06-16 16:26 ` Ed Tanous 1 sibling, 1 reply; 7+ messages in thread From: Heyi Guo @ 2021-06-11 1:23 UTC (permalink / raw) To: openbmc Please ignore my early emails; only this one is the final version. I must have misused some shortcut key to send the unfinished versions while I wanted to save it locally... Sorry for the noise. Heyi On 2021/6/11 上午9:14, Heyi Guo wrote: > Hi All, > > Right now fan related data like tacho and PWM is fetched in > dbus-sensors, and published to d-bus as sensor data, while fan control > is made in another module like pid-control, which can fetch data and > set value via d-bus. > > In some common sense, we may think about putting all fan related work > into one single module (which may be based on pid-control), i.e. it > can read tacho and PWM from hardware directly, calculate the required > PWM by some algorithm like PID, and then write to PWM hardware > directly; the data will also be published to d-bus for other modules > to consume, like fansensor from dbus-sensors. > > Does it make sense to do that? Or is there any reason for the current > design? > > I'm new to OpenBMC and some of my understanding may be totally wrong. > > Looking forward to your expert advice. > > Thanks, > > Heyi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Does it make sense to create a centralized fan control module? 2021-06-11 1:23 ` Heyi Guo @ 2021-06-16 2:02 ` Heyi Guo 2021-06-16 2:49 ` [Phishing Risk] [External] " John Wang 0 siblings, 1 reply; 7+ messages in thread From: Heyi Guo @ 2021-06-16 2:02 UTC (permalink / raw) To: openbmc Cc: Zhikui Ren, Jae Hyun Yoo, Vernon Mauery, Ed Tanous, Josh Lehan, Ed Tanous, Patrick Venture Hi All, Any comments for my questions at the top of this thread? Thanks, Heyi On 2021/6/11 上午9:23, Heyi Guo wrote: > Please ignore my early emails; only this one is the final version. I > must have misused some shortcut key to send the unfinished versions > while I wanted to save it locally... > > Sorry for the noise. > > Heyi > > On 2021/6/11 上午9:14, Heyi Guo wrote: >> Hi All, >> >> Right now fan related data like tacho and PWM is fetched in >> dbus-sensors, and published to d-bus as sensor data, while fan >> control is made in another module like pid-control, which can fetch >> data and set value via d-bus. >> >> In some common sense, we may think about putting all fan related work >> into one single module (which may be based on pid-control), i.e. it >> can read tacho and PWM from hardware directly, calculate the required >> PWM by some algorithm like PID, and then write to PWM hardware >> directly; the data will also be published to d-bus for other modules >> to consume, like fansensor from dbus-sensors. >> >> Does it make sense to do that? Or is there any reason for the current >> design? >> >> I'm new to OpenBMC and some of my understanding may be totally wrong. >> >> Looking forward to your expert advice. >> >> Thanks, >> >> Heyi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Phishing Risk] [External] Re: Does it make sense to create a centralized fan control module? 2021-06-16 2:02 ` Heyi Guo @ 2021-06-16 2:49 ` John Wang 2021-06-16 11:03 ` Heyi Guo 0 siblings, 1 reply; 7+ messages in thread From: John Wang @ 2021-06-16 2:49 UTC (permalink / raw) To: Heyi Guo Cc: Zhikui Ren, Jae Hyun Yoo, Vernon Mauery, OpenBMC Maillist, Ed Tanous, Josh Lehan, Ed Tanous, Patrick Venture On Wed, Jun 16, 2021 at 10:02 AM Heyi Guo <guoheyi@linux.alibaba.com> wrote: > > Hi All, > > Any comments for my questions at the top of this thread? > > Thanks, > > Heyi > > > On 2021/6/11 上午9:23, Heyi Guo wrote: > > Please ignore my early emails; only this one is the final version. I > > must have misused some shortcut key to send the unfinished versions > > while I wanted to save it locally... > > > > Sorry for the noise. > > > > Heyi > > > > On 2021/6/11 上午9:14, Heyi Guo wrote: > >> Hi All, > >> > >> Right now fan related data like tacho and PWM is fetched in > >> dbus-sensors, and published to d-bus as sensor data, while fan > >> control is made in another module like pid-control, which can fetch > >> data and set value via d-bus. > >> > >> In some common sense, we may think about putting all fan related work > >> into one single module (which may be based on pid-control), i.e. it > >> can read tacho and PWM from hardware directly, calculate the required As I understand it, if you just want to bypass dbus and read pwm/tach directly you can refer to this. https://github.com/openbmc/openbmc/blob/master/meta-quanta/meta-gsj/recipes-phosphor/fans/phosphor-pid-control/config-2ssd.json#L6-L7 > >> PWM by some algorithm like PID, and then write to PWM hardware > >> directly; the data will also be published to d-bus for other modules > >> to consume, like fansensor from dbus-sensors. > >> > >> Does it make sense to do that? Or is there any reason for the current > >> design? I don't know why it's designed this way, but are you experiencing any problems? According to our past experience, pid-control reads/writes pwm/tach quite smoothly, but pid-control has some trouble reading the temperature of some sensors via dbus.(eg psusensors). That's another topic... > >> > >> I'm new to OpenBMC and some of my understanding may be totally wrong. > >> > >> Looking forward to your expert advice. > >> > >> Thanks, > >> > >> Heyi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Phishing Risk] [External] Re: Does it make sense to create a centralized fan control module? 2021-06-16 2:49 ` [Phishing Risk] [External] " John Wang @ 2021-06-16 11:03 ` Heyi Guo 0 siblings, 0 replies; 7+ messages in thread From: Heyi Guo @ 2021-06-16 11:03 UTC (permalink / raw) To: John Wang Cc: Zhikui Ren, Jae Hyun Yoo, Vernon Mauery, OpenBMC Maillist, Ed Tanous, Josh Lehan, Ed Tanous, Patrick Venture Hi John, Thanks for your reply. Please see my comments inline. On 2021/6/16 上午10:49, John Wang wrote: > On Wed, Jun 16, 2021 at 10:02 AM Heyi Guo <guoheyi@linux.alibaba.com> wrote: >> Hi All, >> >> Any comments for my questions at the top of this thread? >> >> Thanks, >> >> Heyi >> >> >> On 2021/6/11 上午9:23, Heyi Guo wrote: >>> Please ignore my early emails; only this one is the final version. I >>> must have misused some shortcut key to send the unfinished versions >>> while I wanted to save it locally... >>> >>> Sorry for the noise. >>> >>> Heyi >>> >>> On 2021/6/11 上午9:14, Heyi Guo wrote: >>>> Hi All, >>>> >>>> Right now fan related data like tacho and PWM is fetched in >>>> dbus-sensors, and published to d-bus as sensor data, while fan >>>> control is made in another module like pid-control, which can fetch >>>> data and set value via d-bus. >>>> >>>> In some common sense, we may think about putting all fan related work >>>> into one single module (which may be based on pid-control), i.e. it >>>> can read tacho and PWM from hardware directly, calculate the required > As I understand it, if you just want to bypass dbus and read pwm/tach > directly you can refer to this. > https://github.com/openbmc/openbmc/blob/master/meta-quanta/meta-gsj/recipes-phosphor/fans/phosphor-pid-control/config-2ssd.json#L6-L7 Do you suggest to use sysfs interface to access pwm/tach? However, we are using a I2C centralized fan controller and we don't have corresponding kernel driver for it. We propose to access this device by using /dev/i2c-<bus> interface directly in user mode. > >>>> PWM by some algorithm like PID, and then write to PWM hardware >>>> directly; the data will also be published to d-bus for other modules >>>> to consume, like fansensor from dbus-sensors. >>>> >>>> Does it make sense to do that? Or is there any reason for the current >>>> design? > I don't know why it's designed this way, but are you experiencing any problems? Not really. > According to our past experience, pid-control reads/writes pwm/tach > quite smoothly, > but pid-control has some trouble reading the temperature of some > sensors via dbus.(eg psusensors). > That's another topic... As I mentioned above, there is no sysfs interface for fan pwm/tach on our platform. We can only rely on dbus interfaces if using the upstream phosphor-pid-control. Then we think about centralizing all fan related hardware access into one module (like pid-control), but not sure if there's any problem for this idea. Thanks, Heyi > >>>> I'm new to OpenBMC and some of my understanding may be totally wrong. >>>> >>>> Looking forward to your expert advice. >>>> >>>> Thanks, >>>> >>>> Heyi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Does it make sense to create a centralized fan control module? 2021-06-11 1:14 Does it make sense to create a centralized fan control module? Heyi Guo 2021-06-11 1:23 ` Heyi Guo @ 2021-06-16 16:26 ` Ed Tanous 2021-06-20 8:48 ` Heyi Guo 1 sibling, 1 reply; 7+ messages in thread From: Ed Tanous @ 2021-06-16 16:26 UTC (permalink / raw) To: Heyi Guo; +Cc: openbmc [-- Attachment #1: Type: text/plain, Size: 1832 bytes --] On Thu, Jun 10, 2021 at 6:19 PM Heyi Guo <guoheyi@linux.alibaba.com> wrote: > Hi All, > > Right now fan related data like tacho and PWM is fetched in > dbus-sensors, and published to d-bus as sensor data, while fan control > is made in another module like pid-control, which can fetch data and set > value via d-bus. > > In some common sense, we may think about putting all fan related work > into one single module (which may be based on pid-control), i.e. it can > read tacho and PWM from hardware directly, calculate the required PWM by > some algorithm like PID, and then write to PWM hardware directly; the > data will also be published to d-bus for other modules to consume, like > fansensor from dbus-sensors. > To some extent, this design revolves around flexibility. Fans aren't necessarily tacho devices, and sensors aren't necessarily hwmon devices, so dbus is used as an abstraction to be able to make them all look the same. For example, an NCSI NIC might have both a temperature and a fan that phosphor-pid-control might want to control, but we don't want phosphor-pid-control to take a dependency on NCSI. While we could put all code for all possible sensor types into one daemon, that opens us up to the possibility that crashes could take down all of fan and thermal control, including the failsafe behavior. That would be an issue. It might be possible to handle these issues in a single daemon, but I haven't really seen a design that covered all the cases; Most implementations tend to take the simple approach (hwmon sensor + tacho device) and ignore the more complex setups. > > Does it make sense to do that? Or is there any reason for the current > design? > > I'm new to OpenBMC and some of my understanding may be totally wrong. > > Looking forward to your expert advice. > > Thanks, > > Heyi > > [-- Attachment #2: Type: text/html, Size: 2456 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Does it make sense to create a centralized fan control module? 2021-06-16 16:26 ` Ed Tanous @ 2021-06-20 8:48 ` Heyi Guo 0 siblings, 0 replies; 7+ messages in thread From: Heyi Guo @ 2021-06-20 8:48 UTC (permalink / raw) To: Ed Tanous; +Cc: openbmc Thanks for your comments; that sounds reasonable. Heyi On 2021/6/17 上午12:26, Ed Tanous wrote: > On Thu, Jun 10, 2021 at 6:19 PM Heyi Guo <guoheyi@linux.alibaba.com> wrote: > >> Hi All, >> >> Right now fan related data like tacho and PWM is fetched in >> dbus-sensors, and published to d-bus as sensor data, while fan control >> is made in another module like pid-control, which can fetch data and set >> value via d-bus. >> >> In some common sense, we may think about putting all fan related work >> into one single module (which may be based on pid-control), i.e. it can >> read tacho and PWM from hardware directly, calculate the required PWM by >> some algorithm like PID, and then write to PWM hardware directly; the >> data will also be published to d-bus for other modules to consume, like >> fansensor from dbus-sensors. >> > To some extent, this design revolves around flexibility. Fans aren't > necessarily tacho devices, and sensors aren't necessarily hwmon devices, so > dbus is used as an abstraction to be able to make them all look the same. > For example, an NCSI NIC might have both a temperature and a fan that > phosphor-pid-control might want to control, but we don't want > phosphor-pid-control to take a dependency on NCSI. While we could put all > code for all possible sensor types into one daemon, that opens us up to the > possibility that crashes could take down all of fan and thermal control, > including the failsafe behavior. That would be an issue. > > It might be possible to handle these issues in a single daemon, but I > haven't really seen a design that covered all the cases; Most > implementations tend to take the simple approach (hwmon sensor + tacho > device) and ignore the more complex setups. > > >> Does it make sense to do that? Or is there any reason for the current >> design? >> >> I'm new to OpenBMC and some of my understanding may be totally wrong. >> >> Looking forward to your expert advice. >> >> Thanks, >> >> Heyi >> >> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-20 8:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-11 1:14 Does it make sense to create a centralized fan control module? Heyi Guo 2021-06-11 1:23 ` Heyi Guo 2021-06-16 2:02 ` Heyi Guo 2021-06-16 2:49 ` [Phishing Risk] [External] " John Wang 2021-06-16 11:03 ` Heyi Guo 2021-06-16 16:26 ` Ed Tanous 2021-06-20 8:48 ` Heyi Guo
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.