All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Use fast WC reads for gem_pread fallback
@ 2021-06-02 20:10 Ashutosh Dixit
  2021-06-02 21:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2021-06-02 23:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Ashutosh Dixit @ 2021-06-02 20:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Chris Wilson

From: Chris Wilson <chris@chris-wilson.co.uk>

Replacing pread with an uncached read is abysmmally slow. Replacing
pread with a streaming read is still slow, but at least faster than not.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/ioctl_wrappers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 0c1b5e3230..619d288a8a 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -55,6 +55,7 @@
 #include "intel_io.h"
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
+#include "igt_x86.h"
 #include "config.h"
 #include "i915/gem_mman.h"
 
@@ -385,7 +386,7 @@ static void mmap_read(int fd, uint32_t handle, uint64_t offset, void *buf, uint6
 		gem_set_domain(fd, handle, I915_GEM_DOMAIN_WC, 0);
 	}
 
-	memcpy(buf, map + offset, length);
+	igt_memcpy_from_wc(buf, map + offset, length);
 	munmap(map, offset + length);
 }
 
-- 
2.31.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-02 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 20:10 [igt-dev] [PATCH i-g-t] lib: Use fast WC reads for gem_pread fallback Ashutosh Dixit
2021-06-02 21:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-06-02 23:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.