From: Jerome Glisse Subject: Re: [PATCH] drm/radeon: Add support for userspace fence waits Date: Tue, 31 Jan 2012 13:56:21 -0500 Message-ID: <20120131185621.GA8135@homer.localdomain> References: <1328029169-12729-1-git-send-email-simon.farnsworth@onelan.co.uk> <1328032561.6727.122.camel@thor.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id CAB11A08C1 for ; Tue, 31 Jan 2012 10:56:29 -0800 (PST) Received: by yenm4 with SMTP id m4so221270yen.36 for ; Tue, 31 Jan 2012 10:56:29 -0800 (PST) Content-Disposition: inline In-Reply-To: <1328032561.6727.122.camel@thor.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Tue, Jan 31, 2012 at 06:56:01PM +0100, Michel D=E4nzer wrote: > On Die, 2012-01-31 at 16:59 +0000, Simon Farnsworth wrote: = > > Userspace currently busywaits for fences to complete; on my workload, t= his > > 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 > > --- > > I've been working on top of Jerome's tiling patches, so this doesn't ap= ply > > directly on top of current upstream kernels. I can easily rebase to ano= ther > > 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. Cheers, Jerome