Notion of Flakiness in Sensor Readings

Patrick Venture venture at google.com
Sat Oct 13 07:53:34 AEDT 2018


Currently, there are a few approaches in phosphor-hwmon on how to
handle sensors being present sometimes, or flaky on reads.  We've
talked in the past about how to handle a read failure that should be
ignored.  A real failure that is flaky or temporary.

I was thinking of just adding a property to the Sensor.Value interface
to report information.  Basically, someone reading the value needs to
know if it's valid.  The idea of a range check for validity doesn't
work as cleanly for this specific purpose, in my opinion.  The min/max
can be used cleanly to determine the linearization though!

I was thinking perhaps a boolean, that you can check to see if the
value should be used or trusted.  Then, I thought, perhaps, a enum
with a series of states, starting with the states of "Valid',
"Invalid."  Not being able to think of a third state, I fell back onto
a boolean.

Thoughts?

Patrick


More information about the openbmc mailing list