From: Daniel Vetter <daniel@ffwll.ch>
To: "Siluvery, Arun" <arun.siluvery@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RFC] drm/i915: Add variable gem object size support to i915
Date: Mon, 7 Jul 2014 10:34:54 +0200 [thread overview]
Message-ID: <20140707083454.GD5821@phenom.ffwll.local> (raw)
In-Reply-To: <53AAB6B1.7070107@linux.intel.com>
On Wed, Jun 25, 2014 at 12:46:57PM +0100, Siluvery, Arun wrote:
> On 25/06/2014 12:14, Damien Lespiau wrote:
> >On Wed, Jun 25, 2014 at 11:51:33AM +0100, Damien Lespiau wrote:
> >>(This is not necessarily things one would need to take into account for
> >>this work, just a few thoughts).
> >>
> >>One thing I'm wondering is how fitting the "size" parameter really is
> >>when talking about inherently 2D buffers.
> >>
> >>For instance, let's take a Y-tiled texture with MIPLAYOUT_RIGHT, if we
> >>want to allocate mip map levels 0 and 1, and use the ioctl "naively" to
> >>reserve the LOD1 region in one go, we'll end up over allocating the
> >>space below LOD1 (if I'm not mistaken that is).
> >>
> >>This can be mitigated by several calls to this fallocate ioctl, to
> >>reserve columns of pages (in the case above, columns for the LOD1
> >>region).
> >>
> >>So, how about trying to reduce this ioctl overhead by providing a list
> >>of (start, length) in the ioctl structure?
> >
> >One more thing to factor in is (let's assume one future hardware will
> >support that):
> >https://www.opengl.org/registry/specs/ARB/sparse_texture.txt
> >
> >So maybe what we really want is to be able to specify region of pages
> >that could be specified in (x, y, width, height, stride) ? (idea popped
> >when talking to Neil Roberts (I now have someone working on Mesa in the
> >office).
> >
>
> Hi Damien,
>
> Thank you for your comments and the idea to improve this ioctl.
> At the moment start, end of a region are expected to be page-aligned; ioctl
> can be modified to accept a multiple ranges and modify them in one go to
> reduce the overhead of the ioctl.
>
> We can define how we want to specify multiple ranges, if userspace can
> provide the list as (start, end) pairs kernel can directly use them but what
> would be the preferred way from the user point of view?
This smells badly like premature optimization. For y-tiled a page-row is
32 lines which means even for giant mipmap levels we'll deal with just a
few ioctls to establish/remove a mipmap level. If you can benchmark this
in a real-world tests (or even a microbenchmark that includes a little bit
of texture upload) I'll be impressed. So a linear start/end, page-aligned,
sounds more than good enough to me for now.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-07-07 8:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 15:01 [RFC] drm/i915: Add variable gem object size support to i915 arun.siluvery
2014-05-09 21:18 ` Volkin, Bradley D
2014-05-10 13:42 ` Siluvery, Arun
2014-05-12 16:32 ` Volkin, Bradley D
2014-05-12 16:19 ` Daniel Vetter
2014-05-12 17:02 ` Eric Anholt
2014-05-23 14:54 ` Siluvery, Arun
2014-06-25 10:51 ` Damien Lespiau
2014-06-25 11:14 ` Damien Lespiau
2014-06-25 11:46 ` Siluvery, Arun
2014-06-25 12:57 ` Damien Lespiau
2014-06-25 13:26 ` Tvrtko Ursulin
2014-06-25 13:34 ` Damien Lespiau
2014-07-07 8:34 ` Daniel Vetter [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-25 12:48 arun.siluvery
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=20140707083454.GD5821@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=arun.siluvery@linux.intel.com \
--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