From: Steven Price <steven.price@arm.com>
To: Boris Brezillon <boris.brezillon@collabora.com>,
Rob Herring <robh+dt@kernel.org>,
Tomeu Vizoso <tomeu@tomeuvizoso.net>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
Robin Murphy <robin.murphy@arm.com>
Cc: Icecream95 <ixn@keemail.me>,
stable@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv
Date: Wed, 5 Feb 2020 13:39:21 +0000 [thread overview]
Message-ID: <b798bc8f-e8a9-01e9-e234-a8fdef290259@arm.com> (raw)
In-Reply-To: <20200204143504.135388-1-boris.brezillon@collabora.com>
On 04/02/2020 14:35, Boris Brezillon wrote:
> Jobs can be in-flight when the file descriptor is closed (either because
> the process did not terminate properly, or because it didn't wait for
> all GPU jobs to be finished), and apparently panfrost_job_close() does
> not cancel already running jobs. Let's refcount the MMU context object
> so it's lifetime is no longer bound to the FD lifetime and running jobs
> can finish properly without generating spurious page faults.
Is there any good reason not to just make panfrost_job_close() kill off
any running jobs? I'm not sure what the benefit is of allowing the jobs
to still run after the file descriptor has closed.
In particular this could cause problems when(/if) Panfrost starts trying
to deal with "compute" work loads that might have long runtimes. It's
quite possible to produce a job which never (naturally) exits, currently
we have a simplistic timeout which kills anything which doesn't complete
promptly. However there is nothing conceptually wrong with a job which
takes seconds (or even minutes) to complete. The hardware has support
for task switching ('soft stopping') between jobs so this can be done to
prevent blocking other applications.
If panfrost_job_close() doesn't kill the jobs then removing the timeouts
could lead to the situation where there is an 'infinite' job with no
owner and no way of killing it off. Which doesn't seem like a great
feature ;)
Another approach could be simply to silence the page fault output in
this case - switching the address space to UNMAPPED is actually an
effective way of killing jobs - at some point I think this was a
workaround to a hardware bug, but IIRC that was unreleased hardware :)
Steve
next prev parent reply other threads:[~2020-02-05 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 14:35 [PATCH 1/2] drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv Boris Brezillon
2020-02-04 14:47 ` Boris Brezillon
2020-02-05 13:39 ` Steven Price [this message]
2020-02-05 14:01 ` Boris Brezillon
2020-02-05 14:08 ` Steven Price
2020-02-05 15:45 ` Robin Murphy
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=b798bc8f-e8a9-01e9-e234-a8fdef290259@arm.com \
--to=steven.price@arm.com \
--cc=alyssa.rosenzweig@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ixn@keemail.me \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
--cc=tomeu@tomeuvizoso.net \
/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