All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	intel-gfx@lists.freedesktop.org,
	Jerome Glisse <jglisse@redhat.com>,
	Ben Skeggs <bskeggs@redhat.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH 1/3] drm: Add colouring to the range allocator
Date: Tue, 10 Jul 2012 11:40:14 +0200	[thread overview]
Message-ID: <20120710094014.GC5108@phenom.ffwll.local> (raw)
In-Reply-To: <1341912549_237368@CP5-2952>

On Tue, Jul 10, 2012 at 10:29:09AM +0100, Chris Wilson wrote:
> On Tue, 10 Jul 2012 11:21:57 +0200, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Mon, Jul 09, 2012 at 12:34:37PM +0100, Chris Wilson wrote:
> > > In order to support snoopable memory on non-LLC architectures (so that
> > > we can bind vgem objects into the i915 GATT for example), we have to
> > > avoid the prefetcher on the GPU from crossing memory domains and so
> > > prevent allocation of a snoopable PTE immediately following an uncached
> > > PTE. To do that, we need to extend the range allocator with support for
> > > tracking and segregating different node colours.
> > > 
> > > This will be used by i915 to segregate memory domains within the GTT.
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Dave Airlie <airlied@redhat.com
> > > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > > Cc: Ben Skeggs <bskeggs@redhat.com>
> > > Cc: Jerome Glisse <jglisse@redhat.com>
> > > Cc: Alex Deucher <alexander.deucher@amd.com>
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > 
> > Two little bikesheds:
> > - Do we really need 64bits of colour? Especially since we have quite a few
> >   bits of space left ...
> 
> It was following the convention that we passed around an argument large
> enough to stuff a pointer into if we ever needed to make a far more
> complex decision.

I think the right thing to do in that case would be to embed the gtt_space
and do an upcast ;-)

> > - I think we could add a new insert_color helper that always takes a range
> >   (we can select the right rang in the driver). That way this patch
> >   wouldn't need to touch the drivers, and we could take the opportunity to
> >   embed the gtt_space mm_node into our gem object ...
> 
> I was just a bit more wary of adding yet another helper since they
> quickly get just as confusing as the extra arguments they replace. :)

Oh, I guess you mean a different helper than I do. I think we should add a
new drm_mm_insert_node_colour function that takes a pre-allocated mm_node,
color and range and goes hole-hunting. That way we'd avoid changing any of
the existing drivers (who rather likely will never care about). And I
wouldn't have to convert over the drm_mm functions that deal with
pre-allocated drm_mm_node structs when I get around to resurrect the
embedd gtt_space patch.

I agree that shoveling all the alignment constrains into a new helper for
would be a bit too much overkill
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-07-10  9:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 11:34 [RFC] Set cache level ioctl Chris Wilson
2012-07-09 11:34 ` [PATCH 1/3] drm: Add colouring to the range allocator Chris Wilson
2012-07-10  9:21   ` Daniel Vetter
2012-07-10  9:29     ` Chris Wilson
2012-07-10  9:40       ` Daniel Vetter [this message]
2012-07-10 10:15         ` [PATCH 1/2] " Chris Wilson
2012-07-10 10:15           ` [PATCH 2/2] drm/i915: Segregate memory domains in the GTT using coloring Chris Wilson
2012-07-12 12:19             ` Daniel Vetter
2012-07-12 12:15           ` [PATCH 1/2] drm: Add colouring to the range allocator Daniel Vetter
2012-07-09 11:34 ` [PATCH 2/3] drm/i915: Segregate memory domains in the GTT using coloring Chris Wilson
2012-07-09 11:34 ` [PATCH 3/3] drm/i915: Export ability of changing cache levels to userspace Chris Wilson
2012-07-10  8:54   ` Daniel Vetter
2012-07-10  9:00     ` Chris Wilson
2012-07-10  9:27       ` [PATCH] " Chris Wilson
2012-07-18 18:06         ` Daniel Vetter
2012-07-26 10:34         ` Daniel Vetter
2012-07-26 10:49           ` [PATCH] drm/i915: Segregate memory domains in the GTT using coloring Chris Wilson
2012-07-26 11:00             ` Daniel Vetter

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=20120710094014.GC5108@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alexander.deucher@amd.com \
    --cc=benh@kernel.crashing.org \
    --cc=bskeggs@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jglisse@redhat.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.