All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: "Daniel Vetter" <daniel@ffwll.ch>,
	"Christian König" <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH] drm/ttm: Simplify the delayed destroy locking
Date: Mon, 12 Apr 2021 17:49:50 +0200	[thread overview]
Message-ID: <fc54ec361eb3456b90bd4ef2f8151643dd6100c4.camel@linux.intel.com> (raw)
In-Reply-To: <YHRqr2PhPvSZeq19@phenom.ffwll.local>

On Mon, 2021-04-12 at 17:43 +0200, Daniel Vetter wrote:
> On Mon, Apr 12, 2021 at 04:21:37PM +0200, Christian König wrote:
> > 
> > 
> > Am 12.04.21 um 16:16 schrieb Thomas Hellström:
> > > Hi, Christian,
> > > 
> > > On 4/12/21 4:01 PM, Christian König wrote:
> > > > Hi Thomas,
> > > > 
> > > > well in general a good idea, but I'm working on a different
> > > > plan for
> > > > a while now.
> > > > 
> > > > My idea here is that instead of the BO the resource object is
> > > > kept
> > > > on a double linked lru list.
> > > > 
> > > > The resource objects then have a pointer to either the BO or a
> > > > fence
> > > > object.
> > > > 
> > > > When it is a fence object we can just grab a reference to it
> > > > and
> > > > wait for it to complete.
> > > > 
> > > > If it is a BO we evict it the same way we currently do.
> > > > 
> > > > This allows to remove both the delayed delete,
> > > > individualization of
> > > > BOs, ghost objects etc...
> > > 
> > > Hmm, ok. So in that case, what would trigger the final release of
> > > the
> > > buffer object in the absence of a delayed delete list? Would we
> > > use a
> > > fence callback for that?
> > 
> > Key point is you don't need any final release of the BO any more.
> > When the
> > BOs reference count becomes zero it can be destructed immediately.
> > 
> > Only the resource object is kept around and protected by a fence
> > until it
> > can be released finally.
> 
> I was reading dma_resv here for a second, and wondered how we figure
> out
> the refcounting for that. But since you aim for a fence, that's
> refcounted, 

Hmm, Good point. What about objects with multiple shared fences?

/Thomas


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-12 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 13:17 [RFC PATCH] drm/ttm: Simplify the delayed destroy locking Thomas Hellström
2021-04-12 14:01 ` Christian König
2021-04-12 14:16   ` Thomas Hellström
2021-04-12 14:21     ` Christian König
2021-04-12 14:40       ` Thomas Hellström
2021-04-12 14:44         ` Christian König
2021-04-12 15:43       ` Daniel Vetter
2021-04-12 15:49         ` Thomas Hellström [this message]
2021-04-12 16:39           ` 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=fc54ec361eb3456b90bd4ef2f8151643dd6100c4.camel@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@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.