Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1032791imm; Wed, 1 Aug 2018 09:06:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf13Z76Hq9kIJer6dgWmlZCAGV2K2Yt8sNY/VpAH4J787jpVqyP2EtXfMJfVvQj9IdeZIp2 X-Received: by 2002:a63:2fc6:: with SMTP id v189-v6mr25156170pgv.61.1533139588093; Wed, 01 Aug 2018 09:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533139588; cv=none; d=google.com; s=arc-20160816; b=RRNr8Ez7YCqdevwLKfFe/uuyDOXNKMWtSdZGoeC3dhZL3vS4/le7xZBWbVTDJd9s33 6yCcsQaENAAYRbFdB4V/6Sl8I43sv4gZY3rNFIxFvkO9Tk5mocnrkwYxL8op6FjXtiRZ ZnoJYdYIyIhC5T0Mh/eJrvejiZIU4Yje0MT2X7UoImh6/sAb6V6ARIais955bEr0psYt cFWqKCF1gGCFM7vYLOtaCQZIUhyEV0qCyAox9OsfvolfUzLTGxgNigtxhwM4lQF1kX/o kv0B9S0CN2P3yVaebEvsphrO7TRYIQiBNHtXGX3XdNaQ6IOnUhVc/P/GNRZbfQdsJP2n DfFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=k1+c5ljLFexeB+XI8sAYDNOKSNE74RWO52ZV9kA9g44=; b=eMGzQvQq2LBCxTnMNyuhmG/ctmu7f4o2d94lYR0sbk2YetTQVaw6nKd0Ls/qVFllh6 RDo06zinNOsimGhBy4o4Jng88cMrZnqtZRVzTyP6v2uVyqbFX9vgMsnUMTbZY1c1ytQ6 D2gCAnpE2abSBe7BPPZLkveOL3KQbB4OqYTZi1etH7KNZGRbEGjhzN6HBLVInpCP5ij2 uyY6uKEEW6alo+Vy4hZUqF64j/lVKhycD6qQ5w2sKENAvFL7AxsYJhznCas/43EA2F9N aokLr4IiKetKv+8iyox6R3apPGDCVAQZ13EqPzac6ArhwNTswkP/RxktAqcOsZmIyYDx R9PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9-v6si15832630plo.377.2018.08.01.09.06.13; Wed, 01 Aug 2018 09:06:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390034AbeHARvp (ORCPT + 99 others); Wed, 1 Aug 2018 13:51:45 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34394 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389698AbeHARvp (ORCPT ); Wed, 1 Aug 2018 13:51:45 -0400 Received: from p4fea5a5a.dip0.t-ipconnect.de ([79.234.90.90] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fktcj-00028t-1Z; Wed, 01 Aug 2018 18:05:17 +0200 Date: Wed, 1 Aug 2018 18:04:50 +0200 (CEST) From: Thomas Gleixner To: Gaurav Kohli cc: john.stultz@linaro.org, sboyd@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] timers: Clear must_forward_clk inside base lock In-Reply-To: <1533129016-28050-1-git-send-email-gkohli@codeaurora.org> Message-ID: References: <1533129016-28050-1-git-send-email-gkohli@codeaurora.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Aug 2018, Gaurav Kohli wrote: > @@ -1657,6 +1657,17 @@ static inline void __run_timers(struct timer_base *base) > > raw_spin_lock_irq(&base->lock); > > + /* > + * The must_forward_clk flag is cleared unconditionally also for > + * the deferrable base. The deferrable base is not affected by idle > + * tracking and never forwarded, so clearing the flag is a NOOP. > + * > + * The fact that the deferrable base is never forwarded can cause > + * large variations in granularity for deferrable timers, but they > + * can be deferred for long periods due to idle anyway. > + */ > + base->must_forward_clk = false; > + > while (time_after_eq(jiffies, base->clk)) { > > levels = collect_expired_timers(base, heads); > @@ -1676,19 +1687,6 @@ static __latent_entropy void run_timer_softirq(struct softirq_action *h) > { > struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); > > - /* > - * must_forward_clk must be cleared before running timers so that any > - * timer functions that call mod_timer will not try to forward the > - * base. idle trcking / clock forwarding logic is only used with > - * BASE_STD timers. You lost this part of the comment .... Thanks, tglx