From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754265AbdJSPFW (ORCPT ); Thu, 19 Oct 2017 11:05:22 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36118 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754127AbdJSPFU (ORCPT ); Thu, 19 Oct 2017 11:05:20 -0400 Date: Thu, 19 Oct 2017 17:04:48 +0200 From: Martin Schwidefsky To: Thomas Gleixner Cc: Matt Redfearn , Daniel Lezcano , James Hogan , linux-mips@linux-mips.org, James Hogan , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] clockevents: Retry programming min delta up to 10 times In-Reply-To: References: <1508414135-29123-1-git-send-email-matt.redfearn@mips.com> <5b782526-b130-77f2-6d9a-15839e12e065@mips.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17101915-0040-0000-0000-000004047249 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101915-0041-0000-0000-000020A6C7E3 Message-Id: <20171019170448.4637f480@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-19_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710190208 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Oct 2017 15:29:28 +0200 (CEST) Thomas Gleixner wrote: > On Thu, 19 Oct 2017, Matt Redfearn wrote: > > On 19/10/17 13:43, Thomas Gleixner wrote: > > > delta = 0; > > > for (i = 0; i < 10; i++) { > > > delta += dev->min_delta_ns; > > > dev->next_event = ktime_add_ns(ktime_get(), delta); > > > clc = ..... > > > ..... > > > > > > That makes it more likely to succeed fast. Hmm? > > > > That will set the target time to increasing multiples of min_delta_ns in the > > future, right? > > Yes, but without fiddling with min_delta_ns itself. Grumpf, more extra code for yet another piece of broken hardware I guess. > > Sure, it should make it succeed faster - I'll make it like > > that. Are you OK with the arbitrarily chosen 10 retries? > > I lost my crystalball so I have to trust yours :) The alternative implementation would be to do the retries in the clockevent driver itself. Then that particular driver can choose the correct number of retries, no? -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.