Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1739977imm; Wed, 1 Aug 2018 23:37:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdYm/WGf7/EnzbpD6cRaRGWBYiBTBIDn5ft/4/BJuuNmBY6UL8qsYij4915ztDHal2+d4yq X-Received: by 2002:a17:902:42e2:: with SMTP id h89-v6mr1247537pld.69.1533191819960; Wed, 01 Aug 2018 23:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533191819; cv=none; d=google.com; s=arc-20160816; b=yfiYBE8UFe1n/qIA96MH9pPK0nyVuwqNmK1/rKKnwaNDO4413niEL8f/DYyzShk+w/ yVnAWgyZ+RLOKZfK0W8thMsETGk1pJUIUWofAkogG35LmtHNLlSp/l3P9JmZ27Jde+4r srZjEA84HbqNCa6gX6uU+nlCZQEbWRdBqSOaOnMwq4Y5d+gj8JcyzmFwwrKFYtNwMKdu lMGnFse43r2QTn4qDJQOdtUU0RuuIS9J/SZci/DdgzuxMVoHC7HBOpts664UctoISHpM 7p/Zz3hlim63FTahNcO/2Mc44vZeIbmOGX1JNJ62ql6c2M5hKBkT/NszyySA95GbKW5D SD4Q== 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=UCjAGyxVCilXG2LvgNOsuqjfQcKDILpRCoo6D0kfvAc=; b=yUnDsFuxw7k4YuRY0YHmXeJR8Hj6Lli0Ynerj4Z/DCLTbgwATA1zhjRN2gecsjaFon taL1Y2g1ADAEDZk0lCCIz6huDuyCCMMv4G9rVhK1NWXETNiB/BQwF8IcSrUfKgqyyOwO wRjGiIxPFvmMqaw8OndNcKDoZd9FJePtz58w9DoHyImOQ84rNorL1B7/oxwUAOBm7DaN Ho6owGkAMvfSly3Q7EKVxLaLIleS6PZAkqqwaIDhPkUo6DYCx61ZYU6wS9j0k9/uApY3 tqHA/fENPbToKayqYuOHetlTpbRatiUivWr0mw+rAhuGPDEre3l+RRIeflwowCVUYjef mjMg== 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 j10-v6si1202643pfc.335.2018.08.01.23.36.45; Wed, 01 Aug 2018 23:36:59 -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 S1726933AbeHBIY0 (ORCPT + 99 others); Thu, 2 Aug 2018 04:24:26 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:35619 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbeHBIY0 (ORCPT ); Thu, 2 Aug 2018 04:24:26 -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 1fl7C7-0008Hn-AY; Thu, 02 Aug 2018 08:34:43 +0200 Date: Thu, 2 Aug 2018 08:34:42 +0200 (CEST) From: Thomas Gleixner To: Gaurav Kohli cc: john.stultz@linaro.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2] timers: Clear must_forward_clk inside base lock In-Reply-To: <1533186903-28419-1-git-send-email-gkohli@codeaurora.org> Message-ID: References: <1533186903-28419-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 Thu, 2 Aug 2018, Gaurav Kohli wrote: > Timer wheel base->must_forward_clock is indicating that > the base clock might be stale due to a long idle sleep. > The forwarding of base clock takes place in softirq of timer of the base clock takes place in the timer softirq ... > or when a timer is enqueued to base which is idle. While migrate to a base .. > timer from remote CPU to the new base which is idle, then See below. > following race can happen: > > CPU0 CPU1 > run_timer_softirq timers_dead_cpu > > base = lock_timer_base(timer); > base->must_forward_clk = false > if (base->must_forward_clk) > forward(base); >>skip > > migrate_timer_list I don't know why you insist on migrate_timer_list() being part of the picture here. It's only _ONE_ particular way to observe that issue. But it's not the only way. ANY remote enqueue which hits the situation on the other CPU (CPU0 in the example) has this problem. Tying it to migrate_timer_list() just because you observed it that way is actively misleading. Surely you can add a sentence that you observed it in that case, but that's supplemental information. Thanks, tglx