From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 4/7] tests/gem_mmap_gtt: Make the small-bo tiling tests work on old platforms
Date: Tue, 15 Dec 2015 14:01:24 +0200 [thread overview]
Message-ID: <20151215120124.GD4437@intel.com> (raw)
In-Reply-To: <20151215112959.GB4437@intel.com>
On Tue, Dec 15, 2015 at 01:29:59PM +0200, Ville Syrjälä wrote:
> On Tue, Dec 15, 2015 at 11:16:52AM +0000, Chris Wilson wrote:
> > On Tue, Dec 15, 2015 at 12:57:15PM +0200, Ville Syrjälä wrote:
> > > On Tue, Dec 15, 2015 at 09:57:22AM +0000, Chris Wilson wrote:
> > > > On Tue, Dec 15, 2015 at 11:41:44AM +0200, Ville Syrjälä wrote:
> > > > > On Mon, Dec 14, 2015 at 08:54:35PM +0000, Chris Wilson wrote:
> > > > > > On Mon, Dec 14, 2015 at 08:49:38PM +0000, Chris Wilson wrote:
> > > > > > > On Mon, Dec 14, 2015 at 10:15:53PM +0200, ville.syrjala@linux.intel.com wrote:
> > > > > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > > > >
> > > > > > > > Several factors conspire against us when trying to execute
> > > > > > > > the tiled small-bo tests:
> > > > > > > > - pre-gen4 require power of two fences, with natural alignment
> > > > > > > > - the entire gtt may be mappable
> > > > > > > > - we put a guard page at the end of gtt
> > > > > > > >
> > > > > > > > What all that means is that when we try to use a tiled object half
> > > > > > > > the size of the mappable area, we can only fit it in the first half
> > > > > > > > of the gtt. That leads to a SIGBUS when we try to fault in the
> > > > > > > > object when there's already something (eg. fbdev) occupying the
> > > > > > > > first half of gtt.
> > > > > > > >
> > > > > > > > So in order to make the tests run on old machines, let's further
> > > > > > > > halve the object size when things look too tight.
> > > > > > >
> > > > > > > That defeats the point of the test. The idea is to have the two objects
> > > > > > > that just don't fit, but only just.
> > > > > >
> > > > > > i.e. the test is meant to show that the kernel heuristics for using
> > > > > > partial vma do not prevent the page-fault-of-doom.
> > > > >
> > > > > So just skip then?
> > > >
> > > > The kernel has a bug that partial vma was supposed to address.
> > >
> > > I'm not sure partial vma has any benefit in this case. Sure, you could
> > > them mmap the thing but unless we teach the GPU to also use partial
> > > mappings it won't do any good since we just can't fit the thing into
> > > the gtt.
> >
> > For gen2, not being able to fit into mappable is an issue for the GPU as
> > well, sure. But for userspace being oblivious and *always* being able to
> > use mmaping of a bo, it is a big deal. (Being oblivious helps with
> > robustness in the stack, X/display-server-de-jour should not die just
> > because of a resource conflict - now X should catch the fault and handle
> > it, give or take bugs, avoiding that error path entirely is even better.)
>
> Yeah, I suppose it would be nice not to SIGBUS even if userspace is
> trying something a bit crazy. It would just get an error later from
> execbuf when trying to use the bo with the GPU. So I guess the right
> fix would be to fall back to partial vma if we fail to bind the full
> vma.
Hmm, actaully no. This was about tiled objects, and we don't do
tiled+partial at all currently. Would need to teach the code to do that
first.
>
> >
> > Using "sparse" resources so that we can arbitrary sized objects is
> > something I'd like. But we have so much "whole-object-at-once" baked
> > into the code, it will be a challenge.
> > -Chris
> >
> > --
> > Chris Wilson, Intel Open Source Technology Centre
>
> --
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-12-15 12:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 20:15 [PATCH i-g-t 1/7] Fix a bunch of printf types ville.syrjala
2015-12-14 20:15 ` [PATCH i-g-t 2/7] tests/gem_mmap_gtt: Deal with tile sizes on gen2/3 ville.syrjala
2015-12-14 21:52 ` Chris Wilson
2015-12-15 20:37 ` Ville Syrjälä
2015-12-15 20:51 ` Paulo Zanoni
2015-12-15 21:08 ` Ville Syrjälä
2015-12-15 21:19 ` Paulo Zanoni
2015-12-15 21:30 ` Ville Syrjälä
2015-12-14 20:15 ` [PATCH i-g-t 3/7] tests/gem_mmap_gtt: Add progress indicators ville.syrjala
2015-12-14 20:15 ` [PATCH i-g-t 4/7] tests/gem_mmap_gtt: Make the small-bo tiling tests work on old platforms ville.syrjala
2015-12-14 20:49 ` Chris Wilson
2015-12-14 20:54 ` Chris Wilson
2015-12-15 9:41 ` Ville Syrjälä
2015-12-15 9:57 ` Chris Wilson
2015-12-15 10:57 ` Ville Syrjälä
2015-12-15 11:16 ` Chris Wilson
2015-12-15 11:29 ` Ville Syrjälä
2015-12-15 12:01 ` Ville Syrjälä [this message]
2015-12-15 12:30 ` Chris Wilson
2015-12-16 10:46 ` Daniel Vetter
2015-12-16 11:11 ` Chris Wilson
2015-12-14 20:15 ` [PATCH i-g-t 5/7] lib/debugfs: Read the crc frame counter as hex ville.syrjala
2015-12-15 12:03 ` Morton, Derek J
2015-12-15 12:46 ` Ville Syrjälä
2015-12-14 20:15 ` [PATCH i-g-t 6/7] tests/kms_flip: Increase TEST_TS_CONT max seq difference to 150 ville.syrjala
2015-12-16 10:49 ` Daniel Vetter
2015-12-14 20:15 ` [PATCH i-g-t 7/7] tests/kms_pipe_crc_basic: Use igt_assert_eq() to see the failing frame counts ville.syrjala
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=20151215120124.GD4437@intel.com \
--to=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).