All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/i915/selftests: Check the context size
Date: Fri, 16 Aug 2019 15:24:02 -0700	[thread overview]
Message-ID: <1ce77c55-9313-beb3-a3db-facca5981914@intel.com> (raw)
In-Reply-To: <156599358976.22053.12945461371965121062@skylake-alporthouse-com>



On 8/16/19 3:13 PM, Chris Wilson wrote:
> Quoting Daniele Ceraolo Spurio (2019-08-16 22:50:43)
>>
>>
>> On 8/16/19 12:17 PM, Chris Wilson wrote:
>>> +static int live_context_size(void *arg)
>>> +{
>>> +             /*
>>> +              * Hide the old default state -- we lie about the context size
>>> +              * and get confused when the default state is smaller than
>>> +              * expected. For our do nothing request, inheriting the
>>> +              * active state is sufficient, we are only checking that we
>>> +              * don't use more than we planned.
>>> +              */
>>> +             saved.state = fetch_and_zero(&engine->default_state);
>>> +             saved.pinned = fetch_and_zero(&engine->pinned_default_state);
>>> +
>>> +             engine->context_size += I915_GTT_PAGE_SIZE;
>>
>> if CONFIG_DRM_I915_DEBUG_GEM is set we already bump the size inside the
>> context_alloc(), do we need to bump it again here?
> 
> No, it comes out in the wash as we apply the same redzone twice. At least,
> adding and checking a second page after what we believe to be the end of
> the context image does not help sensitivity (so makes a worse test imo).
> 
> The benefit of this selftest is that we check all submission modes, and
> can set up any execution pattern we think might be required (within
> reason). So, I think it still has a use even if we need to remind
> ourselves of the overlap.
> -Chris
> 

Fair enough. With the above written down as a comment in the code:

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

Daniele
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-08-16 22:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 17:58 [PATCH] drm/i915/selftests: Check the context size Chris Wilson
2019-08-16 18:43 ` Daniele Ceraolo Spurio
2019-08-16 18:50   ` Chris Wilson
2019-08-16 19:09 ` [PATCH v2] " Chris Wilson
2019-08-16 19:09 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-08-16 19:17 ` [PATCH v3] " Chris Wilson
2019-08-16 21:50   ` Daniele Ceraolo Spurio
2019-08-16 22:13     ` Chris Wilson
2019-08-16 22:24       ` Daniele Ceraolo Spurio [this message]
2019-08-16 19:55 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Check the context size (rev3) Patchwork
2019-08-16 20:16 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-17 13:50 ` ✓ Fi.CI.IGT: " 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=1ce77c55-9313-beb3-a3db-facca5981914@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 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.