All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: Robi Buranyi <rburanyi@google.com>
Cc: Nancy Yuen <yuenn@google.com>,
	Patrick Venture <venture@google.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	Brad Bishop <bradleyb@fuzziesquirrel.com>,
	Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Subject: Re: phosphor-hwmon bottleneck potential
Date: Fri, 5 May 2017 14:55:05 -0500	[thread overview]
Message-ID: <20170505195505.GJ25937@heinlein.lan> (raw)
In-Reply-To: <CANF=oU7xrGxz+Lfp+GT7QHOqYmKP7h+uMbraK0PjkTOdugTydw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

On Fri, May 05, 2017 at 11:50:52AM -0700, Robi Buranyi wrote:
> We could change the driver(s) to periodically poll the sensors like every
> second, and store the latest value. Then the sysfs read shall always return
> the last completed measurement data. We should do this for both the
> tachometers reading and the temperature sensors. There shall be some logic
> implemented for aging (when sensor read constantly fails)

This could certainly be done for the Aspeed PWM driver in question and
by my reading this might be the best approach.  Due to the way that
hardware works it seems like you'd an interval between samples of at
least 1 second in order to be accurate to roughly 100 RPMs.  I don't
know what accuracy you are striving for, but blocking an application on
a syscall for 1 second doesn't sound like a great implementation.

We could check with Guenter Roeck, the HWMON maintainer, to see if he
has any recommendations on the best way to handle this driver.

Changing HWMON on the whole to do this (the '(s)' part of your 'driver(s)'
statement) seems pretty out of scope and not likely to be accepted by
upstream.  Most HWMON drivers do simple IO in the read syscall, like a
few i2c operations to read a register out in a device so there isn't
problem with a long occurring block.

-- 
Patrick Williams

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-05-05 19:55 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 [this message]
2017-05-05 18:52                 ` Rick Altherr
2017-05-05 20:13                   ` Patrick Williams
2017-05-05 20:35                 ` Patrick Williams
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=20170505195505.GJ25937@heinlein.lan \
    --to=patrick@stwcx.xyz \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=jaghu@google.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=rburanyi@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.