From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Keep track of request counts
Date: Sat, 29 Oct 2011 11:35:13 +0200 [thread overview]
Message-ID: <20111029093513.GA2932@phenom.ffwll.local> (raw)
In-Reply-To: <1319867729-8676-2-git-send-email-ben@bwidawsk.net>
On Fri, Oct 28, 2011 at 10:55:27PM -0700, Ben Widawsky wrote:
> There is already a list of requests outstanding for a given client.
> Keeping a count is easy, and will give some information necessary to
> enable a more fair throttling scheme.
>
> For now a client is uniquely identified by its file descriptor, however
> this may change in the future with new process APIs.
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_gem.c | 8 ++++++++
> 2 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 06a37f4..a251d22 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -919,6 +919,7 @@ struct drm_i915_file_private {
> struct {
> struct spinlock lock;
> struct list_head request_list;
> + atomic_t outstanding_requests;
Here's your bikeshed:
Is the spinlock not sufficient to protect the count? I'm asking because
atomic_ts are pretty hard to extend to more fancy scheme (e.g. taking
actual gpu time into account or comparing this with other processes
outstanding_request to make better decisions).
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2011-10-29 9:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 5:55 [PATCH 0/3] RFC: force throttling/fairness Ben Widawsky
2011-10-29 5:55 ` [PATCH 1/3] drm/i915: Keep track of request counts Ben Widawsky
2011-10-29 9:35 ` Daniel Vetter [this message]
2011-10-29 19:30 ` Ben Widawsky
2011-10-29 5:55 ` [PATCH 2/3] drm/i915: Add waitq/wakeups for our per fd requests Ben Widawsky
2011-10-29 5:55 ` [PATCH 3/3] drm/i915: fairness Ben Widawsky
2011-10-29 8:07 ` [PATCH 0/3] RFC: force throttling/fairness Chris Wilson
2011-10-29 18:45 ` Eric Anholt
2011-10-29 19:22 ` Ben Widawsky
2011-10-29 19:40 ` Daniel Vetter
2011-10-29 19:47 ` Daniel Vetter
2011-10-29 19:49 ` Ben Widawsky
2011-10-29 19:27 ` Ben Widawsky
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=20111029093513.GA2932@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox