From: Gerd Hoffmann <kraxel@redhat.com>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: virtio-gpu vq code isn't thread safe
Date: Tue, 16 Jun 2015 09:12:23 +0200 [thread overview]
Message-ID: <1434438743.15692.3.camel@redhat.com> (raw)
In-Reply-To: <CAPM=9tw_9ByAdFLzRfsHNfDFzyxUiHrAzRTEMCbwP-YyBx9OoA@mail.gmail.com>
On Di, 2015-06-16 at 14:55 +1000, Dave Airlie wrote:
> Hey Gerd,
>
> This probably doesn't matter yet, but they virtgpu_vq buffer
> allocation code you added isn't threadsafe.
Right, I'll add a lock (or do you have a patch already?)
> I'm not sure what was wrong with the original code I wrote, you never
> contacted me with reasons for rewriting it, but the Linux kmalloc
> isn't that slow, but if we want some form of cached allocator you
> probably should just use kmem_cache_create instead of what you have
> there.
That came up during patch review. Problem isn't kmalloc performance,
kmalloc (ENOMEM) but error handling. When we allocate stuff in advance
a bunch of nasty error paths simply can't happen.
cheers,
Gerd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-06-16 7:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 4:55 virtio-gpu vq code isn't thread safe Dave Airlie
2015-06-16 7:12 ` Gerd Hoffmann [this message]
2015-06-16 7:29 ` 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=1434438743.15692.3.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=mst@redhat.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 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.