On 02/12/2014 03:38 PM, Qin Chuanyu wrote:
On 2013/8/30 12:29, Jason Wang wrote:
We used to poll vhost queue before making DMA is done, this is racy
if vhost
thread were waked up before marking DMA is done which can result the
signal to
be missed. Fix this by always poll the vhost thread
On Wed, Feb 12, 2014 at 01:57:46PM +0800, Jason Wang wrote:
Currently, even if the packet were truncated by lower socket, we still
report the packet size as the used len which may confuse guest
driver. Fixes this by returning the size of guest receive buffer instead.
Fixes
On Wed, Feb 12, 2014 at 01:43:28PM +0800, Jason Wang wrote:
We should alloc big buffers also when guest can receive UFO
pakcets. Otherwise the big packets will be truncated when mergeable rx
buffer is disabled.
Not truncated, they will be dropped.
Fixes
On Wed, Feb 12, 2014 at 03:38:18PM +0800, Qin Chuanyu wrote:
another question is that vhost_zerocopy_callback is called by kfree_skb,
it may called in different thread context.
vhost_poll_queue is called decided by ubufs-kref.refcount, this may
cause there isn't any thread call
vhost_zerocopy_callback accesses VQ right after
it drops the last ubuf reference.
In theory, this could race with device removal
which waits on the ubuf kref, and crash
on use after free.
Do all accesses within rcu read side critical
section, and all synchronize on release.
Since callbacks are
This fixes a deadlock with vhost reported in the field,
as well as a theoretical race issue found by code
review.
Patches 1+2 are needed for stable.
Thanks to Qin Chuanyu for reporting the issue!
Michael S. Tsirkin (3):
kref: add kref_sub_return
vhost: fix ref cnt checking deadlock
vhost:
vhost checked the counter within the refcnt before decrementing. It
really wanted to know that there aren't too many references, as a way to
batch freeing resources a bit more efficiently.
This works well but it we now access the
ref counter twice so there's a race:
all users might see a high
It is sometimes useful to get the value of the reference count after
decrement.
For example, vhost wants to execute some periodic cleanup operations
once number of references drops below a specific value, before it
reaches zero (for efficiency).
Add an API to do this atomically and efficiently
On 2013/8/30 12:29, Jason Wang wrote:
We used to poll vhost queue before making DMA is done, this is racy if vhost
thread were waked up before marking DMA is done which can result the signal to
be missed. Fix this by always poll the vhost thread before DMA is done.
Signed-off-by: Jason Wang
On Wed, Feb 12, 2014 at 06:38:21PM +0200, Michael S. Tsirkin wrote:
It is sometimes useful to get the value of the reference count after
decrement.
For example, vhost wants to execute some periodic cleanup operations
once number of references drops below a specific value, before it
reaches
On Wed, Feb 12, 2014 at 08:56:30AM -0800, Greg Kroah-Hartman wrote:
On Wed, Feb 12, 2014 at 06:38:21PM +0200, Michael S. Tsirkin wrote:
It is sometimes useful to get the value of the reference count after
decrement.
For example, vhost wants to execute some periodic cleanup operations
once
On Wed, Feb 12, 2014 at 07:35:24PM +0200, Michael S. Tsirkin wrote:
On Wed, Feb 12, 2014 at 08:56:30AM -0800, Greg Kroah-Hartman wrote:
On Wed, Feb 12, 2014 at 06:38:21PM +0200, Michael S. Tsirkin wrote:
It is sometimes useful to get the value of the reference count after
decrement.
Hi
On Wed, Feb 12, 2014 at 9:35 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Wed, Feb 12, 2014 at 08:56:30AM -0800, Greg Kroah-Hartman wrote:
On Wed, Feb 12, 2014 at 06:38:21PM +0200, Michael S. Tsirkin wrote:
It is sometimes useful to get the value of the reference count after
On Wed, 12 February 2014 19:06:37 -0500, David Miller wrote:
It isn't being used to determine when to destroy things.
They use it to as a heuristic of when to trigger polling.
Each ubuf attached gets a kref to the higher level virtio_net buffer
holding object, they want to trigger
On Wed, Feb 12, 2014 at 07:06:37PM -0500, David Miller wrote:
From: Greg Kroah-Hartman gre...@linuxfoundation.org
Date: Wed, 12 Feb 2014 08:56:30 -0800
On Wed, Feb 12, 2014 at 06:38:21PM +0200, Michael S. Tsirkin wrote:
It is sometimes useful to get the value of the reference count after
On 02/12/2014 07:59 PM, Michael S. Tsirkin wrote:
On Wed, Feb 12, 2014 at 01:43:28PM +0800, Jason Wang wrote:
We should alloc big buffers also when guest can receive UFO
pakcets. Otherwise the big packets will be truncated when mergeable rx
buffer is disabled.
Not truncated, they will be
From: Greg KH gre...@linuxfoundation.org
Date: Wed, 12 Feb 2014 17:39:02 -0800
Yes, that's horrible as well, but as was already pointed out in this
thread, you can't rely on that value to really be 1 after reading it
due to the way krefs work, what happened if someone else just grabbed
it?
From: David Miller da...@davemloft.net
Date: Wed, 12 Feb 2014 23:05:06 -0500 (EST)
From: Greg KH gre...@linuxfoundation.org
Date: Wed, 12 Feb 2014 17:39:02 -0800
Yes, that's horrible as well, but as was already pointed out in this
thread, you can't rely on that value to really be 1 after
Michael S. Tsirkin m...@redhat.com writes:
On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote:
Recent changes to drivers/virtio broke compilation for the tests in
tools/virtio. The following patches are build fixes for those changes, as
well
as a fix for a typo that would have
Michael S. Tsirkin m...@redhat.com writes:
On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote:
Recent changes to drivers/virtio broke compilation for the tests in
tools/virtio. The following patches are build fixes for those changes, as
well
as a fix for a typo that would have
On Thu, Feb 13, 2014 at 11:02:13AM +0800, Jason Wang wrote:
On 02/12/2014 07:59 PM, Michael S. Tsirkin wrote:
On Wed, Feb 12, 2014 at 01:43:28PM +0800, Jason Wang wrote:
We should alloc big buffers also when guest can receive UFO
pakcets. Otherwise the big packets will be truncated when
21 matches
Mail list logo