mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
benchmarks/gem_exec_trace: Mark the mmap as sequentially read
Use madvise(MADV_SEQUENTIAL) to let the kernel optimise for our straightforward sequential read pattern. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
3911621d0d
commit
b483e68173
@ -225,6 +225,11 @@ static void replay(const char *filename)
|
||||
ptr = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
close(fd);
|
||||
|
||||
if (ptr == MAP_FAILED)
|
||||
return;
|
||||
|
||||
madvise(ptr, st.st_size, MADV_SEQUENTIAL);
|
||||
|
||||
end = ptr + st.st_size;
|
||||
fd = drm_open_any();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user