Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1072767rdb; Wed, 24 Jan 2024 04:13:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLkCRauHhONe3HxXlcZe6/KlQD7mLkIQDXxj7N1lF3hHtioqta1+t37CQaLNzxz1K5uiGM X-Received: by 2002:aa7:d44b:0:b0:559:edd1:5071 with SMTP id q11-20020aa7d44b000000b00559edd15071mr1969381edr.61.1706098428655; Wed, 24 Jan 2024 04:13:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706098428; cv=pass; d=google.com; s=arc-20160816; b=yxFL6ksOIbdPMi738p8QUmZrKDknRCLCSJBBUt+p0oY1XC5otm7apG3zQec6LAx4xR OuI4fzSCaR1iBg0PQBo4VAIooWJwIwGfe0LkOGxcyAUGHFg5dgBvKHrv9ddm0obAFqrk TzJ5zyJndKpb8nT98lxSiz9gZnWSM1FUSDPBiqq/jWnMVThGQ8bL6dCUVibCUE4Qx1cQ s1TzSJ0Lhfo7p+axfRC+ove/5N1E7AyJ2MoI0dKwaoLfYUeCZhZZ3dJ2wVXULAdvO3Jq +GvuGVxjknpV1AxfWwUxuPnyeJvfl8eWEFmm5RSpSki1r+4JEIiGW+SshuMQhNTa6X/G 5i5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=YLacmfACLz1D2e6OE6ubVOPZ4UnpneaXZCk5Ze7CYJc=; fh=RdcgLtweKvWSUzlEnniikLqBEdGZ/lz+xGNYK8yT8lU=; b=AxTLlM40kOOyOFv1Ge7Xk2l/+inyhywI5yw/07N8b6ElZ04LgHsSapABQTrNOec/nC OBKvNHwYhU5jkIyuAmHY4JHo3d3Hoopm3P3KfeO6FASS9QrDQcTLWpsNICWIRV6+j391 b4s7Hfzt4oe1FEyXBh6/TuZRat1ftUCQN8f3CP9Lnzy0EgJ3ZpJe7KrBWB88fs7Y3jXu u/p4WXmoPrLniyZ6wYZqD0XOoKKol+dwl9iFGhqGK3R4Zr7PMkNiyp9hA/jLytBoW//C Ss+meMMGEzFz1tSg7RVn+tUo4ChOYslzX5IiuEgjM8jS6PRoU30aEOx7LUqJ6g0gsg9N 3S+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I1ikGent; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-36950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a18-20020a50e712000000b00558bdc547d4si12595213edn.135.2024.01.24.04.13.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 04:13:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I1ikGent; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-36950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6BC601F2154C for ; Wed, 24 Jan 2024 12:13:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2355D60DD6; Wed, 24 Jan 2024 12:12:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I1ikGent" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AD9D18622; Wed, 24 Jan 2024 12:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706098345; cv=none; b=h+nHvcUzns4imWLsx+Mosxa9D8g5MbLLXh43dOgBDRJJosgnyGLd59kPpfpk67CsDEi/bOItZlgU6sWc9mSP8xwm5n3kNlE8ZMp0HWnpLaqhaLVDB3Z31pqAbogZLbNPWSIFh+MIlqyhsDWhmiaLqPBtui17TcFxERnr+MSANYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706098345; c=relaxed/simple; bh=NvFZcTkuq6TdnuxdMQv6/07eRqV9jkT+b+3hi2RFLD4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=njuN2URZgb4hDnQzzdUAXb2dO1poQ5NMd20mf2PoVmKUmy3ZJVse9TzHVJPndW9zADFXDoXdTVNurkxb5SYVT3TK0LvZcjx6t9f/DzLZk8VWZUpxitrNOPnHp6BN9mLAYbV1YHVVUVBFNEC9dGJZgaEjQ17rKqbPqBwa1YTjKNA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I1ikGent; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA2ADC433C7; Wed, 24 Jan 2024 12:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706098343; bh=NvFZcTkuq6TdnuxdMQv6/07eRqV9jkT+b+3hi2RFLD4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=I1ikGentxd5rtiAoXXcbDUTsVt74I0bcFtZUnfJAKicv9kLBIcjNIsU2B0EBQ0FPK krEhw5xBqynIuWfF6mAZSZZXlzrAUvSTDO4A7+1JEMkMbEk78m7Z0XaNshrObBxWWK qTmjtdNjg/M5LFA7rHfzTpuGMLCrUk2Q5rw0v5+Jkd5xK7E48mOgzJWGaFGR+6g6Dv WsdXBotDkYAqQ01XaYdrCsMcE/DmxO6YsBHeS9Mjv4vFz1bdHkScVzYmN52aM8n4TT hJs+9RkPgoaGHlipP9U8rb7Ohsvbud9HrPGU6oyYQJnmbdF1Sw3fNAcp4lxoZocKLc UlRpOp34gZurA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 41C63CE0EDF; Wed, 24 Jan 2024 04:12:23 -0800 (PST) Date: Wed, 24 Jan 2024 04:12:23 -0800 From: "Paul E. McKenney" To: Jiri Wiesner Cc: Stephen Rothwell , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build failure after merge of the rcu tree Message-ID: <6b5c4acc-f184-4ad9-9029-dd7967fe4a04@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20240124151743.052082af@canb.auug.org.au> <20240124094954.GL3303@incl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240124094954.GL3303@incl> On Wed, Jan 24, 2024 at 10:49:54AM +0100, Jiri Wiesner wrote: > On Wed, Jan 24, 2024 at 03:17:43PM +1100, Stephen Rothwell wrote: > > After merging the rcu tree, today's linux-next build (i386 defconfig) > > failed like this: > > In file included from include/linux/dev_printk.h:14, > > from include/linux/device.h:15, > > from kernel/time/clocksource.c:10: > > kernel/time/clocksource.c: In function 'clocksource_watchdog': > > kernel/time/clocksource.c:103:34: error: integer overflow in expression of type 'long int' results in '-1619276800' [-Werror=overflow] > > 103 | * NSEC_PER_SEC / HZ) > > | ^ > > Caused by commit > > 1a4545025600 ("clocksource: Skip watchdog check for large watchdog intervals") > > I have used the rcu tree from next-20240123 for today. > > This particular patch is still beging discussed on the LKML. This is the > latest submission with improved variable naming, increased threshold and > changes to the log and the warning message (as proposed by tglx): > https://lore.kernel.org/lkml/20240122172350.GA740@incl/ > Especially the change to the message is important. I think this message > will be commonplace on 8 NUMA node (and larger) machines. If there is > anything else I can do to assist please let me know. Here is the offending #define: #define WATCHDOG_INTR_MAX_NS ((WATCHDOG_INTERVAL + (WATCHDOG_INTERVAL >> 1))\ * NSEC_PER_SEC / HZ) The problem is that these things are int or long, and on i386, that is only 32 bits. NSEC_PER_SEC is one billion, and WATCHDOG_INTERVAL is often 1000, which overflows. The division by HZ gets this back in range at about 1.5x10^9. So this computation must be done in 64 bits even on 32-bit systems. My thought would be a cast to u64, then back to long for the result. Whatever approach, Jiri, would you like to send an updated patch? In the meantime, I will rebase to exclude this one from -next. Thanx, Paul