All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Sheplyakov <asheplyakov@basealt.ru>
To: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	"Vadim V . Vlasov" <vadim.vlasov@elpitech.ru>,
	dri-devel@lists.freedesktop.org,
	Steven Price <steven.price@arm.com>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Subject: Re: [PATCH 2/2] drm/panfrost: adjusted job affinity for dual core group GPUs
Date: Fri, 24 Dec 2021 12:56:43 +0400	[thread overview]
Message-ID: <c94bafaa-3029-fea3-b623-1961b4b5e4cf@basealt.ru> (raw)
In-Reply-To: <YcSDgIwrmHZ/BC2n@maud>

Hi,

On 23.12.2021 18:11, Alyssa Rosenzweig wrote:
>> The kernel driver itself can't guess which jobs need a such a strict
>> affinity, so setting proper requirements is the responsibility of
>> the userspace (Mesa). However the userspace is not smart enough [yet].
>> Therefore this patch applies the above affinity rule to all jobs on
>> dual core group GPUs.
> 
> What does Mesa need to do for this to work "properly"?

I don't know.
The blob restricts affinity of jobs with JD_REQ_COHERENT_GROUP requirement.
In theory jobs without such a requirement can run on any core, but in
practice all jobs in slots 0, 1 are assigned to core group 0 (with workloads
I've run - i.e. weston, firefox, glmark2, perhaps it's also SoC dependent).
So I've forced all jobs in slots 0, 1 to core group 0. Surprisingly this
(and memory attributes adjustment) appeared to be enough to get panfrost
working with T628 (on some SoCs). Without these patches GPU locks up in
a few seconds.

> What are the limitations of the approach implemented here?

Suboptimal performance.

1) There might be job chains which don't care about affinity
   (I haven't seen any of these yet on systems I've got).
2) There might be dual core group GPUs which don't need such a strict affinity.
   (I haven't seen any dual core group T[78]xx GPUs yet. This doesn't mean such
    GPUs don't exist).

> If we need to extend it down the line with a UABI change, what would that look like?

I have no idea. And I'm not sure if it's worth the effort (since most jobs
end up on core group 0 anyway).

Best regards,
   Alexey

  reply	other threads:[~2021-12-25  9:57 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 [this message]
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
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=c94bafaa-3029-fea3-b623-1961b4b5e4cf@basealt.ru \
    --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.