diff options
author | Thomas Gleixner <[email protected]> | 2010-11-30 17:49:49 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2010-11-30 20:01:08 -0200 |
commit | fe17420784a6d3602e98f798731369fa05936cbe (patch) | |
tree | 7c55a62a093b6c640114c07dd18f634a17073b97 /net/unix/af_unix.c | |
parent | 55b44629f599a2305265ae9c77f9d9bcfd6ddc17 (diff) |
perf session: Keep file mmaped instead of malloc/memcpy
Profiling perf with perf revealed that a large part of the processing time is
spent in malloc/memcpy/free in the sample ordering code. That code copies the
data from the mmap into malloc'ed memory. That's silly. We can keep the mmap
and just store the pointer in the queuing data structure. For 64 bit this is
not a problem as we map the whole file anyway. On 32bit we keep 8 maps around
and unmap the oldest before mmaping the next chunk of the file.
Performance gain: 2.95s -> 1.23s (Faktor 2.4)
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions