mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 23:06:29 +00:00
lib: Try harder to drop-caches
If at first we don't succeed, try again. (For as long as the errno says to at least!) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f81d8eba4f
commit
4779655c6f
@ -553,7 +553,9 @@ void igt_drop_caches_set(uint64_t val)
|
|||||||
fd = igt_debugfs_open("i915_gem_drop_caches", O_WRONLY);
|
fd = igt_debugfs_open("i915_gem_drop_caches", O_WRONLY);
|
||||||
|
|
||||||
igt_assert(fd >= 0);
|
igt_assert(fd >= 0);
|
||||||
nbytes = write(fd, data, strlen(data) + 1);
|
do {
|
||||||
|
nbytes = write(fd, data, strlen(data) + 1);
|
||||||
|
} while (nbytes == -1 && (errno == EINTR || errno == EAGAIN));
|
||||||
igt_assert(nbytes == strlen(data) + 1);
|
igt_assert(nbytes == strlen(data) + 1);
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user