3 ms·
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 the
by ploxiln 9y ago
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.