Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3473352pxb; Mon, 4 Apr 2022 18:05:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX1XxSBUU33R8BtPxaDifz0xO6y4LZe6UBpeucf9LOnp7/zb52eLmqf1P1dnRZNUMwAnym X-Received: by 2002:a17:902:7c94:b0:14d:77d2:a72e with SMTP id y20-20020a1709027c9400b0014d77d2a72emr948766pll.153.1649120730416; Mon, 04 Apr 2022 18:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649120730; cv=none; d=google.com; s=arc-20160816; b=aQ4jwLshmiTbFgP4AIico3UllpasCR9GQkYIn7ONbDSWtlpXHx5yycF/NuuyDmiuCJ O8Kszi6QlJqzuPCps/SXvcORdsHS1Ts/6YOrnPzVKZL0gBxTesjTCTXZQKa+7nCe7LV1 PuL50vsGgQOz6l3WncmDIJHvWloxv4DEZiSetsppiQi5YP29c7H7pZZ6Btr0XFBAQ5lr wo9R5w/gk1ewXrVzVWkaD/QK5exkeZQnB4wCJJ8P6c6Hm8sYEyjjCWcTcIxFfFDpTPwX rKSfARxyDvtYNpFaRRdX/k4PA6eq73EgHgh3HdRbnOUS8L9oy9Y3dqpoLn4pHSOYw3GP NeYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=4DehWVmqtNmqk3InZz8gMRe+DXyKq9QiQKFXiTH2z0A=; b=veZ1C4J9JC58b6QuI+zjJAadRPLfRCyZFAuxCxhgxlxOs9wYwpjiHKlIVTv0R/DCtC jtRhecRGFrIydMdHzDzsUMw3sS3ng9L2INLc+V/WfJpahBrbqdGGIrOByrAr3zWXnBuI Iq5OD9hLG5tX+D1iAr5EHdDzbTmG/fjpu0I8ZLUCrtdvbFnR3T+5a2JmTLwlSrkVbtZj PhCPjK6BBBw3x0aQPc//iCh3pp0DCY0kMJq6jqeLsjpG+y3X4s5bLHah99NJLsMXfsfM nxBGxLA/kBLoVIgSPFhyaaYZEXK2DB+RhgGt4CPHOiyM2R1tCuFxWmPUHSp9gOHFnpwf OjJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="hy/mc69D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h2-20020a170902f54200b00153f163b3d3si12299720plf.26.2022.04.04.18.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="hy/mc69D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B44061385B7; Mon, 4 Apr 2022 17:04:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377575AbiDDHEN (ORCPT + 99 others); Mon, 4 Apr 2022 03:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbiDDHEK (ORCPT ); Mon, 4 Apr 2022 03:04:10 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21624326D4 for ; Mon, 4 Apr 2022 00:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=4DehWVmqtNmqk3InZz8gMRe+DXyKq9QiQKFXiTH2z0A=; t=1649055735; x=1650265335; b=hy/mc69DKyHGeRNJv1pil+cT7UtB3CodN/ycw7gdhb86Fwq /x84kxAq25NPHvlR0XoUoaho4+XVEOlhkQQJN9EVW9I6BwWEtE+pqgQ9/rUq5XeaBaP5glEIV++W9 LtpNaxNEJCDrMzKnXZAU99b0bdkkofj1d+cS3f111mT9ZI16JPAlEz+9EjLrsAtX92PVmVnd+LwcL 6cE8EWLyzxDPBl9omFjeS9ulwc8pPb89fHJ1TizOgLQ6dyHuREWqkelISU8FuEIZMsNLWitNcgtL4 NaliMR4dd18UUt+nS8QJLS39wLfEyvHOyP3SSZDJalQlc7j+pgT1FcIqq6k8Yc7w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nbGj4-004h3H-IN; Mon, 04 Apr 2022 09:02:10 +0200 Message-ID: Subject: Re: UML time-travel warning from __run_timers From: Johannes Berg To: Thomas Gleixner , Vincent Whitchurch Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Anna-Maria Gleixner , Frederic Weisbecker Date: Mon, 04 Apr 2022 09:02:09 +0200 In-Reply-To: <87pmlykksj.ffs@tglx> References: <20220330110156.GA9250@axis.com> <84f9d627092660c38400b607198c3b83f795be7f.camel@sipsolutions.net> <877d86m978.ffs@tglx> <32423b7c0e3a490093ceaca750e8669ac67902c6.camel@sipsolutions.net> <87pmlykksj.ffs@tglx> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned 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 On Sun, 2022-04-03 at 21:51 +0200, Thomas Gleixner wrote: > > > There was no timer. If there's ever a timer on this base (BASE_DEF) then > > this doesn't happen. > > You said: > > > > > init_timer_cpu(0) base 0 clk=0xffff8ad0, next_expiry=0x13fff8acf > > > > init_timer_cpu(0) base 1 clk=0xffff8ad0, next_expiry=0x13fff8acf > > which confused me. It's actually initialized to: > > base->clk + NEXT_TIMER_MAX_DELTA > > but that's fine and it is overwritten by every timer which is inserted > to expire before that. So that's not an issue as the prandom timer is > firing and rearmed. No, as I said before, there's never any timer with base 1 (BASE_DEF) in the config we have. The prandom timer is not TIMER_DEFERRABLE (it probably could be, but it's not now). There's no deferrable timer at all. Once there is at least one, the warning goes away. > That would not happen if next_expiry would stay at 0x13fff8acf. The > first one in your trace expires at 5339070200, i.e. 0x13e3bbef8, which > is way before that. But it's not a deferrable timer, so it's on another timer wheel (base), so it doesn't affect the "base 1" part above. > Can you please apply the debug patch below and run with the same > parameters as before? > > Thanks, > > tglx > --- > Hint: I tried to figure out how to use that time travel muck, but did > not get to the point where I bothered to try myself. Might be > either my incompetence or lack of documentation. Clearly the bug > report lacks any hint how to reproduce that problem. Well, the original bug report did have all the information, I gave the link to it before: https://lore.kernel.org/r/20220330110156.GA9250@axis.com With that kernel config and command line, you can reproduce it easily. All you need to know is to use "make ARCH=um" with that .config file :) > + trace_printk("RUN: now=%lu clk=%lu next_expiry=%lu > recalc=%d\n", > + jiffies, base->clk, base->next_expiry, > + base->next_expiry_recalc); IMHO all of this extra debug is a waste of time since you're not differentiating the two bases anywhere. You'll just get confused (as above) since timers do happen on BASE_STD, just not on BASE_DEF. johannes