All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: Leo Yan <leo.yan@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, kevin.wangtao@linaro.org
Subject: Re: [PATCH 02/25] thermal/drivers/hisi: Remove the multiple sensors support
Date: Wed, 18 Oct 2017 08:51:06 -0700	[thread overview]
Message-ID: <20171018155104.GA23447@localhost.localdomain> (raw)
In-Reply-To: <20171018014821.GE19504@leoy-ThinkPad-T440>

On Wed, Oct 18, 2017 at 09:48:21AM +0800, Leo Yan wrote:
> On Tue, Oct 17, 2017 at 02:07:08PM -0700, Eduardo Valentin wrote:
> > On Tue, Oct 17, 2017 at 09:03:40PM +0200, Daniel Lezcano wrote:
> > > On 17/10/2017 20:25, Eduardo Valentin wrote:
> > > > Hello,
> > > > 
> > > > On Tue, Oct 17, 2017 at 02:28:27PM +0200, Daniel Lezcano wrote:
> > > >> On 17/10/2017 05:54, Eduardo Valentin wrote:
> > > >>> On Tue, Oct 10, 2017 at 08:02:27PM +0200, Daniel Lezcano wrote:
> > > >>>> By essence, the tsensor does not really support multiple sensor at the same
> > > >>>> time. It allows to set a sensor and use it to get the temperature, another
> > > >>>> sensor could be switched but with a delay of 3-5ms. It is difficult to read
> > > >>>> simultaneously several sensors without a big delay.
> > > >>>>
> > > >>>
> > > >>> Is 3-5 ms enough to loose an event? Is this really a problem?
> > > >>
> > > >> There are several aspects:
> > > >>
> > > >>  - the multiple sensors is not needed here
> > > > 
> > > > Well, that is debatable, I cannot really agree or disagree with the
> > > > above statement without understanding the use cases and most important,
> > > > the location of each sensor. What is the location of each sensor?
> > > > 
> > > >>
> > > >>  - the temperature controller is not designed to read several sensors at
> > > >> the same time, we switch the sensor and that clears some internal
> > > >> buffers and re-init the controller
> > > > 
> > > > Which is still very helpful in case you have multiple hotspots that you
> > > > want to track and they are exposed on different workloads. Sacrificing
> > > > the availability of sensors is something needs a better justification
> > > > other than "current code uses only one".
> > > > 
> > > > 
> > > >>
> > > >>  - some boards can take 40°C in 1 sec, the temperature increase is
> > > >> insanely fast and reading several sensors add an extra 15ms.
> > > >>
> > > > 
> > > > 
> > > > Ok... What is the difference in update rate with and without the switch
> > > > of sensors? With the above worst case, you have about 4/6 mC/ms. Can
> > > > your tsensor support that resolution for a single sensor? What is the
> > > > maximum resolution a tsensor can support? What is the penalty added with
> > > > switch?
> > > > 
> > > > Based on this data, and the above 3-5ms, that  means you would miss about
> > > > ~ 3 - 4 mC while switching ( assuming tsensor can really achieve the
> > > > above rate of change: 5ms * 4/6 mC /ms). Are you sure that is
> > > > enough justification to drop three extra sensors?
> > > 
> > > Ok if I refer to the documentation the rate is 0.768 ms with the current
> > > configuration.
> > > 
> > > The driver is currently bogus: register overwritten, bouncing interrupt,
> > > unneeded lock, ... So the proposition was to remove the multiple sensors
> > > support, clean the driver, and re-introduce it if there is a need.
> > > 
> > > If I remember correctly Leo, author of the driver, agreed on this. Leo ?
> > > 
> > > Note, I'm not strongly against multiple sensors support in the driver if
> > > you think it is convenient but it is much simpler to remove the current
> > > code as it is not used and put it back on top of a sane foundation
> > > instead of circumventing that on the existing code.
> > > 
> > > 
> > 
> > I am also fine with the above strategy, as long as you are sure you are
> > not breaking anyone (specially userspace). Also, it would be good to get
> > a reviewed-by from hisilicon just to confirm (Leo?).
> 
> Sorry I missed to reply this patch. And yes, I have tested and
> reviewed it at my side:
> 
> Reviewed-by: Leo Yan <leo.yan@linaro.org>
> 
> P.s. I am working for Linaro; I am continously co-working with
> Hisilicon to maintain this driver due it's important for Hikey/Hikey960
> two boards stability; this driver also is important for our daily
> profiling for power and performance. Eduardo, so please let us know if
> you still need ack from Hisilicon engineer.


Yeah, I think adding your Reviewed-by and Kevin's is enough for this
series to go through. As I asked Daniel already, only few minor stuff
needs to be fixed along with the addition of the reviewed-by's.

> 
> > Besides, once you get his reviewed-by, and add it to the patches,
> > can you please resend the series with the minor issues I
> > mentioned (a few minor checkpatch issues and one compilation warn that
> > is added to the driver after the series is applied).
> > 
> > > 
> > > 
> > > 
> > > -- 
> > >  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
> > > 
> > > Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> > > <http://twitter.com/#!/linaroorg> Twitter |
> > > <http://www.linaro.org/linaro-blog/> Blog
> > > 

  reply	other threads:[~2017-10-18 15:51 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 18:02 [GIT PULL] thermal: new material for hikey for 4.15 Daniel Lezcano
2017-10-10 18:02 ` [PATCH 01/25] thermal/drivers/hisi: Fix missing interrupt enablement Daniel Lezcano
2017-10-10 18:02   ` [PATCH 02/25] thermal/drivers/hisi: Remove the multiple sensors support Daniel Lezcano
2017-10-17  3:54     ` Eduardo Valentin
2017-10-17 12:28       ` Daniel Lezcano
2017-10-17 18:25         ` Eduardo Valentin
2017-10-17 19:03           ` Daniel Lezcano
2017-10-17 21:07             ` Eduardo Valentin
2017-10-17 21:10               ` Daniel Lezcano
2017-10-18  1:48               ` Leo Yan
2017-10-18 15:51                 ` Eduardo Valentin [this message]
2017-10-18 16:23                   ` Daniel Lezcano
2017-10-18  1:49               ` Wangtao (Kevin, Kirin)
2017-10-18  1:49                 ` Wangtao (Kevin, Kirin)
2017-10-10 18:02   ` [PATCH 03/25] thermal/drivers/hisi: Fix kernel panic on alarm interrupt Daniel Lezcano
2017-10-10 18:02   ` [PATCH 04/25] thermal/drivers/hisi: Simplify the temperature/step computation Daniel Lezcano
2017-10-10 18:02   ` [PATCH 05/25] thermal/drivers/hisi: Fix multiple alarm interrupts firing Daniel Lezcano
2017-10-10 18:02   ` [PATCH 06/25] thermal/drivers/hisi: Remove pointless lock Daniel Lezcano
2017-10-10 18:02   ` [PATCH 07/25] thermal/drivers/hisi: Encapsulate register writes into helpers Daniel Lezcano
2017-10-10 18:02   ` [PATCH 08/25] thermal/drivers/hisi: Fix configuration register setting Daniel Lezcano
2017-10-17  4:22     ` Eduardo Valentin
2017-10-10 18:02   ` [PATCH 09/25] thermal/drivers/hisi: Remove costly sensor inspection Daniel Lezcano
2017-10-10 18:02   ` [PATCH 10/25] thermal/drivers/hisi: Rename and remove unused field Daniel Lezcano
2017-10-10 18:02   ` [PATCH 11/25] thermal/drivers/hisi: Convert long to int Daniel Lezcano
2017-10-10 18:02   ` [PATCH 12/25] thermal/drivers/hisi: Remove thermal data back pointer Daniel Lezcano
2017-10-10 18:02   ` [PATCH 13/25] thermal/drivers/hisi: Remove mutex_lock in the code Daniel Lezcano
2017-10-10 18:02   ` [PATCH 14/25] thermal/drivers/generic-iio-adc: Switch tz request to devm version Daniel Lezcano
2017-10-10 18:02   ` [PATCH 15/25] thermal/drivers/step_wise: Fix temperature regulation misbehavior Daniel Lezcano
2017-10-10 18:02   ` [PATCH 16/25] thermal/drivers/qcom-spmi: Use devm_iio_channel_get Daniel Lezcano
2017-10-10 18:02   ` [PATCH 17/25] thermal/drivers/hisi: Move the clk setup in the corresponding functions Daniel Lezcano
2017-10-10 18:02   ` [PATCH 18/25] thermal/drivers/hisi: Use round up step value Daniel Lezcano
2017-10-10 18:02   ` [PATCH 19/25] thermal/drivers/hisi: Put platform code together Daniel Lezcano
2017-10-17  4:37     ` Eduardo Valentin
2017-10-10 18:02   ` [PATCH 20/25] thermal/drivers/hisi: Add platform prefix to function name Daniel Lezcano
2017-10-17  4:36     ` Eduardo Valentin
2017-10-10 18:02   ` [PATCH 21/25] thermal/drivers/hisi: Prepare to add support for other hisi platforms Daniel Lezcano
2017-10-17  4:36     ` Eduardo Valentin
2017-10-10 18:02   ` [PATCH 22/25] thermal/drivers/hisi: Add support for multi temp threshold Daniel Lezcano
2017-10-17  4:38     ` Eduardo Valentin
2017-10-10 18:02   ` [PATCH 23/25] dt-bindings: Document the hi3660 thermal sensor binding Daniel Lezcano
2017-10-10 18:02     ` Daniel Lezcano
2017-10-10 18:02   ` [PATCH 24/25] thermal/drivers/hisi: Add support for hi3660 SoC Daniel Lezcano
2017-10-17  4:39     ` Eduardo Valentin
2017-10-18  9:15       ` [PATCH] thermal/drivers/hisi: disable multi alarm " Tao Wang
2017-10-18  9:15         ` Tao Wang
2017-10-18 15:54         ` Daniel Lezcano
2017-10-19  1:31           ` Wangtao (Kevin, Kirin)
2017-10-19  1:31             ` Wangtao (Kevin, Kirin)
2017-12-05  2:02             ` Eduardo Valentin
2017-12-05  6:57               ` Daniel Lezcano
2017-10-10 18:02   ` [PATCH 25/25] arm64: dts: Register Hi3660's thermal sensor Daniel Lezcano
2017-10-10 18:02     ` Daniel Lezcano
2017-10-10 18:02     ` Daniel Lezcano
2017-10-13  8:49     ` Wei Xu
2017-10-13  8:49       ` Wei Xu
2017-10-13  8:49       ` Wei Xu
2017-10-16 21:50   ` [PATCH 01/25] thermal/drivers/hisi: Fix missing interrupt enablement Eduardo Valentin

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=20171018155104.GA23447@localhost.localdomain \
    --to=edubezval@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=kevin.wangtao@linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.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.