From: Patrick Williams <patrick@stwcx.xyz>
To: Nancy Yuen <yuenn@google.com>
Cc: Rick Altherr <raltherr@google.com>,
Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Brad Bishop <bradleyb@fuzziesquirrel.com>,
Patrick Venture <venture@google.com>
Subject: Re: phosphor-hwmon bottleneck potential
Date: Fri, 5 May 2017 15:35:38 -0500 [thread overview]
Message-ID: <20170505203538.GL25937@heinlein.lan> (raw)
In-Reply-To: <CADfYTpGfqgKP-HWg54mXnw7qc0wtPqfE=ZicZrCo_WsOJiQc7g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]
On Fri, May 05, 2017 at 11:37:06AM -0700, Nancy Yuen wrote:
> 1. General design issue if time between reads of a sensor is dependent on
> the number of sensors in the system.
I don't see any general design issue with phosphor-hwmon or dbus being
talked about here. There is one specific driver that has a pretty large
scaling factor no matter how you read sensor values out of it. We've
talked elsewhere in the thread about a potential driver change to
improve it. Most hwmon drivers do not have any issue.
> And drivers can fail, due to miss behaving code or hardware.
hwmon drivers should never block userspace forever. If they do that is
a serious driver bug. We could be defensive against it by enhancing
phosphor-hwmon to use non-blocking IO, assuming the kernel supports it,
but that seems like a lot of code for a non-existent problem.
Hardware failures are already handled by the hwmon drivers, reported
back to phosphor-hwmon as errnos on read, and dealt with.
> In this design, sensor report could be
> significantly delayed if one sensor/driver were bad or misbehaving.
You have no difference in the problem of one sensor reading not working
in any of these three potential designs:
1. One big loop that reads each hwmon sysfs entry for the whole
system in sequence.
2. One big program with N threads that, with a stampeding herd,
attempt to read all hwmon sysfs at the same instant.
3. M processes with N hwmon sysfs reads in sequence.
In any of these designs, if the driver delays your read for 8 seconds
your data is delayed and stale. I think our expectation is that a
fan-control algorithm is using dbus signals to keep track of the most
recent value and if it doesn't have up-to-date data by the time it wants
to make a decision it would deal with it in whatever way it sees fit.
Likely, either using old data or treating that sensor as in-error.
If you chose design #2 and then expanded on it by adding a thermal
control loop in yet another thread, you'd still have the exact same
problems to deal with. It just is now all in one process using shm to
communicate the cached sensor values instead of using dbus between
processes.
--
Patrick Williams
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-05-05 20:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 16:11 phosphor-hwmon bottleneck potential Patrick Venture
2017-05-05 5:07 ` Brad Bishop
2017-05-05 16:34 ` Patrick Williams
2017-05-05 16:48 ` Rick Altherr
2017-05-05 17:43 ` Patrick Williams
2017-05-05 17:48 ` Rick Altherr
2017-05-05 18:02 ` Patrick Williams
2017-05-05 18:04 ` Patrick Venture
2017-05-05 18:05 ` Rick Altherr
2017-05-05 18:37 ` Nancy Yuen
2017-05-05 18:50 ` Robi Buranyi
2017-05-05 19:55 ` Patrick Williams
2017-05-05 18:52 ` Rick Altherr
2017-05-05 20:13 ` Patrick Williams
2017-05-05 20:35 ` Patrick Williams [this message]
2017-05-10 1:46 ` Patrick Venture
2017-05-05 16:38 ` 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=20170505203538.GL25937@heinlein.lan \
--to=patrick@stwcx.xyz \
--cc=bradleyb@fuzziesquirrel.com \
--cc=jaghu@google.com \
--cc=openbmc@lists.ozlabs.org \
--cc=raltherr@google.com \
--cc=venture@google.com \
--cc=yuenn@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.