linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hari Nagalla <hnagalla@ti.com>
To: Jan Kiszka <jan.kiszka@siemens.com>, Nishanth Menon <nm@ti.com>
Cc: <wim@linux-watchdog.org>, <linux@roeck-us.net>,
	<linux-watchdog@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv4 3/4] watchdog: rti-wdt: attach to running watchdog during probe
Date: Mon, 21 Feb 2022 10:29:20 -0600	[thread overview]
Message-ID: <c96bffda-73bc-0cdf-c77a-39d57abe1a95@ti.com> (raw)
In-Reply-To: <dae15cec-5d05-a48d-8c3b-392559d8bfb7@siemens.com>

On 2/21/22 10:03, Jan Kiszka wrote:
>> K, so we do want a safety margin for min_hw_heartbeat_ms, make it
>> larger. But I still don't think it is best achieved by bending the
>> frequency. That will also affect other values, e.g. returning a wrong
>> programmed timeout to userspace if that was programmed earlier, using
>> the original frequency.
>>
> I think I'm starting to get the original logic, and the result now works
> here:
> 
> The clock driving the watchdog might be slower than thought, and then we
> may time out later than intended - generally not an issue. But it may
> also be faster, and then we will see an expiry earlier than what is
> supposed to be configured via "heartbeat". For the latter case, we lower
> the frequency virtually by 10%, crossing fingers that this is enough.
> 
Humm.. To me it appears the intent is to adjust when the input 32KHz 
clock is slower? when it is slower we reduce the pulse count by 10% 
(assuming the crystals are with 10% off clock) so that the desired 
timeout is achieved with lesser pulse count?
> The problems are now:
>   - U-Boot (as a known early watchdog starter) does not do that as well,
>     and we will cause at least confusion on Linux side (60s will become
>     66s from Linux POV e.g., and we may expire at 54s already)
>      => U-Boot should add the same 10%, patch will be sent
Yes, i see that we need similar adjustment in u-boot as well.
>   - even with U-Boot on the same page, the rounding issue will prevent
>     accurate calculations of derived values, namely min_hw_heartbeat_ms.
>      => patch to come
>   - and ...
> 


  reply	other threads:[~2022-02-21 16:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 13:29 [PATCHv4 0/4] watchdog: rti-wdt: attach to running timer Tero Kristo
2020-07-17 13:29 ` [PATCHv4 1/4] watchdog: use __watchdog_ping in startup Tero Kristo
2020-07-17 13:29 ` [PATCHv4 2/4] watchdog: add support for adjusting last known HW keepalive time Tero Kristo
2020-07-19 13:54   ` Guenter Roeck
2020-07-17 13:29 ` [PATCHv4 3/4] watchdog: rti-wdt: attach to running watchdog during probe Tero Kristo
2020-07-19 13:56   ` Guenter Roeck
2022-02-21  9:10   ` Jan Kiszka
2022-02-21  9:59     ` Jan Kiszka
2022-02-21 12:44       ` Nishanth Menon
2022-02-21 12:53         ` Jan Kiszka
2022-02-21 16:03           ` Jan Kiszka
2022-02-21 16:29             ` Hari Nagalla [this message]
2020-07-17 13:29 ` [PATCHv4 4/4] watchdog: rti-wdt: balance pm runtime enable calls Tero Kristo

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=c96bffda-73bc-0cdf-c77a-39d57abe1a95@ti.com \
    --to=hnagalla@ti.com \
    --cc=jan.kiszka@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nm@ti.com \
    --cc=wim@linux-watchdog.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).