Typical TLBs have 40-512 entries available. At some point, iterating
every single page in a requested invalidation range and issuing invlpg
on it is more expensive than flushing the TLB and allowing it to reload
on demand.
I've arbitrarily chosen 128 MB of KVA as a hueristic at which point we
flush TLB rather than invalidating every single potential page. Any 128
MB range requires 32 thousand TLB invalidations. This roughly
corresponds to the number of cache lines we're willing to flush
individually when flushing a range, before we dump the entire cache.
Sponsored by: EMC / Isilon Storage Division