[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad3a9cf720cd4e1ebe942cdc84a6a670@AcuMS.aculab.com>
Date: Wed, 10 Jan 2024 22:58:23 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Linus Torvalds' <torvalds@...ux-foundation.org>, Stephen Rothwell
<sfr@...b.auug.org.au>
CC: Jiri Slaby <jirislaby@...il.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com>, Andrew Morton
<akpm@...ux-foundation.org>, "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Christoph Hellwig <hch@...radead.org>, "Jason A. Donenfeld" <Jason@...c4.com>
Subject: RE: [PATCH next v4 0/5] minmax: Relax type checks in min() and max().
From: Linus Torvalds
> Sent: 10 January 2024 19:35
>
> On Tue, 9 Jan 2024 at 22:17, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> >
> > > Can somebody else confirm similar time differences? Or is it just me?
> >
> > I was hopeful, but:
>
> Yeah, my build times seem to be very unstable for some reason, and
> seem to fluctuate fairly widely. I'm not sure what triggers it.
>
> The min/max simplification helps,
The first check in __types_ok() can go, the second one (with the '+ 0')
(added to promote char to int) includes the first one.
-Wsign-compare will need work from the compiler people.
I suspect that when min(unsigned_var, 4) effectively does
int four = 4;
if (unsigned_var > four)
it is going to trip the warning until gcc uses its value tracking
for that warning.
Have you looked at how much the compile-time string length
stuff costs? That might also be measurable.
And the compile-time usercopy tests.
The run-time costs of the latter can be horrid...
> but I think my "big change" thing
> was mostly due to other fluctuations.
>
> It would be lovely to have some performance automation to find build
> time regressions, although at least for me, one source of regressions
> tends to be system updates with new compilers ;(
Can we go back to gcc 2.95 or 2.97 - that would be quick on a modern cpu :-)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists