From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932534AbcEWOFY (ORCPT ); Mon, 23 May 2016 10:05:24 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33027 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932440AbcEWOFX (ORCPT ); Mon, 23 May 2016 10:05:23 -0400 Date: Mon, 23 May 2016 16:05:22 +0200 From: Daniel Vetter To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gustavo@padovan.org, chris@chris-wilson.co.uk Subject: Re: [PATCH 3/3] dma-buf/fence: add signal_on_any to the fence array Message-ID: <20160523140522.GD27098@phenom.ffwll.local> Mail-Followup-To: Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gustavo@padovan.org, chris@chris-wilson.co.uk References: <1464002722-4989-1-git-send-email-deathsimple@vodafone.de> <1464002722-4989-3-git-send-email-deathsimple@vodafone.de> <20160523135049.GA27098@phenom.ffwll.local> <57430C91.9060106@vodafone.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <57430C91.9060106@vodafone.de> X-Operating-System: Linux phenom 4.6.0-rc5+ User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 23, 2016 at 03:58:41PM +0200, Christian König wrote: > Am 23.05.2016 um 15:50 schrieb Daniel Vetter: > >On Mon, May 23, 2016 at 01:25:22PM +0200, Christian König wrote: > >>From: Christian König > >> > >>If @signal_on_any is true the fence array signals if any fence in the array > >>signals, otherwise it signals when all fences in the array signal. > >What do you need this for? Sounds neat, but I can't come up with a use > >case. And that use case imo should be both in the commit message and > >kerneldoc. > > Good point, going to fix this when if we really use the patch. Just wanted > to get opinions on this. For getting opinions on this I get a bit the impression we're slightly talking past each another. Having the actual user of these functions handy should help a lot for this discussion. > I'm currently working on making some of the resource management in amdgpu > more friendly to our GPU scheduler. > > Waiting for resources in the GPU scheduler is implemented as waiting for a > fence to fire. So when you want to wait for any resource to become available > (like in our case the VMIDs) you could make good use of something like this. Hm, ok, if you want a fence that fires when any resource becomes available of a given type becomes available that might be useful. But how do you handle the next work item that needs such a resource? Add _all_ previous fences that use it (there's not much ordering with the scheduler) and let them race, and retry if they fail? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch