Re: C aggregate passing (Rust kernel policy)

Kent Overstreet
2025-02-22T22:34:20Z

On Sat, Feb 22, 2025 at 01:46:33PM -0800, Linus Torvalds wrote:
> On Sat, 22 Feb 2025 at 13:22, Kent Overstreet <kent.overstreet@linux.dev> wrote:
> >
> > Power hungry and prone to information leaks, though.
>
> The power argument is bogus.
>
> The fact is, high performance is always "inefficient". Anybody
> who doesn't understand that doesn't understand reality.

It depends entirely on what variable you're constrained on. When you're
trying to maximize power density, you probably will be inefficient
because that's where the easy tradeoffs are. E.g. switching from aerobic
respiration to anaerobic, or afterburners.

But if you're already maxxed out power density, then your limiting
factor is your ability to reject heat. High power electric moters aren't
inefficient for the simple reason that if they were, they'd melt. RC
helicopter motors hit power densities of 5-10 kw/kg, with only air
cooling, so either they're 95%+ efficient or they're a puddle of molten
copper.

CPUs are significatly more in the second category than the first - we're
capped on power in most applications and transistors aren't going to get
meaningfully more efficient barring something radical happening.

> The VLIW people have proclaimed the same efficiency advantages for
> decades. I know. I was there (with Peter ;), and we tried. We were
> very very wrong.

If we ever get a chance I want to hear stories :)

> The vogue thing now is to talk about explicit parallelism, and just
> taking lots of those lower-performance (but thus more "efficient" -
> not really: they are just targeting a different performance envelope)
> cores perform as well as OoO cores.

Those are not terribly interesting to me. Useful to some people, sure,
but any idiot can add more and more cores (and leave it to someone else
to deal with Amdahl's law). I actually do care about straight line
performance...

> It's not like VLIW hasn't been around for many decades. And there's a
> reason you don't see it in GP CPUs.

It's also been the case more than once in technology that ideas appeared
and were initially rejected, and it took decades for the other pieces to
come together to make them practical. Especially when those ideas were
complex when they were first come up with - Multics, functional
programming (or Algol 68 even bofer that).

That's especially the case when one area has been stagnet for awhile. We
were stuck on x86 for a long time, and now we've got ARM which still
isn't _that_ different from x86. But now it's getting easier to design
and fab new CPUs, and the software side of things has gotten way easier,
so I'm curious to see what's coming over the next 10-20 years.