RE: [PATCH next v4 0/5] minmax: Relax type checks in min() and max().

From: David Laight
Date: Fri Jan 19 2024 - 04:14:55 EST


From: Jiri Slaby
> Sent: 19 January 2024 07:14
>
> On 08. 01. 24, 19:19, Linus Torvalds wrote:
> > On Mon, 8 Jan 2024 at 03:46, Jiri Slaby <jirislaby@xxxxxxxxx> wrote:
> >>
> >> CPP [M] drivers/media/pci/solo6x10/solo6x10-p2m.i
> >> real 0m45,002s
> >>
> >> $ git revert 867046cc7027703f60a46339ffde91a1970f2901
> >> CPP [M] drivers/media/pci/solo6x10/solo6x10-p2m.i
> >> real 0m11,132s
> >>
> >> $ git revert 4ead534fba42fc4fd41163297528d2aa731cd121
> >> CPP [M] drivers/media/pci/solo6x10/solo6x10-p2m.i
> >> real 0m3,711s
> >
> > Ouch. Yeah, that's unfortunate. There's a lot of nested nasty macro
> > expansion there, but that timing is excessive.

As a matter of interest what are you compiling on?
I've since test compiled that file and don't even see a pause
in the makefile output - so well under a second to compile.

...
> > That said, I'm sure this thing exists to a smaller degree elsewhere. I
> > wonder if we could simplify our min/max type tests.
> I assume we don't care with solo fixed? Hans pointed out ath11k too.
> Even if there is size increase in the preproc file, I don't see much of
> compile time increase there.

I have got a few patches that reduce the cpp output size.
I'll post them after -rc1 is out.

Linus might need to take them directly since I've added min_const()
and removed the logic that generates 'const from const'.
That requires a trivial change to the 8 files (I've found) that
use min/max for sizing on-stack arrays between two patches.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)