lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 09 Sep 2013 15:56:22 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	Ronald Wahl <ronald.wahl@...itan.com>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	linux-kernel@...r.kernel.org, arm@...nel.org,
	John Stultz <john.stultz@...aro.org>,
	"kernel@...gutronix.de" <kernel@...gutronix.de>,
	Andres Salomon <dilinger@...ued.net>,
	Shawn Guo <shawn.guo@...aro.org>, linux-ar@...per.es
Subject: Re: RFC: [PATCH] clocksource: tcb: fix min_delta calculation

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   |


Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ