public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Summers, Stuart" <stuart.summers@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] lib/i915/gem_mman: mmap to the CPU instead of the GTT in some tests
Date: Tue, 19 Nov 2019 22:55:14 +0000	[thread overview]
Message-ID: <ed0455849ccdc96bb2051e5427feefdea237e3f6.camel@intel.com> (raw)
In-Reply-To: <157420248967.13839.16821518378140367312@skylake-alporthouse-com>


[-- Attachment #1.1: Type: text/plain, Size: 2253 bytes --]

On Tue, 2019-11-19 at 22:28 +0000, Chris Wilson wrote:
> Quoting Summers, Stuart (2019-11-19 22:00:17)
> > On Tue, 2019-11-19 at 19:20 +0000, Chris Wilson wrote:
> > > So a possible gem_mmap__device_coherent() {
> > >       ptr = gem_mmap__offset(.type = WC);
> > >       if (ptr)
> > >               return ptr;
> > > 
> > >       ptr = gem_mmap__wc();
> > >       if (ptr)
> > >               return ptr;
> > > 
> > >       return gem_mmap__gt();
> > > }
> > 
> > Yeah I've been playing around locally with something like this (or
> > at
> > least with the mmap_offset/mmap_gtt, your suggestion is cleaner).
> > The
> > problem is in application. Do we apply this to all tests which
> > aren't
> > expliclity doing GGTT testing? Or do we start with something like
> > the
> > gem_ctx_shared and expand over time? I don't have all of the
> > history
> > across the tests, so really appreciate the feedback here Chris.
> 
> In almost all cases, gtt was being used only because it provided
> coherent [uncached] access. There are a few tests that are explicitly
> testing GTT features (and they are easy to spot). The other day I
> think
> I counted around 100 test.c using gem_mmap__gtt of which a quick
> inspection said only 10% of those were looking at GTT features.
> 
> The biggest challenge is choosing the name and semantics of the
> replacement: device/pci_coherent or something like that. And then
> define
> whether or not we use gem_sync() + manual clflush for nonspecific
> testing, or stick with gem_set_domain(GTT) as the lowest common
> denominator. There's pros/cons for either choice (and there will
> always
> be corner cases that explicitly need one or the other) , just patches
> need to be written.

Adding Zbigniew here too for visibility in case I don't get to this.

But corner cases should be covered by specific test cases I'd think.
And if we're trying to push userspace away from gem_set_domain
generally, it seems like the better approach is to model what we want
for the UMDs to use, of course keeping specific cases for backwards
compatibility testing.

Anyway, I'll give another shot similar to what you have above when I
get a chance.

Thanks,
Stuart

> -Chris

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3270 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

  reply	other threads:[~2019-11-19 22:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 18:16 [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_mman: Add functions to get mmap and gtt versions Stuart Summers
2019-11-19 18:16 ` [igt-dev] [PATCH i-g-t 2/2] lib/i915/gem_mman: mmap to the CPU instead of the GTT in some tests Stuart Summers
2019-11-19 18:23   ` Chris Wilson
2019-11-19 18:23   ` Vanshidhar Konda
2019-11-19 18:25   ` Chris Wilson
2019-11-19 18:58     ` Summers, Stuart
2019-11-19 19:20       ` Chris Wilson
2019-11-19 22:00         ` Summers, Stuart
2019-11-19 22:28           ` Chris Wilson
2019-11-19 22:55             ` Summers, Stuart [this message]
2019-11-19 19:05 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915/gem_mman: Add functions to get mmap and gtt versions Patchwork
2019-11-20  7:41 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=ed0455849ccdc96bb2051e5427feefdea237e3f6.camel@intel.com \
    --to=stuart.summers@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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