On 2014-05-09 1:42 PM, "James Bottomley" <James.Bottomley@hansenpartnership.com> wrote:
> In theory, we could use link time optimization to place all the most
> used functions in the first TLB entry. However, as Steve said, have you
> got measurements showing this helps? If it's down in the noise, it's a
> lot of work for no benefit.
It's going to be highly workload dependent. For example, TPC-C randomly accesses all of memory. Even doubling the number of 2MB TLB entries isn't going to help more than a couple of percent. On the other hand, for a scientific workload which juuuust overflows the number of 2MB entries, you might see a 100% speedup with the freeing of a single 2MB entry to userspace. And there are many workloads in between (most exhibit at least some locality of reference).