From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E6DC4167B for ; Sat, 10 Dec 2022 10:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbiLJK7Q (ORCPT ); Sat, 10 Dec 2022 05:59:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiLJK7P (ORCPT ); Sat, 10 Dec 2022 05:59:15 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8E14BCA4; Sat, 10 Dec 2022 02:59:14 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670669953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iphm4QQgUglL/j++hAuj+bu5rQB4rYPNzSzGlqKLeUI=; b=w0hpYeT8AutCl499sXSKrBiebT4DSTsz6/JLnrc8MrFMI8TwdgxbgU8G7WrnOAqnZyqjzv Px4/RIaj79Ggr4bw+YPtbUP66xzi5s7E2YbhIDSwkYU+84vCg1SatWb/IkPu/dhB5XLx1z vpGXo14ZAaLWcYbCxeF93GWRH07mLe/6Kwd8Oe+eQiB7tGjO5rpwOmsZezO1tQWy7dLwrn Xd0EjFiiJps1nJAODIiLUvvG2gN0iqjrc73g6TlmA4lo8XaP6jG3Ak695qIUBwOKECI9xA wSE4IshBzCGDyUm/Wf1DGC39fFZ65DoFDMVI2Au6icQ+rmXHV+4OuL7PVmU31g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670669953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iphm4QQgUglL/j++hAuj+bu5rQB4rYPNzSzGlqKLeUI=; b=rmVcFUCHGOam9sPMXWxNgZG5hlZhACkPFkY8AeSnVSE1kw6bft2iITHjDd6SdhvhwVCwpX sAWtTcrmi5GZuSCg== To: Biju Das , William Breathitt Gray Cc: Geert Uytterhoeven , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , Michael Turquette , Stephen Boyd , Daniel Lezcano , "devicetree@vger.kernel.org" , Geert Uytterhoeven , Magnus Damm , "linux-renesas-soc@vger.kernel.org" , "linux-clk@vger.kernel.org" , "linux-iio@vger.kernel.org" , Prabhakar Mahadev Lad , Fabrizio Castro Subject: RE: [PATCH 0/6] Add RZ/V2M Compare-Match Timer (TIM) support In-Reply-To: References: <20221205145955.391526-1-biju.das.jz@bp.renesas.com> <20221205225042.GA2812115-robh@kernel.org> <87sfhsgb9e.ffs@tglx> <878rjjfprw.ffs@tglx> <87sfhrdure.ffs@tglx> Date: Sat, 10 Dec 2022 11:59:12 +0100 Message-ID: <875yejcynz.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sat, Dec 10 2022 at 07:52, Biju Das wrote: > scheduling tick is 4millisec. so if we want callback at 1 microsec, > then we need to use clock_nanosleep. Getting 1 microsec callback to > user space is challenging as the scheduling tick is only 4 millisec. The tick is only relevant if high resolution timers are disabled because then hrtimers are expired in the tick. If high resolution timers are enabled then the hrtimer expiry happens at the exact expiry time. What's challenging about the 1 microsecond accuracy is that the system immanent latencies are already in that range. So while the timer fires exactly, the actual execution of the woken up task in user space is not exact as that is subject to the worst case sum of latencies in the system. Thanks, tglx