Nick Piggin wrote: > I think possibly each thread should have a private vma cache, with > room for at least its stack vma(s), (and several others, eg. code, > data). Perhaps the per-mm cache could be dispensed with completely, > although it might be useful eg. for the heap. And it might be helped > with increased entries as well. > > I've got patches lying around to implement this stuff -- I'd be > interested to have more detail about this problem, or distilled test > cases. OK, I got interested again, but can't get Val's ebizzy to give me a find_vma constrained workload yet (though the numbers back up my assertion that the vma cache is crap for threaded apps). Without the patch, after bootup, the vma cache gets 208 364 hits out of 438 535 lookups (47.5%) ./ebizzy -t16: 384.29user 754.61system 5:31.87elapsed 343%CPU And ebizzy gets 7 373 078 hits out of 82 255 863 lookups (8.9%) With mm + 4 slot LRU per-thread cache (this patch): After boot, 303 767 / 439 918 = 69.0% ./ebizzy -t16: 388.73user 750.29system 5:30.24elapsed 344%CPU ebizzy hits: 53 024 083 / 82 055 195 = 64.6% So on a non-threaded workload, hit rate is increased by about 50%; on a threaded workload it is increased by over 700%. In rbtree-walk -constrained workloads, the total find_vma speedup should be linear to the hit ratio improvement. I don't think my ebizzy numbers can justify the patch though... Nick -- SUSE Labs, Novell Inc.