diff options
author | Asias He <asias@redhat.com> | 2013-05-07 02:54:36 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-07-11 08:38:40 -0400 |
commit | 22fa90c7fb479694d6affebc049d21f06b714be6 (patch) | |
tree | fd62ad11e27171f38d29470e5935736d835d3a4c /drivers/vhost/vhost.h | |
parent | e7802212ea4bbbd5db99181942a19ab36ca4b914 (diff) |
vhost: Remove custom vhost rcu usage
Now, vq->private_data is always accessed under vq mutex. No need to play
the vhost rcu trick.
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 42298cd23c73..4465ed5f316d 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -103,14 +103,8 @@ struct vhost_virtqueue { | |||
103 | struct iovec iov[UIO_MAXIOV]; | 103 | struct iovec iov[UIO_MAXIOV]; |
104 | struct iovec *indirect; | 104 | struct iovec *indirect; |
105 | struct vring_used_elem *heads; | 105 | struct vring_used_elem *heads; |
106 | /* We use a kind of RCU to access private pointer. | 106 | /* Protected by virtqueue mutex. */ |
107 | * All readers access it from worker, which makes it possible to | 107 | void *private_data; |
108 | * flush the vhost_work instead of synchronize_rcu. Therefore readers do | ||
109 | * not need to call rcu_read_lock/rcu_read_unlock: the beginning of | ||
110 | * vhost_work execution acts instead of rcu_read_lock() and the end of | ||
111 | * vhost_work execution acts instead of rcu_read_unlock(). | ||
112 | * Writers use virtqueue mutex. */ | ||
113 | void __rcu *private_data; | ||
114 | /* Log write descriptors */ | 108 | /* Log write descriptors */ |
115 | void __user *log_base; | 109 | void __user *log_base; |
116 | struct vhost_log *log; | 110 | struct vhost_log *log; |