I recently heard that Linux simply flushes the TLB cache when the corresponding data in that physical address is swapped out, resulting in underutilization of the TLB. I don't know whether all OSes do the same.
If this is true then will increasing RAM and avoiding context switching keep cache in TLB?