From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>
Cc: Oded Gabbay <ogabbay@kernel.org>,
Krystian Pradzynski <krystian.pradzynski@linux.intel.com>,
dri-devel@lists.freedesktop.org,
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Subject: Re: [PATCH 2/2] accel/ivpu: Do not use mutex_lock_interruptible
Date: Thu, 8 Jun 2023 08:43:15 +0200 [thread overview]
Message-ID: <20230608064315.GI324119@linux.intel.com> (raw)
In-Reply-To: <b8f3b911-a883-272c-b2ac-d57e10318f75@quicinc.com>
On Tue, Jun 06, 2023 at 08:50:52AM -0600, Jeffrey Hugo wrote:
> On 6/6/2023 7:44 AM, Stanislaw Gruszka wrote:
> > Hi
> >
> > On Fri, Jun 02, 2023 at 11:30:31AM -0600, Jeffrey Hugo wrote:
> > > On 5/25/2023 4:38 AM, Stanislaw Gruszka wrote:
> > > > If we get signal when waiting for the mmu->lock we do not invalidate
> > > > current MMU configuration what might result on undefined behavior.
> > >
> > > "that might result in"
> > >
> > > > Additionally there is little or no benefit on break waiting for
> > > > ipc->lock. In current code base, we keep this lock for short periods.
> > >
> > > What about error cases? Nothing where say the hardware can be unresponsive
> > > and a process from userspace is blocked? Without interruptible(), ctrl+c
> > > will have no effect.
> >
> > I believe we do not have any infinite loops while holding the mutexe's,
> > all loops will end with timeout on unresponsive hardware and sooner or
> > later SIGINT will be delivered. This time can take quite long on simulated
> > environment, but in such case we can just break the simulation.
>
> Ok, then I'm not missing anything. It does look like all the hardware
> interactions have short timeouts. Feels odd to me to avoid interruptible()
> in user context, but I don't see anything that is wrong based on the code
> today.
In this context it should not matter much, because we hold locks for
short periods But we have also wait_event_interruptible_timeout(),
which I want to get rid of as well, because we can free and reuse
memory that could still be used by FW, if we break that wait_event.
And solving this differently will require much complication, which I
don't really want goto into. I will need to think about that ...
Anyways thanks for the insights, appreciated.
Regards
Stanislaw
next prev parent reply other threads:[~2023-06-08 6:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 10:38 [PATCH 1/2] accel/ivpu: Do not trigger extra VPU reset if the VPU is idle Stanislaw Gruszka
2023-05-25 10:38 ` [PATCH 2/2] accel/ivpu: Do not use mutex_lock_interruptible Stanislaw Gruszka
2023-06-02 17:30 ` Jeffrey Hugo
2023-06-06 13:44 ` Stanislaw Gruszka
2023-06-06 14:50 ` Jeffrey Hugo
2023-06-08 6:43 ` Stanislaw Gruszka [this message]
2023-06-08 6:21 ` Stanislaw Gruszka
2023-06-02 17:23 ` [PATCH 1/2] accel/ivpu: Do not trigger extra VPU reset if the VPU is idle Jeffrey Hugo
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=20230608064315.GI324119@linux.intel.com \
--to=stanislaw.gruszka@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=krystian.pradzynski@linux.intel.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.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