All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: Rick Altherr <raltherr@google.com>
Cc: Brad Bishop <bradleyb@fuzziesquirrel.com>,
	Patrick Venture <venture@google.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: phosphor-hwmon bottleneck potential
Date: Fri, 5 May 2017 12:43:42 -0500	[thread overview]
Message-ID: <20170505174341.GE25937@heinlein.lan> (raw)
In-Reply-To: <CAPLgG=k3mr01DnqWX5W4oCOQJ3njJCVBSe+EsLkpXCdj2Uwj7A@mail.gmail.com>

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

Rick,

On Fri, May 05, 2017 at 09:48:01AM -0700, Rick Altherr wrote:
> I've chatted with Patrick V. separately about the driver.  AST2400/2500 fan
> tach hardware measures only one fan at a time.  I think we can adjust the
> driver settings to reduce the measurement time but it will scale with # of
> tachs being read.

I never looked at this driver before but it looks like it is doing an
'msleep' in the hwmon read path after resetting a counter register and
then counting rotations?  Two comments:

1. As it stands, it doesn't appear that this driver is actually
multi-reader safe (either thread or process).  There is no locking or
queueing to prevent one reader from resetting the result register while
another is performing the msleep loop.  Multi-threading might "go
faster" but it will give entirely wrong results by my reading.

2. It seems bad to do a long-running msleep in the hwmon read path to
begin with.  Should this driver be restructured to have a kthread read
the channels in the background on a polling interval instead of
initiating by userspace action?

-- 
Patrick Williams

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

  reply	other threads:[~2017-05-05 17:43 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 [this message]
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
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=20170505174341.GE25937@heinlein.lan \
    --to=patrick@stwcx.xyz \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=raltherr@google.com \
    --cc=venture@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.