From: Christophe Fergeau <cfergeau@redhat.com>
To: Frediano Ziglio <fziglio@redhat.com>
Cc: spice-devel@lists.freedesktop.org,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, Dave Airlie <airlied@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [Spice-devel] [PATCH] Do not loop on ERESTARTSYS using interruptible waits
Date: Tue, 26 May 2015 10:20:30 +0200 [thread overview]
Message-ID: <20150526082030.GF4920@edamame.cdg.redhat.com> (raw)
In-Reply-To: <1702166382.3247503.1432303090162.JavaMail.zimbra@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]
Hey,
On Fri, May 22, 2015 at 09:58:10AM -0400, Frediano Ziglio wrote:
> > > }
> > >
> > > int qxl_io_update_area(struct qxl_device *qdev, struct qxl_bo *surf,
> > > - const struct qxl_rect *area)
> > > + const struct qxl_rect *area, bool intr)
> > > {
> > > int surface_id;
> > > uint32_t surface_width, surface_height;
> > > @@ -350,7 +347,7 @@ int qxl_io_update_area(struct qxl_device *qdev, struct
> > > qxl_bo *surf,
> > > mutex_lock(&qdev->update_area_mutex);
> > > qdev->ram_header->update_area = *area;
> > > qdev->ram_header->update_surface = surface_id;
> > > - ret = wait_for_io_cmd_user(qdev, 0, QXL_IO_UPDATE_AREA_ASYNC, true);
> > > + ret = wait_for_io_cmd_user(qdev, 0, QXL_IO_UPDATE_AREA_ASYNC, intr);
> > > mutex_unlock(&qdev->update_area_mutex);
> > > return ret;
> > > }
> > > @@ -588,10 +585,7 @@ int qxl_update_surface(struct qxl_device *qdev, struct
> > > qxl_bo *surf)
> > > rect.right = surf->surf.width;
> > > rect.top = 0;
> > > rect.bottom = surf->surf.height;
> > > -retry:
> > > - ret = qxl_io_update_area(qdev, surf, &rect);
> > > - if (ret == -ERESTARTSYS)
> > > - goto retry;
> > > + ret = qxl_io_update_area(qdev, surf, &rect, false);
> >
> > My understanding is that the fix is this hunk? If so, this could be made
> > more obvious with an intermediate commit adding the 'bool intr' arg to
> > qxl_io_update_area and only calling it with 'true' in the appropriate
> > places.
> > This code path is only triggered from qxl_surface_evict() which I assume
> > is not necessarily easily interruptible, so this change makes sense to
> > me. However it would be much better to get a review from Dave Airlie ;)
> >
> > Christophe
> >
>
> Are you asking if just removing the loop would fix the issue?
> So you are proposing a first patch that add the argument always
> passing true and another that change some calls to false? It make
> sense but still the loop should be removed.
Sorry, I was not clear, removing the loop is fine, I was not suggesting
to keep it.
Christophe
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-05-26 8:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1591625424.1112688.1432028990916.JavaMail.zimbra@redhat.com>
2015-05-19 9:54 ` Frediano Ziglio
2015-05-22 11:58 ` [Spice-devel] " Christophe Fergeau
2015-05-22 13:58 ` Frediano Ziglio
2015-05-26 8:20 ` Christophe Fergeau [this message]
2015-05-28 3:38 ` Dave Airlie
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=20150526082030.GF4920@edamame.cdg.redhat.com \
--to=cfergeau@redhat.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fziglio@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spice-devel@lists.freedesktop.org \
/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
Powered by JetHome