-
Andrew Morton authored
This is the first of three patches which reduce the amount of kmap/kunmap traffic on highmem machines. The workload which was tested was RAM-only dbench. This is dominated by copy_*_user() costs. The three patches speed up my 4xPIII by 3% The three patches speed up a 16P NUMA-Q by 100 to 150% The first two patches (copy_strings and pagecache reads) speed up an 8-way by 15%. I expect that all three patches will speed up the 8-way by 40%. Some of the benefit is from reduced pressure on kmap_lock. Most of it is from reducing the number of global TLB invalidations. This patch fixes up copy_strings(). copy_strings does a huge amount of kmapping. Martin Bligh has noted that across a kernel compile this function is the second or third largest user of kmaps in the kernel. The fix is pretty simple: just hang onto the previous kmap as we we go around the loop. It reduces the number of kmappings from copy_strings by a factor of 30.
d34e8c85