Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1715411pxm; Fri, 4 Mar 2022 01:54:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwg/JgMrK0L2EZ9l8LMnLxk7L7p/TBw47FVD8/Ugw/9F0lp8xZ3BpmWyitKniu+byRS/Ff7 X-Received: by 2002:a17:902:d884:b0:14d:d2b6:b69 with SMTP id b4-20020a170902d88400b0014dd2b60b69mr39815578plz.40.1646387677032; Fri, 04 Mar 2022 01:54:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646387677; cv=none; d=google.com; s=arc-20160816; b=RwQq0I/e7RWOpdVVe5NFcukcICOwufyVOEUZTy091aVZpVdCqSUIYiD1jFzi762z5D j/Jc+xxxb8ZOjkZLgAYPGVKCXuh2Hg9wi9x9yvQpjmC2J68DLM7jOVTLkTv3E2UflyCA jgG7aEHK4si8LaBEG5uKioi/8cJ9kMtP6Blq3GthWpWWQCyT7NfFRU/myN83eRZhbWm+ Saw17jTr/6WKO5Ha8ww1MZQxVD/Db8Mn4t1mtqw74S8EOBkgpIMibZqFH9HehFSQjUiS bMiAmGqMvkuQecm3O8xJ3PN2jXa8kdGlUh8t8XHD/9yNc6F2c/6z9I35uSmKsskzowdV RiAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a2ZLddQ3pBdZiXKBj6DvoFfrsQt7JsrT4COg/WlTq9Y=; b=qncb2gd58mI51KEe8/pV0YCUxcfKeyPylQaEajwEi9+49I4+irNmcgA0emLLiadtfG HkDmmnpDiGcMHNrj2tpXD58bitIpo/DVlXtMCLZmG2zVWbKLygfsoquWcqBzRyDTkWKJ zTVp4dDxaRLQGaIOsdatQsGChbxvKQMxrFpKYpmbNbfh5lNUspXrdSHGjz35+O68G6gY 3soj9GzUrG+JvlmpB/jaQkt2AJkEYBwSb87oLjrGot3NmmYRtBWfug17LTjkq6CRqaLk rMr/ai0+g/pZArW0jsCSXfd1KEIDsE7Of7sZIWDB//55bZdRESIyKaJlcBwqLqxFYqWS 53ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LwFEnWrr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a170902e74500b0014fbc90f619si4385012plf.348.2022.03.04.01.54.21; Fri, 04 Mar 2022 01:54:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LwFEnWrr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237109AbiCCW4L (ORCPT + 99 others); Thu, 3 Mar 2022 17:56:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237032AbiCCW4K (ORCPT ); Thu, 3 Mar 2022 17:56:10 -0500 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F5EBED947 for ; Thu, 3 Mar 2022 14:55:24 -0800 (PST) Received: by mail-yb1-xb36.google.com with SMTP id h126so13346274ybc.1 for ; Thu, 03 Mar 2022 14:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a2ZLddQ3pBdZiXKBj6DvoFfrsQt7JsrT4COg/WlTq9Y=; b=LwFEnWrrHyMoDT1FRNCmikb5MOxZp5clQsTTLmty/0c0q24AthU1TBhXRR+DB5Rig4 186QAr/b4cldoEBaG6DuPCFe89f397Z8KMcYUm3fNd+VJO+wIlJP5gvRkaZsLwUFEV7V UzNARgRGZrK/436Sh+Qa1wbUJuo6IcfF3oQA2P5ackgETGCjoPvx4tomlHm3B/PwMsYh J+9IyUilCD2ogzFnR+PI+q6onKD1kVuXZW8PAe/xMvwpZ1r10ZeccOMvr5t7ar0cQph4 S8SFzDKnZO6NueRFSbF1qByyx1MKCugg0dzMyauRO3GscoNFjxOOmRfWNrwGeuN1dDJG OX6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a2ZLddQ3pBdZiXKBj6DvoFfrsQt7JsrT4COg/WlTq9Y=; b=wrN1m9x79/GyzJG+nmH5O1SKs75EyBaWfkAZgvbxJ894196Bvy5MLfo53NoqPTyjE2 dJ126Co3ckR/zzeQqMFU7RIDq6WNQ5rFc/KDcszooC4pssFJHDkUliXyKa4ajWuCcVCY B2QpohjCoHqUcSRRHAvWw2HF8Jle3QtT9qibkN4ssWI36s67m4Y/naXKNEl7Gbezl6pg UC3UECcWfkMvu8FhwSZTp0yVUxn1u40YffWTY62Y5j6TvU0uM0i+PP8gcl1M0/HNyVi6 ZfTFbDP3nRb86M+aHMEU/fPrUAjypKiIAkreXLiqm5bQ97VVG9ovqeNhvqsVoXPkQbpi 0pGQ== X-Gm-Message-State: AOAM533z9sL5riFjXisxdLzNtVv5Kh1cJuMZMSa1k03s6RlD5Ro8e6bb 43m2AnFbyNQylx6aOQB4C9HP/1lJaxMR1Gme8+fA/1CP0EIraA== X-Received: by 2002:a25:f406:0:b0:628:c29b:5c39 with SMTP id q6-20020a25f406000000b00628c29b5c39mr4849539ybd.369.1646348123397; Thu, 03 Mar 2022 14:55:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Thu, 3 Mar 2022 23:55:11 +0100 Message-ID: Subject: Re: Question on expiring HRtimer in-kernel To: Matti Vaittinen Cc: Thomas Gleixner , Anna-Maria Gleixner , Sebastian Reichel , Code Kipper , linux-kernel , Lee Jones , Linux PM list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 3, 2022 at 1:43 PM Matti Vaittinen wrote: > In any case, I remember few cases where I hit nasty issues because I > used CLOCK_REALTIME - which (AFAIR) is subject to the time adjustments. > NTP, GPS-time and so on can make the time tick in a strange way :) I > guess you would have noticed if time was set when timer did expire. > > Anyways, I guess the battery charging should rather be tied CLOCK_MONOTONIC. That makes a lot of sense, and is what I have learned from the internal kernel primitives as well, I just assumed the HRTimer was some special kind of beast. I'll patch this and run some testing, if it goes away with MONOTONIC I'll send a patch. Thanks! Yours, Linus Walleij