All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Sheplyakov <asheplyakov@basealt.ru>
To: Steven Price <steven.price@arm.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	"Vadim V . Vlasov" <vadim.vlasov@elpitech.ru>,
	dri-devel@lists.freedesktop.org,
	Alyssa Rosenzweig <alyssa@collabora.com>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Subject: Re: [PATCH 2/2] drm/panfrost: adjusted job affinity for dual core group GPUs
Date: Thu, 13 Jan 2022 14:01:32 +0400	[thread overview]
Message-ID: <Yd/4fIpQqKSRdY/P@asheplyakov-rocket> (raw)
In-Reply-To: <37d797e3-5957-13a6-32b0-6772ace6c540@arm.com>

Hi, Steven!

Thanks for such a detailed explanation of T628 peculiarities.

On Wed, Jan 12, 2022 at 05:03:15PM +0000, Steven Price wrote:
> On 10/01/2022 17:42, Alyssa Rosenzweig wrote:
> >> Whether it's worth the effort depends on whether anyone really cares
> >> about getting the full performance out of this particular GPU.
> >>
> >> At this stage I think the main UABI change would be to add the opposite
> >> flag to kbase, (e.g. "PANFROST_JD_DOESNT_NEED_COHERENCY_ON_GPU"[1]) to
> >> opt-in to allowing the job to run across all cores.
> >>
> >> The second change would be to allow compute jobs to be run on the second
> >> core group, so another flag: PANFROST_RUN_ON_SECOND_CORE_GROUP.
> >>
> >> But clearly there's little point adding such flags until someone steps
> >> up to do the Mesa work.
> > 
> > I worry about the maintainence burden (both Mesa and kernel) of adding
> > UABI only used by a piece of hardware none of us own, and only useful
> > "sometimes" for that hardware. Doubly so for the second core group
> > support; currently Mesa doesn't advertise any compute support on
> > anything older than Mali T760 ... to the best of my knowledge, nobody
> > has missed that support either...
> 
> I agree there's no point adding the UABI support unless someone is
> willing to step and be a maintainer for that hardware. And I suspect no
> one cares enough about that hardware to do that.
> 
> > To be clear I am in favour of merging the patches needed for GLES2 to
> > work on all Malis, possibly at a performance cost on these dual-core
> > systems. That's a far cry from the level of support the DDK gave these
> > chips back in the day ... of course, the DDK doesn't support them at all
> > anymore, so Panfrost wins there by default! ;)
> > 
> 
> Agreed - I'm happy to merge a kernel series similar to this. I think the
> remaining problems are:
> 
> 1. Addressing Robin's concerns about the first patch. That looks like
> it's probably just wrong.

The first patch is wrong and I'll drop it.

> 2. I think this patch is too complex for the basic support. There's some
> parts like checking GROUPS_L2_COHERENT which also don't feature in kbase

That part has been adapted from kbase_gpuprops_construct_coherent_groups, see
https://github.com/hardkernel/linux/blob/2f0f4268209ddacc2cdea158104b87cedacbd0e3/drivers/gpu/arm/midgard/mali_kbase_gpuprops.c#L94

> so I don't believe are correct.

I'm not sure if it's correct or not, however
- it does not change anything for GPUs with coherent L2 caches
- it appears to correctly figure out core groups for several SoCs
  with T628 GPU (BE-M1000, Exynos 5422).

> 3. I don't think this blocks the change. But if we're not using the
> second core group we could actually power it down. Indeed simply not
> turning on the L2/shader cores should in theory work (jobs are not
> scheduled to cores which are turned off even if they are included in the
> affinity).

Powering off unused GPU is would be nice, however

1) the userspace might power on those cores again (via sysfs or something),
   so I prefer to explicitly schedule jobs to the core group 0.

2) on BE-M1000 GPU seems to lock up in a few seconds after powering off
   some (GPU) cores. In fact I had to disable GPU devfreq to prevent GPU
   lockups.

Therefore I consider powering off unused cores as a later optimization. 
(frankly speaking I'd better put the effort to *making use* of those cores
instead of figuring out why they fail to power down properly).

Best regards,
   Alexey

  reply	other threads:[~2022-01-14  8:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 11:06 [PATCH 0/2] drm/panfrost: partial support of T628 GPUs asheplyakov
2021-12-23 11:06 ` [PATCH 1/2] drm/panfrost: mmu: improved memory attributes asheplyakov
2021-12-24 12:56   ` Robin Murphy
2022-01-12 18:18     ` Alexey Sheplyakov
2021-12-23 11:06 ` [PATCH 2/2] drm/panfrost: adjusted job affinity for dual core group GPUs asheplyakov
2021-12-23 14:11   ` Alyssa Rosenzweig
2021-12-24  8:56     ` Alexey Sheplyakov
2022-01-10 14:14       ` Steven Price
2022-01-10 17:42         ` Alyssa Rosenzweig
2022-01-12 17:03           ` Steven Price
2022-01-13 10:01             ` Alexey Sheplyakov [this message]
2022-01-13 11:22               ` Steven Price
2022-01-13 16:06           ` Alexey Sheplyakov
2021-12-23 14:14 ` [PATCH 0/2] drm/panfrost: partial support of T628 GPUs Alyssa Rosenzweig
2022-01-15 16:06 ` [PATCH v2] drm/panfrost: initial dual core group GPUs support Alexey Sheplyakov
2022-01-17  9:42   ` Steven Price

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=Yd/4fIpQqKSRdY/P@asheplyakov-rocket \
    --to=asheplyakov@basealt.ru \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=alyssa@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=steven.price@arm.com \
    --cc=tomeu.vizoso@collabora.com \
    --cc=vadim.vlasov@elpitech.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.