All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 2/2] tests/gem_mmap_gtt: add huge BO test
Date: Wed, 8 Apr 2015 12:00:48 +0100	[thread overview]
Message-ID: <20150408110048.GH12214@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1428490312.7407.10.camel@jlahtine-mobl1>

On Wed, Apr 08, 2015 at 01:51:52PM +0300, Joonas Lahtinen wrote:
> +	/* Test read/write to first/last page through CPU after GTT writes.
> +	 * Require that previous GTT written values still exist.
> +	 */
> +	ptr_cpu = gem_mmap__cpu(fd, bo, 0, huge_object_size,
> +				PROT_READ | PROT_WRITE);
> +	if (!ptr_cpu) {
> +		igt_warn("Not enough free memory to complete huge BO test!\n");
> +		goto out;
> +	}
> +
> +	set_domain_cpu(fd, bo);
> +
> +	igt_assert(memcmp(ptr_cpu              , gtt_pattern, PAGE_SIZE) == 0);
> +	igt_assert(memcmp(ptr_cpu + last_offset, gtt_pattern, PAGE_SIZE) == 0);
> +
> +	memcpy(ptr_cpu, cpu_pattern, PAGE_SIZE);
> +	igt_assert(memcmp(ptr_cpu              , cpu_pattern, PAGE_SIZE) == 0);
> +	igt_assert(memcmp(ptr_cpu + last_offset, gtt_pattern, PAGE_SIZE) == 0);
> +
> +	memcpy(ptr_cpu + last_offset, cpu_pattern, PAGE_SIZE);
> +	igt_assert(memcmp(ptr_cpu              , cpu_pattern, PAGE_SIZE) == 0);
> +	igt_assert(memcmp(ptr_cpu + last_offset, cpu_pattern, PAGE_SIZE) == 0);

On second thought I think this is better using pread as on non-llc
platforms this will a second gigantic clflush. Otherwise lgtm.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-04-08 11:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 12:23 [PATCH i-g-t] tests/gem_mmap_gtt: add huge BO test Joonas Lahtinen
2015-04-07 14:08 ` Chris Wilson
2015-04-08 10:45   ` Joonas Lahtinen
2015-04-08 10:50   ` [PATCH i-g-t v2 1/2] tests/gem_mmap_gtt: Clarify BO domain setting functions Joonas Lahtinen
2015-04-08 10:51   ` [PATCH i-g-t v2 2/2] tests/gem_mmap_gtt: add huge BO test Joonas Lahtinen
2015-04-08 11:00     ` Chris Wilson [this message]
2015-04-08 12:55       ` [PATCH i-g-t v3 1/2] tests/gem_mmap_gtt: clarify BO domain setting functions Joonas Lahtinen
2015-04-13  6:03         ` Joonas Lahtinen
2015-04-08 12:57       ` [PATCH i-g-t v3 2/2] tests/gem_mmap_gtt: add huge BO test Joonas Lahtinen
2015-04-13 11:32 ` [PATCH i-g-t] " Tvrtko Ursulin
2015-04-13 14:22   ` Joonas Lahtinen
2015-04-13 14:49     ` Tvrtko Ursulin
2015-04-14 11:14       ` [PATCH i-g-t v5] " Joonas Lahtinen
2015-04-14 11:23         ` Tvrtko Ursulin
2015-04-14 16:51         ` Thomas Wood
2015-04-13 14:22   ` [PATCH i-g-t v4 2/2] " Joonas Lahtinen

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=20150408110048.GH12214@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.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 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.