Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1761288imm; Thu, 2 Aug 2018 00:05:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc05hAav8cZsOB9lKlr/rHXWz9HKFRUS6X9JGrqCLilH0/d4BPHb5IEJWDqVWu5S0nvQOcx X-Received: by 2002:a62:87ce:: with SMTP id i197-v6mr1686212pfe.62.1533193552449; Thu, 02 Aug 2018 00:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533193552; cv=none; d=google.com; s=arc-20160816; b=ZmlmPi+LxcPgdeFxFolwLz+FcLMQneSZhYXtHzlrdVYS3DkEvtuvuQlHwNraulNMqA MtAOYNLLXTDPATsz5XlTNfUInWAT9ZoOFvwtXBsjxKupyP8FRlDQ3WXYXenCjEXhlnaw jxMPMMLRMZsVzGgTNAlYBEtjvT7FFfUqLmrVyONbxRrrNOLbs7+x5sue0hShs8dP7AMF iIiCEdbETVfNVTmWBj9caQb6VJIbeBNM1x+uTnP6gDez1dlhg2SMzLKlauS8D3mdujby F+Lcb5KZF/Ol4HsHEDQ6W7UtfEnpR9koYRV8TFnqZYjqZu4xjdIDzM8csbWoSvYY3I3I q5uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=Mf6aXKCVYbC64uZ069cg6+4Eg3Orh3mBDTa7vUmWGuc=; b=qVuNEBcAFLAdVp/3YwrtzHSroeMRmuRjdmSVe7MyQvPUDuB8ArvYnsyYpXtoWSQNWT TRvnvVmB7SrsDlby52Eo7SIwo0SGFJ4Og5hoLEMNpZi/sLmP2s5Y/YFrJE39NbJ3NJck WKXmWxWF4rYCLN8f6fipAz/fvthcqj/q0eu4edmyTmX6cPggyQKISkoe/fZAjarSl1an U0e9sA/RkmlGPwvWYymDcxDh8jbAkfo7G2QB+IF2ZGZh8pUTd9UM1gPOGmAtbwvAcg8w X8zWdOtT/J92T7I4czwc4cLUjoCI2LIitYjOBf2zWPQpAY40kfCXOEQX6gQzZVRUdubY dVUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=YQwlmOr4; dkim=pass header.i=@codeaurora.org header.s=default header.b=YQwlmOr4; 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 e2-v6si1223911pgl.4.2018.08.02.00.05.38; Thu, 02 Aug 2018 00:05:52 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=YQwlmOr4; dkim=pass header.i=@codeaurora.org header.s=default header.b=YQwlmOr4; 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 S1729764AbeHBIyM (ORCPT + 99 others); Thu, 2 Aug 2018 04:54:12 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:44832 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbeHBIyL (ORCPT ); Thu, 2 Aug 2018 04:54:11 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4C2AA607BD; Thu, 2 Aug 2018 07:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533193466; bh=i3NvDqWIhQuiarPOzkCuEbBeAah9zhpjUEhaiWpfqqM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YQwlmOr4FVGau+CNuQpXkE28NIucMwv98Jf6t5+1AjY6KvXNoYRRo3F7UlW2mfI3S lldmpUkA3JP9Z6XDYkQCMWDvpoFJjL7nficZ9SXyj7OSwoRI8fTpP0b7+04pKGcTqt hQQtlOAP1qTHAQO+MeeWRsL+aI2ZSaRhbqb/dm+M= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.78.76] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gkohli@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 592446044B; Thu, 2 Aug 2018 07:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533193466; bh=i3NvDqWIhQuiarPOzkCuEbBeAah9zhpjUEhaiWpfqqM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YQwlmOr4FVGau+CNuQpXkE28NIucMwv98Jf6t5+1AjY6KvXNoYRRo3F7UlW2mfI3S lldmpUkA3JP9Z6XDYkQCMWDvpoFJjL7nficZ9SXyj7OSwoRI8fTpP0b7+04pKGcTqt hQQtlOAP1qTHAQO+MeeWRsL+aI2ZSaRhbqb/dm+M= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 592446044B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=gkohli@codeaurora.org Subject: Re: [PATCH v2] timers: Clear must_forward_clk inside base lock To: Thomas Gleixner Cc: john.stultz@linaro.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <1533186903-28419-1-git-send-email-gkohli@codeaurora.org> From: "Kohli, Gaurav" Message-ID: Date: Thu, 2 Aug 2018 12:34:21 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/2018 12:04 PM, Thomas Gleixner wrote: > 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. Hi Thomas, Thanks for comment. I agree this can come with normal enqueue of timer as well, will make it more generic to avoid confuzion and upload new patch for same. Regards Gaurav > > 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 > -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.