linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Jiri Wiesner <jwiesner@suse.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the rcu tree
Date: Wed, 24 Jan 2024 06:20:42 -0800	[thread overview]
Message-ID: <f9225eac-7ed9-4abe-8ffc-94936ece0238@paulmck-laptop> (raw)
In-Reply-To: <20240124133105.GM3303@incl>

On Wed, Jan 24, 2024 at 02:31:05PM +0100, Jiri Wiesner wrote:
> On Wed, Jan 24, 2024 at 04:12:23AM -0800, Paul E. McKenney wrote:
> > 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.
> 
> Exactly.
> 
> > 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.
> 
> This will be a more precise solution than enclosing NSEC_PER_SEC / HZ in 
> brackets, which I chose to do in the v2 of this patch.
> 
> > Whatever approach, Jiri, would you like to send an updated patch?
> 
> Yes, I can incorporate the casting to u64 and back to long into the patch. 
> At this point, I am not sure which version to use. There are:
> * v1 (submitted to the LKML on Jan 3rd): the patch that got merged into linux-next
> * v2 (submitted to the LKML on Jan 10th): that has an alternative fix for the interger overflow
> * v3 (submitted to the LKML on Jan 22nd): that incoporates suggestions by Thomas Gleixner
> 
> I could update the v3 of this patch with casting to u64 and back to long. 
> WATCHDOG_INTERVAL_MAX_NS got set to 2 * WATCHDOG_INTERVAL in v3 - a change 
> I do not entirely agree with. I think WATCHDOG_INTERVAL_MAX_NS should be 
> kept narrow so as not to impose a limit on time skew that is too strict 
> for readout intervals approaching 2 * WATCHDOG_INTERVAL in their length. 
> The question is what is too strict.

Please accept my apologies!  I should have caught your updates.

I will drop my current version of your patch and queue your v3 for review
and testing.

							Thanx, Paul

  reply	other threads:[~2024-01-24 14:20 UTC|newest]

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24  4:17 linux-next: build failure after merge of the rcu tree Stephen Rothwell
2024-01-24  9:49 ` Jiri Wiesner
2024-01-24 12:12   ` Paul E. McKenney
2024-01-24 13:31     ` Jiri Wiesner
2024-01-24 14:20       ` Paul E. McKenney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-27  4:19 Stephen Rothwell
2023-07-27 14:08 ` Paul E. McKenney
2023-05-19  0:59 Stephen Rothwell
2023-05-19  2:12 ` Paul E. McKenney
2023-05-22  1:45   ` Stephen Rothwell
2023-05-22 14:57     ` Paul E. McKenney
2023-03-14  1:29 Stephen Rothwell
2023-03-14  4:43 ` Paul E. McKenney
2022-10-17 23:26 Stephen Rothwell
2022-10-18 10:43 ` Frederic Weisbecker
2022-10-18 14:57   ` Paul E. McKenney
2022-04-19  2:36 Stephen Rothwell
2022-04-19  3:31 ` Paul E. McKenney
2021-05-03  0:11 Stephen Rothwell
2021-05-03 16:25 ` Paul E. McKenney
2021-04-22  4:10 Stephen Rothwell
2021-04-22 16:36 ` Paul E. McKenney
2021-03-17  5:36 Stephen Rothwell
2021-03-17 14:23 ` Paul E. McKenney
2021-01-04  0:37 Stephen Rothwell
2021-01-04 12:56 ` Frederic Weisbecker
2020-12-04  8:25 Stephen Rothwell
2020-12-04 19:20 ` Paul E. McKenney
2020-12-06 21:39   ` Stephen Rothwell
2020-12-07  4:48     ` Paul E. McKenney
2020-12-07  8:59       ` Stephen Rothwell
2020-09-17  5:19 Stephen Rothwell
2020-09-17 22:01 ` Paul E. McKenney
2020-09-18  0:00   ` Stephen Rothwell
2020-09-08  5:38 Stephen Rothwell
2020-09-08 13:54 ` Paul E. McKenney
2020-08-18  1:43 Stephen Rothwell
2020-08-18 14:08 ` Paul E. McKenney
2020-06-25  2:57 Stephen Rothwell
2020-06-25  3:45 ` Paul E. McKenney
2020-05-28  9:05 Stephen Rothwell
2020-05-28 16:33 ` Paul E. McKenney
2020-05-28 21:03   ` Paul E. McKenney
2020-04-05  1:49 Stephen Rothwell
2020-04-05  3:10 ` Paul E. McKenney
2020-01-17  3:07 Stephen Rothwell
2019-12-12  2:45 Stephen Rothwell
2019-12-12  4:07 ` Paul E. McKenney
2019-12-12  4:26   ` Stephen Rothwell
2019-12-12  4:41     ` Paul E. McKenney
2020-01-17  3:09 ` Stephen Rothwell
2019-08-13  7:57 Stephen Rothwell
2019-08-13 15:31 ` Paul E. McKenney
2019-08-12  6:12 Stephen Rothwell
2019-08-12 16:19 ` Paul E. McKenney
2019-08-13  5:25   ` Stephen Rothwell
2019-08-13 14:38     ` Paul E. McKenney
2017-09-04  4:50 Stephen Rothwell
2017-09-04 16:39 ` Paul E. McKenney
2017-08-28  4:25 Stephen Rothwell
2017-08-28 17:50 ` Paul E. McKenney
2017-08-11  4:43 Stephen Rothwell
2017-08-11  4:54 ` Paul E. McKenney
2017-08-11  9:14   ` Peter Zijlstra
2017-08-11 14:39     ` Paul E. McKenney
2017-08-11 14:45       ` Peter Zijlstra
2017-08-11 14:41     ` Peter Zijlstra
2017-08-11 20:12       ` Paul E. McKenney
2017-05-29  6:02 Stephen Rothwell
2017-05-29 21:15 ` Paul E. McKenney
2017-05-30  1:40   ` Stephen Rothwell
2017-05-30  1:54     ` Joe Perches
2017-05-30  2:14       ` Paul E. McKenney
2017-05-30  2:20         ` Joe Perches
2017-05-30  3:13           ` Stephen Rothwell
2017-05-30  4:10   ` Michael Ellerman
2017-06-02 17:51     ` Paul E. McKenney
2017-04-20  5:36 Stephen Rothwell
2017-04-20 14:23 ` Paul E. McKenney
2017-04-19  3:50 Stephen Rothwell
2017-04-19  4:06 ` Paul E. McKenney
2017-04-19  5:45   ` Stephen Rothwell
2017-03-08  1:16 Stephen Rothwell
2017-03-08 10:13 ` Daniel Vetter
2017-03-08 17:40   ` Paul E. McKenney
2017-01-19  3:34 Stephen Rothwell
2017-01-19 21:54 ` Paul McKenney
2017-02-13  2:21   ` Stephen Rothwell
2017-02-13  4:37     ` Paul E. McKenney
2017-02-13  6:43       ` Stephen Rothwell
2017-03-08  1:16         ` Stephen Rothwell
2017-03-08  1:37           ` Paul E. McKenney
2017-03-08 18:05           ` Paul E. McKenney
2016-05-02  4:37 Stephen Rothwell
2016-05-02 11:06 ` Paul E. McKenney
2016-02-01  2:55 Stephen Rothwell
2016-02-01  9:53 ` Paul E. McKenney
2016-01-07  8:57 Stephen Rothwell
2016-01-07 18:02 ` Paul E. McKenney
2016-01-07 20:19   ` Stephen Rothwell
2016-01-07 20:52     ` Paul E. McKenney
2016-01-08  1:37       ` Boqun Feng
2016-01-08  3:41         ` Paul E. McKenney
2016-01-08  4:08           ` Stephen Rothwell
2016-01-08  4:48             ` Paul E. McKenney
2016-01-08  4:54               ` Boqun Feng
2016-01-08 15:53                 ` Paul E. McKenney
2016-01-08 15:57                   ` Tejun Heo
2016-01-08 16:18                     ` Paul E. McKenney
2016-01-08 15:58                   ` Boqun Feng
2016-01-08  4:10         ` Stephen Rothwell
2015-09-01  3:50 Stephen Rothwell
2015-09-01  7:49 ` Paul E. McKenney
2015-09-02  3:58   ` Stephen Rothwell
2015-09-02  5:26     ` Paul E. McKenney
2015-09-02  6:40       ` Davidlohr Bueso
2015-09-02  7:14         ` Paul E. McKenney
2015-09-02  7:29           ` Ingo Molnar
2015-09-02  8:34             ` Paul E. McKenney
2015-07-16  3:14 Stephen Rothwell
2015-07-16  3:51 ` Paul E. McKenney
2015-07-16  5:50   ` Stephen Rothwell
2015-07-17 11:40   ` Ingo Molnar
2015-07-17 17:35     ` Paul E. McKenney
2015-07-17 18:53       ` Paul E. McKenney
2015-07-17 19:51         ` Ingo Molnar
2015-07-17 21:33           ` Paul E. McKenney
2015-07-18  2:40             ` Ingo Molnar
2015-04-13 10:39 Stephen Rothwell
2015-04-13 11:06 ` Borislav Petkov
2015-04-13 11:34   ` Ingo Molnar
2015-04-13 12:40     ` Paul E. McKenney
2015-02-27  2:18 Stephen Rothwell
2015-02-27  5:59 ` Paul E. McKenney
2014-12-26  7:51 Stephen Rothwell
2014-12-26 16:54 ` Paul E. McKenney
2014-12-27 16:24   ` Pranith Kumar
2014-12-27 17:20     ` Pranith Kumar
2014-12-31  1:45       ` Paul E. McKenney
2014-12-12  6:12 Stephen Rothwell
2014-12-12 17:23 ` Paul E. McKenney
2014-12-10  8:09 Stephen Rothwell
2014-12-10 15:03 ` Pranith Kumar
2014-12-10 15:18   ` Paul E. McKenney
2014-12-09 11:42 Stephen Rothwell
2014-12-09 14:07 ` Paul E. McKenney
2012-04-16  4:11 Stephen Rothwell
2012-04-16 17:02 ` Paul E. McKenney
2010-09-17  2:42 Stephen Rothwell
2010-09-17  4:39 ` David Miller
2010-09-17  5:34   ` Eric Dumazet
2010-09-17 23:17 ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9225eac-7ed9-4abe-8ffc-94936ece0238@paulmck-laptop \
    --to=paulmck@kernel.org \
    --cc=jwiesner@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).