How hard are operating systems trying to minimize TLB flushes?

I wonder if there is a common mechanism implemented in operating systems to minimize TLB threads, for example, by grouping threads in one process together in the "be scheduled" list.

I think this is an important factor when choosing between processes versus threads. If the OS does not care about whether the next thread is in the same process space or not, then the so-called thread advantage of β€œminimizing TLB flushes” can be overestimated. Is that the case?

Consider a system with hundreds of threads and dozens of processes. If they are not optimized for scheduling threads in the same process in tandem, our expectations regarding thread performance may not be that big.

I will give examples if the question is not so clear.

+2
source share
1 answer

CPU processes look like evolving toward hardware support for tagged TLB entries . This eliminates the need for TLB cleanup. Therefore, even assuming that flushing TLB is a problem for modern processors, it may not be relevant after a few years. I would not base any design decisions on it.

+2
source

Source: https://habr.com/ru/post/1415521/


All Articles