Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Randhawa, Jagmeet" <jagmeet.randhawa@intel.com>
To: Matthew Brost <matthew.brost@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH] tests/intel/xe_vm: Update mmap hammer sections to prefetch next page
Date: Wed, 1 May 2024 09:57:45 -0700	[thread overview]
Message-ID: <404cea92-793d-4d66-8d87-de7b495e9605@intel.com> (raw)
In-Reply-To: <20240430221644.2370891-1-matthew.brost@intel.com>


On 4/30/2024 3:16 PM, Matthew Brost wrote:
> 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);
Reviewed-by: Jagmeet Randhawa <jagmeet.randhawa@intel.com>

  parent reply	other threads:[~2024-05-01 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 22:16 [PATCH] tests/intel/xe_vm: Update mmap hammer sections to prefetch next page Matthew Brost
2024-04-30 23:13 ` ✓ CI.xeBAT: success for " Patchwork
2024-04-30 23:15 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-01  5:28 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-01 16:57 ` Randhawa, Jagmeet [this message]
2024-05-01 18:46 ` ✗ Fi.CI.IGT: " 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=404cea92-793d-4d66-8d87-de7b495e9605@intel.com \
    --to=jagmeet.randhawa@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    /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