On Wed, 7 Jun 2023 at 18:09, Andres Freund <and...@anarazel.de> wrote: > Having the same memory mapping between threads makes allows the > hardware to share the TLB (on x86 via process context identifiers), which > isn't realistically possible with different processes.
As a matter of historical interest Solaris actually did implement this across different processes. It was called by the somewhat unfortunate name "Intimate Shared Memory". I don't think Linux ever implemented anything like it but I'm not sure. I think this was not so much about cache hit rate but about just sheer wasted memory in page mappings. So I guess hugepages more or less target the same issues. But I find it interesting that they were already running into issues like this 20 years ago -- presumably those issues have only grown. -- greg