All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Feist <james.feist@linux.intel.com>
To: Alex Qiu <xqiu@google.com>
Cc: Peter Lundgren <peterlundgren@google.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Dealing with a sensor which doesn't have valid reading until host is powered up
Date: Thu, 3 Sep 2020 10:20:53 -0700	[thread overview]
Message-ID: <85bdbb93-eb7c-9a56-e80c-9f941feeb2dc@linux.intel.com> (raw)
In-Reply-To: <CAA_a9xL8TYcW-c3U=C2uT5NQ=WG-A0DPgrC1E=mr11h6fPBemA@mail.gmail.com>

On 9/2/2020 3:07 PM, Alex Qiu wrote:
> Hi James,
> 
> I just tried, now I have no reading at all... I saw you marked your pull 
> request to work in progress. I'll wait for further updates...
> 
> - Alex Qiu

Hi Alex,

Yes I ran into the same issue, I was originally using the tcp socket, 
then calling read() directly, and that 'worked' and may work for your 
use case, but mine the driver timeout still slowed down the sensor to an 
non-functional state. I pushed a patch to CPU sensor to make it fail 
faster, because in the case peci is down, you have bigger problems then 
sensors responding slow. It sounds like we aren't the first ones to hit 
this problem 
https://lists.ozlabs.org/pipermail/openbmc/2017-May/007557.html.

I'm thinking the only 'full proof' ways to fix this sort of things are:

1. Have some way to check state that you're good to read.
2. Handle reading in threads separate from d-bus.
3. Maybe avoid using the sysfs handles as they don't seem to respond 
correctly to epoll as they always respond ready to read.

-James

  parent reply	other threads:[~2020-09-03 17:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  0:49 Dealing with a sensor which doesn't have valid reading until host is powered up Alex Qiu
2020-08-27 21:49 ` Alex Qiu
2020-08-28 16:38   ` James Feist
2020-08-28 16:43     ` Alex Qiu
2020-08-28 17:54       ` James Feist
2020-08-31 21:32         ` Alex Qiu
2020-08-31 22:08           ` Alex Qiu
2020-08-31 23:54             ` Guenter Roeck
2020-08-31 23:58               ` Alex Qiu
2020-09-02 17:59             ` James Feist
2020-09-02 20:31               ` Alex Qiu
2020-09-02 22:07                 ` Alex Qiu
2020-09-03 15:31                   ` Guenter Roeck
2020-09-03 16:03                     ` Alex Qiu
2020-09-03 17:20                   ` James Feist [this message]
2020-09-03 15:38               ` Patrick Williams
2020-09-03 15:43                 ` Ed Tanous
2020-09-03 15:54                   ` Patrick Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85bdbb93-eb7c-9a56-e80c-9f941feeb2dc@linux.intel.com \
    --to=james.feist@linux.intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=peterlundgren@google.com \
    --cc=xqiu@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.