From: Jerome Glisse Subject: Re: RFC: Radeon multi ring support branch Date: Fri, 18 Nov 2011 11:34:42 -0500 Message-ID: <20111118163442.GD2903@homer.localdomain> References: <4EABF8EC.3020701@vodafone.de> <20111115193212.GB2263@homer.localdomain> <4EC2F378.9090801@vodafone.de> <4EC53551.8070005@vodafone.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-vw0-f49.google.com (mail-vw0-f49.google.com [209.85.212.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 66A4F9E76E for ; Fri, 18 Nov 2011 08:30:37 -0800 (PST) Received: by vbbfn1 with SMTP id fn1so338157vbb.36 for ; Fri, 18 Nov 2011 08:30:36 -0800 (PST) Content-Disposition: inline In-Reply-To: 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: Alex Deucher Cc: Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Nov 18, 2011 at 07:44:19AM -0500, Alex Deucher wrote: > 2011/11/17 Alex Deucher : > > 2011/11/17 Christian K=F6nig : > >> On 16.11.2011 01:24, Jerome Glisse wrote: > >>> > >>> Well as we don't specify on which value semaphore should wait on, i am > >>> prety sure the first ring to increment the semaphore will unblock all > >>> waiter. So if you have ring1 that want to wait on ring2 and ring3 as = soon as > >>> ring2 or ring3 is done ring1 will go one while either ring2 or ring3 = might > >>> not be done. I will test that tomorrow but from doc i have it seems s= o. Thus > >>> it will be broken with more than one ring, that would mean you have to > >>> allocate one semaphore for each ring couple you want to synchronize. = Note > >>> that the usual case will likely be sync btw 2 ring. > >> > >> Good point, but I played with it a bit more today and it is just behav= ing as > >> I thought it would be. A single signal command will just unblock a sin= gle > >> waiter, even if there are multiple waiters currently for this semaphor= e, the > >> only thing you can't tell is which waiter will come first. > >> > >> I should also note that the current algorithm will just emit multiple = wait > >> operations to a single ring, and spread the signal operations to all o= ther > >> rings we are interested in. That isn't very efficient, but should inde= ed > >> work quite fine. > >> > >>> After retesting the first patch =A0drm/radeon: fix debugfs handling i= s NAK > >>> a complete no go. > >>> > >>> Issue is that radeon_debugfs_cleanup is call after rdev is free. This > >>> is why i used a static array. I forgot about that, i should have put a > >>> comment. I guess you built your kernel without debugfs or that you > >>> didn't tested to reload the module. > >> > >> Mhm, I have tested it, seen the crash, and didn't thought that this is= a > >> problem. Don't ask me why I can't understand it myself right now. > >> > >> Anyway, I moved the unregistering of the files into a separate functio= n, > >> which is now called from radeon_device_fini instead of > >> radeon_debugfs_cleanup. That seems to work fine, at least if I haven't > >> missed something else. > >> > >> I also merged your indention fixes and the fix for the never allocated > >> semaphores and pushed the result into my public repository > >> (http://cgit.freedesktop.org/~deathsimple/linux), so please take anoth= er > >> look at it. > > > > I've got a few other patches to enable further functionality in the > > mring patches. > > - per ring fence interrupts > > - add some additional ring fields to better handle different ring types > > > > http://people.freedesktop.org/~agd5f/mrings/ > > > = > FYI, I updated these later last night. > = > Alex > = Ok so reviewed the patch serie, please Christian keep v2, v3, ... informations, i find this usefull. I put updated patch at http://people.freedesktop.org/~glisse/mrings/ Couple of fixes there, indentation, and also i changed the testing parameter to be a bit flag which make our life easier when we want to only test the semaphore stuff and not the bo move. Cheers, Jerome