News for hackers. Stuff that matters.
Re:PCID is now a critical performance/security feature on x86 by KerrickStaley on Monday January 08, 2018 @06:05PM (#16101741)
One thing I still don't understand about all this:

Why is there still a (smaller) performance hit from the KPTI patch when PCID is used?

Re:PCID is now a critical performance/security feature on x86 by ploxiln on Monday January 08, 2018 @06:57PM (#16102156)
You still have to switch the page tables via the CR3 register. It costs.

And the code around there is more complicated now and has more conditionals ... as they say, it'll be opimized over time, this was the fastest reasonable solution they could put in there (and it still took some time).

Also keep in mind that the reason PCID wasn't used by Linux until 4.14 is that the most obvious way of using it incurred more overhead managing the IDs than it saved by not flushing the TLB between different userland processes. This is the land of fiddly details where theory and practice collide and theory often loses in practice.

Re:PCID is now a critical performance/security feature on x86 by dmitrygr on Monday January 08, 2018 @06:49PM (#16102097)
with PCID, you only flush the kernel mappings out of the TLB (as user mappings are the same). Without PCID you can only flush TLB or not, so you do, and thus user mappings are gone too and need to be repopulated.