public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Remove racey GEM_BUG_ON
Date: Thu, 9 Dec 2021 12:04:30 -0800	[thread overview]
Message-ID: <88b23ff2-82c9-0941-4568-c0fc178190b0@intel.com> (raw)
In-Reply-To: <20211209195719.GA21632@jons-linux-dev-box>



On 12/9/2021 11:57 AM, Matthew Brost wrote:
> On Thu, Dec 09, 2021 at 11:26:09AM -0800, Daniele Ceraolo Spurio wrote:
>>
>> On 12/9/2021 10:51 AM, Matthew Brost wrote:
>>> A full GT can race with the last context put resulting in the context

forgot to mention earlier but you're missing "reset" here

>>> ref count being zero but the destroyed bit not yet being set. Remove
>>> GEM_BUG_ON in scrub_guc_desc_for_outstanding_g2h that asserts the
>>> destroyed bit must be set in ref count is zero.
>>>
>>> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>>> ---
>>>    drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 --
>>>    1 file changed, 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> index 9b7b4f4e0d91..0f99bb83293a 100644
>>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
>>> @@ -1040,8 +1040,6 @@ static void scrub_guc_desc_for_outstanding_g2h(struct intel_guc *guc)
>>>    		spin_unlock(&ce->guc_state.lock);
>>> -		GEM_BUG_ON(!do_put && !destroyed);
>>> -
>> Do we need to re-queue/flush the destroyer work to make sure it runs before
>> we reset, or is it ok for that to run in parallel?
>>
> The code in the put path will either see the reset or that it isn't
> registered and destroy the context without any interaction with the GuC.

ok.

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

>
> Matt
>
>> Daniele
>>
>>>    		if (pending_enable || destroyed || deregister) {
>>>    			decr_outstanding_submission_g2h(guc);
>>>    			if (deregister)


  reply	other threads:[~2021-12-09 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 18:51 [Intel-gfx] [PATCH] drm/i915/guc: Remove racey GEM_BUG_ON Matthew Brost
2021-12-09 19:26 ` Daniele Ceraolo Spurio
2021-12-09 19:57   ` Matthew Brost
2021-12-09 20:04     ` Daniele Ceraolo Spurio [this message]
2021-12-10  9:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-11  0:19 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=88b23ff2-82c9-0941-4568-c0fc178190b0@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.brost@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox