From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B98FA345CBD for ; Fri, 6 Mar 2026 09:37:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772789832; cv=none; b=S11OG7yivzllHVmmMpCC/am7fnK1DeiOpuJYHyjHOryFVV1VcV83BOge2LkeFM8IXZLJR0IuD/ZgRNIGmjguDG+Fb5sw/C/R6WaHrOODxq7z0/6p1NBvdl/dzK4VeWjd4JnkAdlEr9aINzN/LzcX6wvXwULzK8Z4FL30UvqvQLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772789832; c=relaxed/simple; bh=ErBVxacWFptA6p7MhMuRQNf2F5M9trQw0jwWo/Wa8uI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jQnBbin3DlV0YyUoGELdv25ppO6Oc9+ZOw6vg9aa6vd+aFb2uOgpgawjA6YeTUwqPc41tAEtLi/miUIPCVWwJGB5rT19ooGhv6ze1nYXw/2xdajpyU6vXFxBCAet+A/tTDf9Dr6MMhPiBoxqju6ujhltayFlIOQam/LCETaeeSE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=wWz8NWFW; arc=none smtp.client-ip=80.241.56.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="wWz8NWFW" Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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 4fS1Wy6KkBz9tpm; Fri, 6 Mar 2026 10:37:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1772789823; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=ANaPsF4QJeveKptubtd0nStch7cg+Yo3B2BsZZ9z6Kw=; b=wWz8NWFWYrAW5ljpIcDUJ3sRzKLyXtD6CtgaUvTOAyDw9GJofqZ2b+ZXJy3pcbR/hBnF7V fLkk9PBMMIgLyStqFmQ649w0LnyOeIoiU7ZJcjpFzwsasTPScAXB6AxCOrilb4jGOrH5wU tikKaWCQhzb21g6E+MdmrGVhrLxp2qY7Ses+R4jtSu/GAVW8H7iBCvbAHgP6vIaFijOxtR Kf8bXF2QEh14D/UKgM6sLJs5O29DiO6Na1NItpBIrjJAJqN4EnPSB/rpo3Nc6IhzSE8tEV FnUnOYwfEj+4F5F3jsQyiloPIVZ61oyiwtiUBv4MIZjOOmZ7HgW5Dh9A8onbhw== Message-ID: <28ce8bae-bc49-4f51-9f12-ae7bc427c920@mailbox.org> Date: Fri, 6 Mar 2026 10:36:56 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: drm_sched run_job and scheduling latency To: Chia-I Wu , Matthew Brost Cc: Boris Brezillon , ML dri-devel , intel-xe@lists.freedesktop.org, Steven Price , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Danilo Krummrich , Philipp Stanner , =?UTF-8?Q?Christian_K=C3=B6nig?= , =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= , Rodrigo Vivi , open list , tj@kernel.org References: <20260305092711.20069ca1@fedora> <20260305115201.6fb044f0@fedora> From: =?UTF-8?Q?Michel_D=C3=A4nzer?= Content-Language: de-CH-frami, en-CA In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-META: m14gt1oxa4xx91oiqz3rcunncq3ngwxe X-MBO-RS-ID: 787898a7cbfbb7b33de On 3/6/26 06:13, Chia-I Wu wrote: > On Thu, Mar 5, 2026 at 12:52 PM Matthew Brost wrote: >> On Thu, Mar 05, 2026 at 11:52:01AM +0100, Boris Brezillon wrote: >>> On Thu, 5 Mar 2026 02:09:16 -0800 >>> Matthew Brost wrote: >>>> On Thu, Mar 05, 2026 at 09:27:11AM +0100, Boris Brezillon wrote: >>>>> On Wed, 4 Mar 2026 18:04:25 -0800 >>>>> Matthew Brost wrote: >>>>>> On Wed, Mar 04, 2026 at 02:51:39PM -0800, Chia-I Wu wrote: >>>>>>> >>>>>>> Thoughts? Or perhaps this becomes less of an issue if all drm_sched >>>>>>> users have concrete plans for userspace submissions.. >>>>>> >>>>>> Maybe some day.... >>>>> >>>>> I've yet to see a solution where no dma_fence-based signalization is >>>>> involved in graphics workloads though (IIRC, Arm's solution still >>>>> needs the kernel for that). Until that happens, we'll still need the >>>>> kernel to signal fences asynchronously when the job is done, which I >>>>> suspect will cause the same kind of latency issue... >>>>> >>>> >>>> I don't think that is the problem here. Doesn’t the job that draws the >>>> frame actually draw it, or does the display wait on the draw job’s fence >>>> to signal and then do something else? >>> >>> I know close to nothing about SurfaceFlinger and very little about >>> compositors in general, so I'll let Chia answer that one. What's sure >> >> I think Chia input would good, as if SurfaceFlinger jobs have input >> dependencies this entire suggestion doesn't make any sense. >> >>> is that, on regular page-flips (don't remember what async page-flips >>> do), the display drivers wait on the fences attached to the buffer to >>> signal before doing the flip. >> >> I think SurfaceFlinger is different compared to Wayland/X11 use cases, >> as maintaining a steady framerate is the priority above everything else >> (think phone screens, which never freeze, whereas desktops do all the >> time). So I believe SurfaceFlinger decides when it will submit the job >> to draw a frame, without directly passing in application dependencies >> into the buffer/job being drawn. Again, my understanding here may be >> incorrect... > That is correct. SurfaceFlinger only ever latches buffers whose > associated fences have signaled, and sends down the buffers to gpu for > composition or to the display for direct scanout. That might also be > how modern wayland compositors work nowadays? Many (most of the major ones?) do, yes. (Weston being a notable exception AFAIK, though since it supports the Wayland syncobj protocol now, switching to this model should be easy) -- Earthling Michel Dänzer \ GNOME / Xwayland / Mesa developer https://redhat.com \ Libre software enthusiast