public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Ronald Wahl <ronald.wahl@raritan.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-kernel@vger.kernel.org, arm@kernel.org,
	John Stultz <john.stultz@linaro.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Andres Salomon <dilinger@queued.net>,
	Shawn Guo <shawn.guo@linaro.org>,
	linux-ar@jasper.es
Subject: Re: RFC: [PATCH] clocksource: tcb: fix min_delta calculation
Date: Mon, 09 Sep 2013 15:56:22 +0200	[thread overview]
Message-ID: <522DD386.2080003@pengutronix.de> (raw)
In-Reply-To: <522D843A.60401@raritan.com>

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

On 09/09/2013 10:18 AM, Ronald Wahl wrote:
> On 20.06.2013 17:00, Marc Kleine-Budde wrote:
>> Hello Thomas,
>>
>> On 04/25/2013 04:53 PM, Marc Kleine-Budde wrote:
>>> On 04/25/2013 04:21 PM, Thomas Gleixner wrote:
>>>> On Tue, 23 Apr 2013, Marc Kleine-Budde wrote:
>>>>> The commit
>>>>>
>>>>>      77cc982 clocksource: use clockevents_config_and_register()
>>>>> where possible
>>>>>
>>>>> switches from manually calculating min_delta_ns (and others) and
>>>>> clockevents_register_device() to automatic calculation via
>>>>> clockevents_config_and_register(). During this conversation the "+
>>>>> 1" in
>>>>>
>>>>>      min_delta_ns = clockevent_delta2ns(1, &clkevt.clkevt) + 1;
>>>>>
>>>>> was lost. This leads to problems with schedule_delayed_work() with
>>>>> a delay of
>>>>> "1". Resulting in the work not scheduled in time.
>>>>
>>>> Errm. How is schedule_delayed_work() related to this?
> 
> I also stumbled over this issue now after upgrading from 3.4.57 to
> 3.10.10. Even sleep() is unreliable - sleeping for 2 seconds often
> sleeps just more than 3 seconds.
> 
> The now lost +1 has actually been added in 2007 to solve a rounding issue:
> 
>   http://permalink.gmane.org/gmane.linux.kernel/549744
> 
> So I think this should either be fixed by always rounding up in
> clockevent_delta2ns() or by adding +1 to the min_delta_ns in the
> clockevents_config_and_register() function. Dunno if rounding up will
> cause problems with the max_delta_ns as it might be too big then so
> probably the second approach is better.
> 
> Opinions?

Thomas, any thoughts on this?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2013-09-09 13:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 11:50 [PATCH v2 0/3] Use helper clockevents_config_and_register() Shawn Guo
2013-01-12 11:50 ` [PATCH v2 1/3] clockevents: export clockevents_config_and_register for module use Shawn Guo
2013-01-12 11:50 ` [PATCH v2 2/3] ARM: use clockevents_config_and_register() where possible Shawn Guo
2013-01-12 21:25   ` Jason Cooper
2013-01-12 11:50 ` [PATCH v2 3/3] clocksource: " Shawn Guo
2013-04-23 13:07   ` BUG: " Marc Kleine-Budde
2013-04-23 13:08     ` RFC: [PATCH] clocksource: tcb: fix min_delta calculation Marc Kleine-Budde
2013-04-23 13:11       ` Marc Kleine-Budde
2013-04-23 13:44         ` Shawn Guo
2013-04-23 13:50           ` Marc Kleine-Budde
2013-04-25 13:36       ` Marc Kleine-Budde
2013-04-25 14:18         ` Thomas Gleixner
2013-04-25 14:21       ` Thomas Gleixner
2013-04-25 14:53         ` Marc Kleine-Budde
2013-06-20 15:00           ` Marc Kleine-Budde
2013-09-09  8:18             ` Ronald Wahl
2013-09-09 13:56               ` Marc Kleine-Budde [this message]
2013-01-12 21:14 ` [PATCH v2 0/3] Use helper clockevents_config_and_register() Arnd Bergmann
2013-01-14 11:23   ` Thomas Gleixner
2013-01-14 18:16     ` Olof Johansson

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=522DD386.2080003@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=arm@kernel.org \
    --cc=dilinger@queued.net \
    --cc=john.stultz@linaro.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-ar@jasper.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=ronald.wahl@raritan.com \
    --cc=shawn.guo@linaro.org \
    --cc=tglx@linutronix.de \
    /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