dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH 5/6] drm/vc4: Fix overflow mem unreferencing when the binner runs dry.
Date: Tue, 26 Jul 2016 16:11:00 -0700	[thread overview]
Message-ID: <87bn1kov0b.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <CAF6AEGuahXa3ozmLTOtq+bBhtufQbb9GaaHPgPxoBHhsJ_WmeA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]

Rob Clark <robdclark@gmail.com> writes:

> On Tue, Jul 26, 2016 at 4:47 PM, Eric Anholt <eric@anholt.net> wrote:
>> Overflow memory handling is tricky: While it's still referenced by the
>> BPO registers, we want to keep it from being freed.  When we are
>> putting a new set of overflow memory in the registers, we need to
>> assign the old one to the last rendering job using it.
>>
>> We were looking at "what's currently running in the binner", but since
>> the bin/render submission split, we may end up with the binner
>> completing and having no new job while the renderer is still
>> processing.  So, if we don't find a bin job at all, look at the
>> highest-seqno (last) render job to attach our overflow to.
>
> so, drive-by comment.. but can you allocate gem bo's without backing
> them immediately with pages?  If so, just always allocate the bo
> up-front and attach it as a dependency of the batch, and only pin it
> to actual pages when you have to overflow?

The amount of overflow for a given CL is arbitrary, depending on the
geometry submitted, and the overflow pool just gets streamed into by the
hardware as you submit bin jobs.  You'll end up allocating [0,n] new
overflows per bin job.  I don't see where "allocate gem BOs without
backing them immediately with pages" idea would fit into this.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-07-26 23:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 20:47 [PATCH 0/6] vc4 miscellaneous v3d fixes Eric Anholt
2016-07-26 20:47 ` [PATCH 1/6] drm/vc4: Use drm_free_large() on handles to match its allocation Eric Anholt
2016-07-26 20:47 ` [PATCH 2/6] drm/vc4: Use drm_malloc_ab to fix large rendering jobs Eric Anholt
2016-07-26 20:47 ` [PATCH 3/6] drm/vc4: Fix handling of a pm_runtime_get_sync() success case Eric Anholt
2016-07-26 20:47 ` [PATCH 4/6] drm/vc4: Free hang state before destroying BO cache Eric Anholt
2016-07-26 20:47 ` [PATCH 5/6] drm/vc4: Fix overflow mem unreferencing when the binner runs dry Eric Anholt
2016-07-26 21:10   ` Rob Clark
2016-07-26 23:11     ` Eric Anholt [this message]
2016-07-26 23:37       ` Rob Clark
2016-07-27  5:37         ` Eric Anholt
2016-07-27 11:18           ` Rob Clark
2016-07-26 20:47 ` [PATCH 6/6] drm/vc4: Fix oops when userspace hands in a bad BO Eric Anholt

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=87bn1kov0b.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=stable@vger.kernel.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