News for hackers. Stuff that matters.
Re:55 GiB/s FizzBuzz (2021) by twoodfin on Monday July 03, 2023 @09:09AM (#36572374)
TLB has to be flushed for process context switch on x86 regardless of Windows/Linux - but modern systems typically allow it to be selectively flushed (the system can elect to not flush tlb for the shared mappings that exist in both processes).

What’s the mechanism for this? AFAIK one of the main motivations for the recent heated discussions on PostgreSQL adopting a threaded model would be eliminating TLB flushes in high-context-switch environments. Can Linux already preserve their (massive) shared mappings?

Re:55 GiB/s FizzBuzz (2021) by zeusk on Monday July 03, 2023 @09:30AM (#36572616)
ASID (Address Space ID) or as Intel calls it PCID (Process Context ID).

The OS juggles these based on what processes are resident on CPU and the various active mappings then uses INVPCID[0] during a context switch.

[0]: https://www.felixcloutier.com/x86/invpcid