All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt] igt/gem_fence_thresh: Use streaming reads for verify
Date: Mon, 09 Oct 2017 16:36:27 +0300	[thread overview]
Message-ID: <1507556187.6297.34.camel@linux.intel.com> (raw)
In-Reply-To: <20170823125555.20489-1-chris@chris-wilson.co.uk>

Title: s/thresh/thrash/

On Wed, 2017-08-23 at 13:55 +0100, Chris Wilson wrote:
> At the moment, the verify tests use an extremely brutal write-read of
> every dword, degrading performance to UC. If we break those up into
> cachelines, we can do a wcb write/read at a time instead, roughly 8x
> faster. We lose the accuracy of the forced wcb flushes around every dword,
> but we are retaining the overall behaviour of checking reads following
> writes instead. To compensate, we do check that a single dword write/read
> before using wcb aligned accesses.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

> @@ -104,15 +109,78 @@ bo_copy (void *_arg)
>  	return NULL;
>  }
>  
> +#if defined(__x86_64__) && !defined(__clang__)
> +#define MOVNT 512
> +
> +#pragma GCC push_options
> +#pragma GCC target("sse4.1")
> +
> +#include <smmintrin.h>
> +__attribute__((noinline))
> +static void copy_wc_page(void *dst, void *src)
> +{
> +	if (igt_x86_features() & SSE4_1) {
> +		__m128i *S = (__m128i *)src;
> +		__m128i *D = (__m128i *)dst;
> +
> +		for (int i = 0; i < PAGE_SIZE/CACHELINE; i++) {
> +			__m128i tmp[4];
> +
> +			tmp[0] = _mm_stream_load_si128(S++);
> +			tmp[1] = _mm_stream_load_si128(S++);
> +			tmp[2] = _mm_stream_load_si128(S++);
> +			tmp[3] = _mm_stream_load_si128(S++);
> +
> +			_mm_store_si128(D++, tmp[0]);
> +			_mm_store_si128(D++, tmp[1]);
> +			_mm_store_si128(D++, tmp[2]);
> +			_mm_store_si128(D++, tmp[3]);
> +		}
> +	} else
> +		memcpy(dst, src, PAGE_SIZE);
> +}

Not lib/ material?

Add newline anyway.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-10-09 13:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 12:55 [PATCH igt] igt/gem_fence_thresh: Use streaming reads for verify Chris Wilson
2017-08-23 13:14 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-08-25 11:14 ` ✓ Fi.CI.BAT: success " Patchwork
2017-08-25 13:14 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-09-07 18:14 ` [PATCH igt] " Chris Wilson
2017-10-06 20:53 ` Chris Wilson
2017-10-09 13:36 ` Joonas Lahtinen [this message]
2017-10-09 13:56   ` Chris Wilson

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=1507556187.6297.34.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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 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.