mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: "Xianzhong Li" <xianzhong.li@nxp.com>,
	"Steven Price" <steven.price@arm.com>,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Akash Goel" <akash.goel@arm.com>,
	"Karunika Choo" <karunika.choo@arm.com>,
	"Lukas Zapolskas" <lukas.zapolskas@arm.com>,
	"Chris Diamand" <chris.diamand@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Philipp Stanner" <phasta@kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>
Subject: Re: [PATCH v4 1/3] drm/sched: Eliminate NOP dependencies at insertion time
Date: Thu, 3 Dec 2026 14:05:24 +0100	[thread overview]
Message-ID: <20261203140524.64fbd216@fedora1.home> (raw)
In-Reply-To: <4dc56c38-5038-443e-bbdb-c39475bf41cf@ursulin.net>

On Thu, 3 Dec 2026 12:14:44 +0000
Tvrtko Ursulin <tursulin@ursulin.net> wrote:

> On 03/12/2026 12:05, Boris Brezillon wrote:
> > On Thu, 3 Dec 2026 10:38:54 +0000
> > Xianzhong Li <xianzhong.li@nxp.com> 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.

  reply	other threads:[~2026-12-03 13:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 11:34 [PATCH v4 0/3] drm/panthor: Improve job pipelining Boris Brezillon
2026-12-02 11:34 ` [PATCH v4 1/3] drm/sched: Eliminate NOP dependencies at insertion time Boris Brezillon
2026-12-02 11:44   ` Philipp Stanner
2026-12-02 12:20     ` Boris Brezillon
2026-12-03  2:05       ` Xianzhong Li
2026-12-02 12:37   ` Philipp Stanner
2026-12-02 13:36     ` Boris Brezillon
2026-12-02 16:52   ` Tvrtko Ursulin
2026-12-03  9:38     ` Boris Brezillon
2026-12-03 10:17       ` Boris Brezillon
2026-12-03 10:38         ` Xianzhong Li
2026-12-03 12:05           ` Boris Brezillon
2026-12-03 12:14             ` Tvrtko Ursulin
2026-12-03 13:05               ` Boris Brezillon [this message]
2026-12-02 11:34 ` [PATCH v4 2/3] drm/sched: Add a drm_sched_job_add_dependency_unwrapped() helper Boris Brezillon
2026-12-02 12:21   ` Boris Brezillon
2026-12-02 12:53   ` Philipp Stanner
2026-12-02 13:47     ` Boris Brezillon
2026-12-02 11:34 ` [PATCH v4 3/3] drm/panthor: Explode container fences to optimize pipelining Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203140524.64fbd216@fedora1.home \
    --to=boris.brezillon@collabora.com \
    --cc=airlied@gmail.com \
    --cc=akash.goel@arm.com \
    --cc=chris.diamand@arm.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karunika.choo@arm.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lukas.zapolskas@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=phasta@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    --cc=xianzhong.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®