Live data from Hacker News

Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

phoronix.com

71–80 of 114 posts

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#71
post #9

This is somewhat unfortunate for older-gen hardware. The difference between chugging-along but usable vs 20% reduced performance is crippling.

I was thinking that it might be an overall large boon to Intel due to all the new computers everyone will buy...

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#72
post #57

Earlier quoted context omitted.

Sorry, but that's my call, not yours. My computer is not a nuclear power plant.

The Linux team also needs to make a call on the kernel they maintain. You can always choose to stick with an older kernel or even patch out the fixes if you like.

Yeah, that scales really well. The answer to every overreaction and questionable policy is always, "Just rebuild your kernel."

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#73
post #59

Earlier quoted context omitted.

Someone once had the great idea that drivers should be in the same codebase as the kernel. Crazy, I know.

It doesn’t seem crazy to me that something that runs in kernel mode and uses kernel APIs should be in the kernel codebase. What are the downsides?

The main downside is that a bad/buggy driver can take down the entire system.

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#74
post #31
post #26

Earlier quoted context omitted.

Apparently the way to turn this and other mitigations off is the following mouthful: pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier Would it make sense to have a single flag to "run insecure but fast" that we can use on pure development machines, test servers and the like? My Intel development server only runs code I choose.

Hey boss, I don't understand why the code works in devel but fails in production?

:p yes, there will be some of that around.

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#75
post #59

Earlier quoted context omitted.

Someone once had the great idea that drivers should be in the same codebase as the kernel. Crazy, I know.

It doesn’t seem crazy to me that something that runs in kernel mode and uses kernel APIs should be in the kernel codebase. What are the downsides?

Why should drivers necessarily run in the kernel? With appropriate abstraction for interrupts, DMA, etc. much of the work could be done in userland.

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#76

Earlier quoted context omitted.

They still sell Itanian, I don’t think Spectre/Meltdown affect that product line.

*Itanium, and they would likely suffer from the same attacks (maybe not due to being a completely different architecture, but being from thw same company, not sure if there isn't crosspolination between the two), but dont think anyone has looked at them due to small market pressense.

I would expect the opposite. Meltdown and Spectre both make use of peeking at implicit state that chips hang on to in order to optimize microcode; the entire goal of Itanium was to offload this optimization from the chip to the compiler.

A little Googling found an analysis from someone more knowledgeable than myself that backs this up: https://secure64.com/not-vulnerable-intel-itanium-secure64-s...

tl;dr Meltdown takes advantage of out-of-order execution, which Itanium simply doesn't have. Spectre makes use of speculative execution, which Itanium only has in a version too limited to support the attack.

I'm not an expert in this field so I can't attest to the credibility of this analysis. The Spectre part in particular sounds a little hand-wavy but it might just be over my head. But it aligns with my intuition, which is that the simpler and more explicit architecture doesn't have as many places where data can accidentally end up.

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#77
post #31

Earlier quoted context omitted.

Hey boss, I don't understand why the code works in devel but fails in production?

:p yes, there will be some of that around.

What's an example of typical application code that will behave differently with the mitigations on or off?

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#78

Earlier quoted context omitted.

It doesn’t seem crazy to me that something that runs in kernel mode and uses kernel APIs should be in the kernel codebase. What are the downsides?

Why should drivers necessarily run in the kernel? With appropriate abstraction for interrupts, DMA, etc. much of the work could be done in userland.

That’s true, but it’s AFAICT a separate question.

The question I was responding to was: “accepting that, rightly or wrongly, Linux drivers run in kernel mode, does it make sense for them to be in the source tree?”

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#79
post #2

In case people don't like the headline style (leaving out the reference to the answer), the answer given at the end of the article is new Spectre mitigations. We new that speculative-execution mitigations would sometimes reduce performance, and evidently they do. :-(

And yet, surprisingly, no references to " 420 " being an appropriate number for slow response time.

That number seems a bit high.

Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower

#80
post #3

1.3-1.4x slowdown is a lot more than I expected (I know it's for synthetic benchmarks but still...) Can someone explain (or link to an article) how a tweak to HT branch prediction heuristic can have such a huge impact on performance?

The impact is big enough that one would suspect the microcode simply disables indirect branch prediction, so you pay a 16-20 cycle penalty per branch. Indirect branches just aren't frequent enough to explain such a regression via say a simple reduction in prediction resources.

I can test it once I get the new firmware.

Post reply on HN