All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: "Marek Olšák" <maraeo@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: Add support for userspace fence waits
Date: Wed, 01 Feb 2012 09:39:06 +0100	[thread overview]
Message-ID: <1328085546.6727.156.camel@thor.local> (raw)
In-Reply-To: <CAAxE2A7Hp_bZgGfsF93FNNwOFsUs8uK4FkyOUJDK0LPz=5sDsQ@mail.gmail.com>

On Die, 2012-01-31 at 22:08 +0100, Marek Olšák wrote: 
> 2012/1/31 Jerome Glisse <j.glisse@gmail.com>:
> > On Tue, Jan 31, 2012 at 06:56:01PM +0100, Michel Dänzer wrote:
> >> On Die, 2012-01-31 at 16:59 +0000, Simon Farnsworth wrote:
> >> > Userspace currently busywaits for fences to complete; on my workload, this
> >> > busywait consumes 10% of the available CPU time.
> >> >
> >> > Provide an ioctl so that userspace can wait for an EOP interrupt that
> >> > corresponds to a previous EVENT_WRITE_EOP.
> >> >
> >> > Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
> >> > ---
> >> > I've been working on top of Jerome's tiling patches, so this doesn't apply
> >> > directly on top of current upstream kernels. I can easily rebase to another
> >> > version upon request - just point me to a git tree.
> >> >
> >> > My goal is to remove the sched_yield in Mesa's r600_fence_finish given up to
> >> > date enough kernel; I hope, though, that the interface is clean enough for
> >> > other users to extend it in the future (e.g. using compute rings).
> >>
> >> I'm afraid not: Unless I'm missing something, userspace can't know which
> >> ring the kernel submitted the CS to, and the kernel can't guess which
> >> ring userspace needs to wait for.
> >
> > iirc the plan was to add a return value to cs ioctl and add an ioctl to
> > allow to wait on this return value. ie allowing userspace to wait on
> > specific submited cs.
> 
> You don't need a new API for that, r300g already does that. It adds a
> dummy relocation and later uses GEM_WAIT_IDLE to wait for it. r600g
> can be updated to do the same thing without kernel changes (besides,
> we must support the old kernels as well, so this is a no-brainer).

One minor problem being that this doesn't support a timeout without
spinning. Shouldn't be relevant for Simon's problem though.


> What would be much more useful is to be able to wait for a fence,
> which can be in the middle of a CS. Now that's something that would
> justify changes in the kernel interface.

To take advantage of that, one would also need to change Gallium such
that it's possible to get a fence without a flush.


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2012-02-01  8:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 16:59 [PATCH] drm/radeon: Add support for userspace fence waits Simon Farnsworth
2012-01-31 17:56 ` Michel Dänzer
2012-01-31 18:56   ` Jerome Glisse
2012-01-31 21:08     ` Marek Olšák
2012-02-01  8:39       ` Michel Dänzer [this message]
2012-02-01 13:58         ` Marek Olšák
2012-01-31 18:55 ` David Airlie
2012-01-31 19:07   ` Jerome Glisse
2012-01-31 19:13     ` Alex Deucher
2012-01-31 19:36       ` Jerome Glisse
2012-01-31 23:07         ` Christian König
2012-02-01 11:31     ` Simon Farnsworth
2012-02-01 18:21       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2012-01-31 13:16 r600g: Trying to remove the busywait for fence completion, but hitting inexplicable behaviour Simon Farnsworth
2012-01-31 13:18 ` [PATCH] drm/radeon: Add support for userspace fence waits Simon Farnsworth
2012-01-31 14:49   ` Simon Farnsworth

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=1328085546.6727.156.camel@thor.local \
    --to=michel@daenzer.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maraeo@gmail.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 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.