Re: [RFC PATCH V2 3/3] vhost: access vq metadata through kernel virtual address

2018-12-29 Thread Jason Wang
On 2018/12/29 上午3:34, David Miller wrote: From: Jason Wang Date: Fri, 28 Dec 2018 15:55:37 +0800 +static int vhost_invalidate_vmap(struct vhost_virtqueue *vq, +struct vhost_vmap *map, +unsigned long uaddr, +

Re: [RFC PATCH V2 3/3] vhost: access vq metadata through kernel virtual address

2018-12-28 Thread David Miller
From: Jason Wang Date: Fri, 28 Dec 2018 15:55:37 +0800 > +static int vhost_invalidate_vmap(struct vhost_virtqueue *vq, > + struct vhost_vmap *map, > + unsigned long uaddr, > + unsigned long start, > +

[RFC PATCH V2 3/3] vhost: access vq metadata through kernel virtual address

2018-12-27 Thread Jason Wang
It was noticed that the copy_user() friends that was used to access virtqueue metdata tends to be very expensive for dataplane implementation like vhost since it involves lots of software checks, speculation barrier, hardware feature toggling (e.g SMAP). The extra cost will be more obvious when tra