From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.251.105.195 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796303135; b=fygaUw7sAQVz7XuZBP8qFFwdiTGxFm8jnv5YfYi1kAo/ZRK5jlV0uy91xNu2cLkuxgpP ZHGOn51jXoWEAKmNaFhOPmRcnd7ox/Lnfras+R0gacZVElAQZgo+5atcHZ8Kj4r6EnpiU MVnelrVkntabJUpfh/3VQ1Nelfl/ViIXiFpylnf3tI2pmOcqMsjZFN53UL/UPRJYHoaPY u4haQWFrTOMWPFABAPwJTbtqTb4ofqlFXb+hmLyVY4z/x9+NApBYmwwEP3+dZGS+yPiZD 79IPLvFcE0065+5J4kjqdv0UTSYP4ynWMoQ9k4w+3+Rw1auSz4f4trAMptpdPwXoJ8A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796303135; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:In-Reply-To:References:Organization:X-Mailer:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=CJgfZVjWhSO7j1DjuhbwrY1fZPSNV1Hd5uI4Z6RfLFM=; b=gXeDFbTt+61JQv3ReuTbaLI4AIzjSruU26BlZVUod/JLI/qVyB3qxmUinAfSADY6Mfux tudjN6qvvj1CmQ2pQhz/unM5G3W93c9ikWPy+sJVNHB4JRvypjSXSCm5qwkM558+/VS9t 1WGqX9RXPCBI2rRStg5ASNH75MragUGYOHl4cV5VdWwVjxCge2b525LCoyr/zHJlfSw3V T+kfB6K2gx7r7ZIQMSC8HUF/b7YTAdUArC5rAAgex4zDJt0AO5nMgRKRFCMcFVaicTyX2 zZaV3oG/tsk1FvsexrKyBm33ExMB+61PMtb1lIzBv6jaKKeA+gcQNLi0iWd3jk75rbw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b="HSciJ/TE"; arc=none smtp.remote-ip=148.251.105.195 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6EF0606A336; Thu, 3 Dec 2026 13:05:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D6EF0606A336 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=HSciJ/TE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1796303132; bh=sTA3JMTseGjXiVWZ2Dx0Q8GkdijMK8AC7lGfz/EC8/M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HSciJ/TE5ClFD1Pe+rshyy88TmZ6DClsJNrfgYPWi8FgkaCIpIZyzsjdKhQNWi/vP UV9TQw1UP6+ofQeG9Q+o1dqe9Ae6kIhJeO6GL53yubbPZsOAzVC23kiJe+Nk4ngu+T Oa8KlO3vpAA3ZPtTDCabkQw7vHlNpD4vdTemO6X397dGtVKnbYS7W6wWD2Hl84FwLg S/gBsj+n+KWEexAKsEfU6Mt++Cg4cNKetLqUJrYLgLkVR/h9uN6Fh8Trl7pIXgnZ5u Auzb38V6xOwlBOE49kfvYIi2sOIBnYuf3T8JDiwDFIccLbqRJY2gKe15lUqQRi0mZn o64uzr1sUqoRQ== Received: from fedora1.home (unknown [100.64.0.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id EA1B217E054F; Thu, 03 Dec 2026 14:05:31 +0100 (CET) Date: Thu, 3 Dec 2026 14:05:24 +0100 From: Boris Brezillon To: Tvrtko Ursulin Cc: Xianzhong Li , Steven Price , Liviu Dudau , Akash Goel , Karunika Choo , Lukas Zapolskas , Chris Diamand , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , Philipp Stanner , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" , "linaro-mm-sig@lists.linaro.org" Subject: Re: [PATCH v4 1/3] drm/sched: Eliminate NOP dependencies at insertion time Message-ID: <20261203140524.64fbd216@fedora1.home> In-Reply-To: <4dc56c38-5038-443e-bbdb-c39475bf41cf@ursulin.net> References: <20261202-panhtor-dep-skip-v4-0-f84482d7a49c@collabora.com> <20261202-panhtor-dep-skip-v4-1-f84482d7a49c@collabora.com> <287283e4-261b-4ebb-92a5-14d5d2a2b443@ursulin.net> <20261203103833.0f99048a@fedora1.home> <20261203111718.76144d52@fedora1.home> <20261203130502.3956873e@fedora1.home> <4dc56c38-5038-443e-bbdb-c39475bf41cf@ursulin.net> Organization: Collabora X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 3 Dec 2026 12:14:44 +0000 Tvrtko Ursulin wrote: > On 03/12/2026 12:05, Boris Brezillon wrote: > > On Thu, 3 Dec 2026 10:38:54 +0000 > > Xianzhong Li wrote: > > > >> Hi Boris, > >> > >> I finished patch v4 patch verification with glmark2 on NXP i.MX952(GPU: Mali-G310-V2@1GHz, CPU: 4xA55@1.7GHz), > >> There is 7.33% improvement with patch v4, a little better than patch v1 and v2, see per-scene improvement as below > >> > >> TOTAL: [1591,1596,1593.50] -> [1708,1712,1710.25], +7.33% > >> [build] use-vbo=false: [1512,1544,1528.00] -> [1497,1523,1510.00], -1.18% > >> [build] use-vbo=true: [2797,2818,2807.50] -> [2877,2945,2909.25], +3.62% > >> [texture] nearest: [2813,2835,2824.00] -> [2907,2966,2941.75], +4.17% > >> [texture] linear: [2794,2798,2796.00] -> [2905,2972,2947.00], +5.40% > >> [texture] mipmap: [2848,2860,2854.00] -> [2931,3032,2977.50], +4.33% > >> [shading] gouraud: [2131,2138,2134.50] -> [2416,2431,2423.00], +13.52% > >> [shading] blinn-phong-inf: [1939,1941,1940.00] -> [2209,2211,2210.00], +13.92% > >> [shading] phong: [1497,1502,1499.50] -> [1671,1676,1674.00], +11.64% > >> [shading] cel: [1355,1358,1356.50] -> [1496,1501,1499.50], +10.54% > >> [bump] high-poly: [873,874,873.50] -> [936,938,937.25], +7.30% > >> [bump] normals: [2914,2950,2932.00] -> [3021,3084,3057.25], +4.27% > >> [bump] height: [2773,2843,2808.00] -> [2880,2906,2893.25], +3.04% > >> [effect2d] 3x3: [1115,1116,1115.50] -> [1214,1220,1217.75], +9.17% > >> [effect2d] 5x5: [418,419,418.50] -> [433,434,433.75], +3.64% > >> [pulsar]: [2392,2425,2408.50] -> [2507,2540,2521.00], +4.67% > >> [desktop] blur: [326,326,326.00] -> [423,425,424.00], +30.06% > >> [desktop] shadow: [1067,1073,1070.00] -> [1189,1219,1203.00], +12.43% > >> [buffer] map (non-interleave): [204,208,206.00] -> [205,207,206.00], +0.00% > >> [buffer] subdata (non-interleave): [202,206,204.00] -> [207,208,207.25], +1.59% > >> [buffer] map (interleave): [324,330,327.00] -> [321,323,322.50], -1.38% > >> [ideas]: [577,580,578.50] -> [559,563,560.75], -3.07% > >> [jellyfish]: [760,760,760.00] -> [800,807,804.50], +5.86% > >> [terrain]: [56,57,56.50] -> [58,61,60.25], +6.64% > >> [shadow]: [1169,1175,1172.00] -> [1387,1395,1391.75], +18.75% > >> [refract]: [163,163,163.00] -> [174,177,176.00], +7.98% > >> [conditionals] 0/0: [2678,2702,2690.00] -> [2788,2863,2829.75], +5.20% > >> [conditionals] 5/0: [1934,1934,1934.00] -> [2194,2201,2197.25], +13.61% > >> [conditionals] 0/5: [2679,2705,2692.00] -> [2799,2842,2819.75], +4.75% > >> [function] low: [2384,2387,2385.50] -> [2565,2596,2578.75], +8.10% > >> [function] medium: [1501,1502,1501.50] -> [1669,1677,1674.25], +11.51% > >> [loop] fragment-loop=false: [2351,2355,2353.00] -> [2558,2573,2565.75], +9.04% > >> [loop] fragment-uniform=false: [2354,2359,2356.50] -> [2553,2576,2562.00], +8.72% > >> [loop] fragment-uniform=true: [1562,1562,1562.00] -> [1746,1752,1749.50], +12.00% > >> > > > > After a few more runs on my side, I can say that scenes with relatively > > high scores are just too erratic to be a useful comparison point > > (significant diffs between runs on the same setup). The most > > interesting ones are probably the ones with lower FPS (terrain, refract, > > ...), and on some of those, I can definitely see an improvement > > (terrain, for instance, seems to get a 40+% boost on my rk3588 setup). > > I've also run gfxbench(gl_manhattan), and got a reproducible 6-ish % > > improvement there. So yeah, I confirm the container unwrapping is > > helping some GL workloads, and for those which are not helped, I > > couldn't spot a diff above the usual noise we see between runs. > > I am glad to hear this! Might be the smaller the CPU the bigger the gain. > > Do you know if the above benchamrks see a reduction in number of deps > after unwrapping, or it is about dma-fence-array/chain signalling > overheads? After unwrapping+self-dep elimination, I sometimes end up with no deps. Most of the time the relationship is 1:1, and occasionally 1:2 or 1:3, but I've seen anything above that. I also don't think I've seen reduction at all (like 2 containers being turned into a singular fence), because it's quite rare to be passed more than one container. The perf gain really comes from the advantageous pipelining we get by eliminating entity self-deps. The proof is, if I'm unwrapping but leaving the self-deps in place and forcing a DRM_SCHED_FENCE_DONT_PIPELINE behavior, I end up with the same results I have without unwrapping, which is expected because a container fence is neither an entity self-dep nor a HW-queue/gpu_scheduler self-dep, so it can't be eliminated in drm_sched_entity_add_dependency_cb(). > AFAIR at least the chain is quite bad in this respect, at > least in the pathological case when fences signal one by one with large > enough gaps. I guess it really depends on what's in the timeline syncobj. If all deps come from the same GPU queue, it should nicely map to a single fence at unwrap time. If they come from different queues, you might get more than one, but my understanding is that, as long as fences that are part of the chain signal in a reasonable amount of time, the chain shouldn't grow unexpectedly big, because signalled elements get collected each time a walk happens.