From: Matthew Brost <matthew.brost@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH] tests/intel/xe_vm: Update mmap hammer sections to prefetch next page
Date: Tue, 30 Apr 2024 15:16:44 -0700 [thread overview]
Message-ID: <20240430221644.2370891-1-matthew.brost@intel.com> (raw)
Adjust mmap hammer sections to prefetch next page by moving BB to within
PAGE_SIZE /8 of page boundary. This is prefetch next page on all
platforms, even ones with a smaller prefetch size.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
tests/intel/xe_vm.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
index de2b1a8136..77cf1f7e67 100644
--- a/tests/intel/xe_vm.c
+++ b/tests/intel/xe_vm.c
@@ -1623,10 +1623,11 @@ test_mmap_style_bind(int fd, struct drm_xe_engine_class_instance *eci,
t.fd = fd;
t.vm = vm;
#define PAGE_SIZE 4096
- t.addr = addr + PAGE_SIZE / 2;
+#define HAMMER_OFFSET (PAGE_SIZE - (PAGE_SIZE / 32))
+ t.addr = addr + HAMMER_OFFSET;
t.eci = eci;
t.exit = &exit;
- t.map = map0 + PAGE_SIZE / 2;
+ t.map = map0 + HAMMER_OFFSET;
t.barrier = &barrier;
pthread_barrier_init(&barrier, NULL, 2);
pthread_create(&t.thread, 0, hammer_thread, &t);
@@ -1685,7 +1686,7 @@ test_mmap_style_bind(int fd, struct drm_xe_engine_class_instance *eci,
igt_assert_eq(data->data, 0xc0ffee);
}
if (flags & MAP_FLAG_HAMMER_FIRST_PAGE) {
- memset(map0, 0, PAGE_SIZE / 2);
+ memset(map0, 0, HAMMER_OFFSET);
memset(map0 + PAGE_SIZE, 0, bo_size - PAGE_SIZE);
} else {
memset(map0, 0, bo_size);
--
2.34.1
next reply other threads:[~2024-04-30 22:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 22:16 Matthew Brost [this message]
2024-04-30 23:13 ` ✓ CI.xeBAT: success for tests/intel/xe_vm: Update mmap hammer sections to prefetch next page Patchwork
2024-04-30 23:15 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-01 5:28 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-01 16:57 ` [PATCH] " Randhawa, Jagmeet
2024-05-01 18:46 ` ✗ Fi.CI.IGT: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240430221644.2370891-1-matthew.brost@intel.com \
--to=matthew.brost@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox