Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3489236pxb; Mon, 4 Apr 2022 18:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5JC7iCUy3FESVsY3P+D+h66tvr+mZgdjnFHNzUlqFjnE+nTtHSsoEdlXC9u67ioZbxLNy X-Received: by 2002:a17:903:2cd:b0:156:780d:5b69 with SMTP id s13-20020a17090302cd00b00156780d5b69mr1085596plk.156.1649122648913; Mon, 04 Apr 2022 18:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649122648; cv=none; d=google.com; s=arc-20160816; b=qvsbUsQsL1o3qFMuvWDzgc6FhctVN4g5IL+4phg2ZkMvckNd6xPJwU92p6mQc5wvXG 6bDqoyHsYZbl1Po6ece7qbjYxrk0MVYJHdY7lFI2GPguo+ky5akLJinqINhdOLTff2vf RMD5SJN0U+bNIHYZ/a1Uo1FMzFv/P6whVoPetEH0VUuuTrzg3wa04y3vlHeO4wTTFTIA YAXlXBurKbuZ8O8sTbywu+DIh0DQE+12LYxTLdAJ2KeCEo4KB8HXvvE2dufQ5YMflR7o tRgmxfAmXxF6iHLjYDxoyxJiX4oRGlX5JvbvB5RHFgDDJwxbcCf65env3ObxGf/MsV4p uScw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=jFT29KGwTL9/a9j1ulmt1kYHc8JakC8y8u/vUFmDr+A=; b=S/hAwGW6jrsCSs5xtC4XC3TbyOHEHRxZmjmxDasM2LtH/ijqPAtbxjkMmZnNALY+cc Uci8K7yyOtiLlhJoUALtprTcPyhJgkl1bKUsgIKNc4S8bxZCzJwQcbmtMR95zd9mYptv md3Mkhhq8rhDxVymes3UaAmOUyc5N/9xQC639FV0fkOCcW2v3TIb0FK6CfqS48bp0Xgc MIAxxG7lZiSlFTp3+d2bnJHsN1b6LJD52c02LC2fH2PFft5T1suVYLC8gFgPAS034PKf KXfzCqUm9nVzlLSqyK1mYnqNqznp1oMjv2SeKz8tB41P8HbwrV1jTSvpbkisYUQcH57q Axgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oKcXZxVm; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l12-20020a170902f68c00b00156bf37a733si2111289plg.465.2022.04.04.18.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:37:28 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oKcXZxVm; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8BBC6238D3E; Mon, 4 Apr 2022 17:30:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376650AbiDCXZB (ORCPT + 99 others); Sun, 3 Apr 2022 19:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239505AbiDCXY7 (ORCPT ); Sun, 3 Apr 2022 19:24:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D7537AB9 for ; Sun, 3 Apr 2022 16:23:04 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649028182; 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=jFT29KGwTL9/a9j1ulmt1kYHc8JakC8y8u/vUFmDr+A=; b=oKcXZxVmrLomnV5AsXRBhGhqXA9vCgY/eiH1njhtDtvi31fogEVobD4FgD9XyK2RIkMWP8 E5cd88uv2yVBUzPDIktA81HSnnmfo5RmUXiqYynkX0wYtmqqOK3kKbkb9riKdjzokCHmud V7fRLQu88KQTytC4eE5z+Qhggynauv0UjVevnMiuSp3S0H+KCtvd5T8TUOtBPkElc92n06 UKhzEgwEQMkGfDcIU9xJp1fJdB+S3Iw4YOyQ7BbJaTntPzvagGupPbqJxqTNUBUf7+J/Yf +SEG33ixkXIg2KkGy9RmlsziEJHD/Th7FuBgi7hWuWsVWK+Bdm9tcQiC2YbBvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649028182; 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=jFT29KGwTL9/a9j1ulmt1kYHc8JakC8y8u/vUFmDr+A=; b=YGB7Rj0dmCvxLzhM3h/vBXfAJufjTpO37DI71rK1x3yIr7HpdcrqmAT1PAv/W707+emBYR OB6q16rUGDhK5VCA== To: Johannes Berg , Vincent Whitchurch Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Anna-Maria Gleixner , Frederic Weisbecker Subject: Re: UML time-travel warning from __run_timers In-Reply-To: <43785c9c6ee74a995963144946c67893ebbf8852.camel@sipsolutions.net> References: <20220330110156.GA9250@axis.com> <84f9d627092660c38400b607198c3b83f795be7f.camel@sipsolutions.net> <877d86m978.ffs@tglx> <32423b7c0e3a490093ceaca750e8669ac67902c6.camel@sipsolutions.net> <43785c9c6ee74a995963144946c67893ebbf8852.camel@sipsolutions.net> Date: Mon, 04 Apr 2022 01:23:01 +0200 Message-ID: <87h779lpka.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Johannes, On Sun, Apr 03 2022 at 19:19, Johannes Berg wrote: > Actually, in a sense, this *is* the case of (just) recalculating > next_expiry, no? We just never set next_expiry_recalc since there was > never any timer on this? why are you insisting on fishing in the dark? > So actually this also makes the warning go away: > > --- a/kernel/time/timer.c > +++ b/kernel/time/timer.c > @@ -1729,6 +1733,7 @@ static inline void __run_timers(struct timer_base *base) > WARN_ON_ONCE(!levels && !base->next_expiry_recalc); > base->clk++; > base->next_expiry = __next_timer_interrupt(base); > + base->next_expiry_recalc = !levels; You are papering over the problem. That makes the warnign go away, but does not explain anyhting about the root cause. Can you please provide the information which was asked for? > while (levels--) > expire_timers(base, heads + levels); > @@ -2005,6 +2010,7 @@ static void __init init_timer_cpu(int cpu) > raw_spin_lock_init(&base->lock); > base->clk = jiffies; > base->next_expiry = base->clk + NEXT_TIMER_MAX_DELTA; > + base->next_expiry_recalc = true; This is complete nonsense because at the point where the CPU base is initialized next_expiry _IS_ correct at the outer max. Why would it be required to be recalculated? The only reason why it needs to be recalculated is when a timer is canceled before expiry, but there is _NO_ timer which can be canceled at this point. So what are you trying to solve here? Thanks, tglx