From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris.p.wilson@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gem: Use large rings for compute contexts
Date: Tue, 16 May 2023 15:31:23 +0300 [thread overview]
Message-ID: <87wn18h2zo.fsf@intel.com> (raw)
In-Reply-To: <20230516121345.1036399-1-tejas.upadhyay@intel.com>
On Tue, 16 May 2023, Tejas Upadhyay <tejas.upadhyay@intel.com> wrote:
> From: Chris Wilson <chris.p.wilson@intel.com>
>
> Allow compute contexts to submit the maximal amount of work without
> blocking userspace.
>
> The original size for user LRC ring's (SZ_16K) was chosen to minimise
> memory consumption, without being so small as to frequently stall in the
> middle of workloads. With the main consumers being GL / media pipelines
> of 2 or 3 batches per frame, we want to support ~10 requests in flight
> to allow for the application to control throttling without stalling
> within a frame.
>
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index 5402a7bbcb1d..0edb7be6fa5e 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> @@ -965,6 +965,8 @@ static int intel_context_set_gem(struct intel_context *ce,
>
> GEM_BUG_ON(intel_context_is_pinned(ce));
> ce->ring_size = SZ_16K;
> + if (ce->engine->class == COMPUTE_CLASS)
> + ce->ring_size = SZ_512K;
Not a huge fan of first initializing something, and then changing it in
some cases.
Why not if (ce->engine->class == COMPUTE_CLASS) ... else ...?
BR,
Jani.
>
> i915_vm_put(ce->vm);
> ce->vm = i915_gem_context_get_eb_vm(ctx);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-05-16 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 12:13 [Intel-gfx] [PATCH] drm/i915/gem: Use large rings for compute contexts Tejas Upadhyay
2023-05-16 12:31 ` Jani Nikula [this message]
2023-05-16 14:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-16 20:04 ` [Intel-gfx] ✓ 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=87wn18h2zo.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=chris.p.wilson@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tejas.upadhyay@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