Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 845C4E9A03B for ; Thu, 19 Feb 2026 11:06:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E71BA10E6CB; Thu, 19 Feb 2026 11:06:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="YW5Nmt7b"; dkim-atps=neutral Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id D641010E6CA for ; Thu, 19 Feb 2026 11:06:55 +0000 (UTC) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4fGrDX5DzMz9tq6; Thu, 19 Feb 2026 12:06:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1771499212; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m0y6lwaM96ojr9y2eIzrVxaVIa5M1lK5BEvNKoY0I7U=; b=YW5Nmt7bbDHTf3xXI6BpIeKNzYlnWo8nF8q8qyJDMVIjIg6cr8CKm4OiYOLbmCI7+v/VBP er4OuQbfY2V94PcZmlTl+OwDJFY0QoC6RtzGWdwn8dwwvkoJyf+LzXC2LJ7HHC4ezBAd0+ dc4T9/YnxgzTUXig7z/MSsgmvCtY6T1ESNoWfGso/TTOwhxkrimkS7ximupXs9EbZ9to36 O2nfx/G3DBCVW3esxLoazatmLDGMNyJI81Gfk8lEccky3qglz3oZX1YfIsFwkZZHif4dqi 1KXY5s/ZISsumvZiKlP0qx4EyTEodeQe4fCQOTrC1GQeMaXICvoCA9g8cWcwqg== Message-ID: <91f84eccd59d593822dbb97c995ae9c52ba788d2.camel@mailbox.org> Subject: Opportunistic dma_fence polling From: Philipp Stanner To: Christian =?ISO-8859-1?Q?K=F6nig?= Cc: dri-devel@lists.freedesktop.org, Boris Brezillon , Danilo Krummrich Date: Thu, 19 Feb 2026 12:06:50 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MBO-RS-META: tq7myzmpdhnj4a37w8eonybkrihw3nuk X-MBO-RS-ID: 6bad44f66fffb26d2d7 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: phasta@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Yo Christian, I'd like to discuss the dma_fence fast path optimization (ops.is_signaled) again. As far as I understand by now, the use case is that some drivers will never signal fences; but the consumer of the fence actively polls whether a fence is signaled or not. Right? I have a bunch of questions regarding that: 1. What does the party polling the fence typically look like? I bet it's not userspace, is it? Userspace I'd expect to use poll() on a FD, thus an underlying driver has to check the fence somehow. 2. What if that party checks the fence, determines it is unsignaled? Will it then again try later? 3. If it tries again later anyways, then what is the problem with the fence-issuing driver itself checking every 5, 10 or 50 milliseconds what the counter in the GPU ring buffer is, and then signals all those fences? So it circles around the question why ops.is_signaled is supposedly unavoidable. Regards P.