DocumentCode
3105870
Title
Automated locality optimization based on the reuse distance of string operations
Author
Rus, Silvius ; Ashok, Raksit ; Li, David Xinliang
Author_Institution
Google Inc., Mountain View, CA, USA
fYear
2011
fDate
2-6 April 2011
Firstpage
181
Lastpage
190
Abstract
String operations such as memcpy, memset and memcmp account for a nontrivial amount of Google datacenter resources. String operations hurt processor cache efficiency when the data accessed is not reused shortly thereafter. Such cache pollution can be avoided by using nontemporal memory access to bypass L2/L3 caches. As reuse distance varies greatly across different memcpy static call contexts in the same program, an efficient solution needs to be call context sensitive. We propose a novel solution to this problem using the page protection mechanism to measure reuse distance and the GCC feedback directed optimization mechanism to generate nontemporal memory access instructions at the appropriate static code contexts. First, the compiler inserts instrumentation for calls to string operations. Then a run time library measures reuse distance using the page protection mechanism during a representative profiling run. The compiler finally generates calls to specialized string operations that use nontemporal operations for the arguments with large reuse distance. We present a full implementation and initial results including speedup on large datacenter applications.
Keywords
Web sites; cache storage; computer centres; program compilers; security of data; GCC feedback directed optimization mechanism; Google datacenter resources; L2/L3 caches; automated locality optimization; memory access instructions; page protection mechanism; reuse distance; run time library; string operations hurt processor cache; Arrays; Benchmark testing; Context; Google; Instruments; Libraries; Radiation detectors; memcpy; nontemporal; reuse distance;
fLanguage
English
Publisher
ieee
Conference_Titel
Code Generation and Optimization (CGO), 2011 9th Annual IEEE/ACM International Symposium on
Conference_Location
Chamonix
Print_ISBN
978-1-61284-356-8
Electronic_ISBN
978-1-61284-358-2
Type
conf
DOI
10.1109/CGO.2011.5764686
Filename
5764686
Link To Document