From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gustavo Padovan Subject: Re: [PATCH] dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0) Date: Mon, 29 Aug 2016 14:26:16 -0400 Message-ID: <20160829182616.GG23577@joana> References: <20160829070834.22296-11-chris@chris-wilson.co.uk> <20160829181613.30722-1-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160829181613.30722-1-chris@chris-wilson.co.uk> Sender: linux-media-owner@vger.kernel.org To: Chris Wilson Cc: dri-devel@lists.freedesktop.org, Sumit Semwal , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org List-Id: dri-devel@lists.freedesktop.org Hi Chris, 2016-08-29 Chris Wilson : > If we being polled with a timeout of zero, a nonblocking busy query, > we don't need to install any fence callbacks as we will not be waiting. > As we only install the callback once, the overhead comes from the atomic > bit test that also causes serialisation between threads. > > Signed-off-by: Chris Wilson > Cc: Sumit Semwal > Cc: Gustavo Padovan > Cc: linux-media@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: linaro-mm-sig@lists.linaro.org > --- > drivers/dma-buf/sync_file.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Indeed, we can shortcut this. Reviewed-by: Gustavo Padovan Gustavo