Font Size: a A A

Optimization Of Glibc On Loongson 2F

Posted on:2011-01-13Degree:MasterType:Thesis
Country:ChinaCandidate:K LiFull Text:PDF
GTID:2178360308955364Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
Glibc is a core library on Linux. Many programs are based on it. Therefore, its performance is of great significance. This thesis implemented the optimization of Glibc on Looonson2F, in order that Glibc could take full advantage of Loongson2F, thus high performance and greate user experience on Loongson2F could be achived.This thesis first analyzes the composition of Glibc. The functions in Glibc can be approximately divided into two parts. One part, including functions processing signal, I/O and so on, is related to system calls and primitive operations. The orther part provides general facilities such as string processing and mathematic calculation. Functions in the former part enclose system calls and preprocesse arguments. Their control flows are almost fixed. Thus this thesis focuses on those in the later part. We have implemented the optimization of string and memory functions, mathematic functions, search and sorting functions and cryptographic functions.Various methods are used according to specific functions, including the following:Memory access optimization. By considering the layered storage architecture, it arranges the memory access to make the best of data read in cache, reduce cache conflict misses and capacity misses. It also makes use of appropriate read and store instructions. This method is used in the optimization of sorting functions and string functions.Loop unrolling. It increases the size of basic block and reduces the number of branches. Computation amount of one-loop and limit of register number should be taken into account when loop unrolling is implemented. It is wildly used in this thesis.Instruction scheduling. It rearranges the instructions locally to generate special instructions of Loongson2F and full fill the pipeline. This method is used in the optimization of mathematic functions.Besides, the original flows of the functions are often modified first to apply successive optimization.Experiment results show that optimization rates of most functions are upto 50%.
Keywords/Search Tags:Loongson2F, Glibc, cache miss, loop unrolling, instruction scheduling
PDF Full Text Request
Related items