Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2019-01-02 Thread Jason Wang
On 2018/12/31 上午2:30, Michael S. Tsirkin wrote: On Thu, Dec 27, 2018 at 05:39:21PM +0800, Jason Wang wrote: On 2018/12/26 下午11:02, Michael S. Tsirkin wrote: On Wed, Dec 26, 2018 at 11:57:32AM +0800, Jason Wang wrote: On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-30 Thread Michael S. Tsirkin
On Thu, Dec 27, 2018 at 05:39:21PM +0800, Jason Wang wrote: > > On 2018/12/26 下午11:02, Michael S. Tsirkin wrote: > > On Wed, Dec 26, 2018 at 11:57:32AM +0800, Jason Wang wrote: > > > On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: > > > > On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-27 Thread Jason Wang
On 2018/12/26 下午11:02, Michael S. Tsirkin wrote: On Wed, Dec 26, 2018 at 11:57:32AM +0800, Jason Wang wrote: On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-26 Thread Michael S. Tsirkin
On Wed, Dec 26, 2018 at 11:57:32AM +0800, Jason Wang wrote: > > On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: > > On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: > > > On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: > > > > On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Jason Wang
On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: > > On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: > > > On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Jason Wang
On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-24 Thread Michael S. Tsirkin
On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: > > On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: > > > On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: > > > > On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-23 Thread Jason Wang
On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote: It was noticed that the copy_user() friends that was used to access virtque

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-15 Thread David Miller
From: Jason Wang Date: Fri, 14 Dec 2018 11:57:35 +0800 > This is the price of all GUP users not only vhost itself. What's more > important, the goal is not to be left too much behind for other > backends like DPDK or AF_XDP (all of which are using GUP). +1

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-14 Thread kbuild test robot
Hi Jason, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jason-Wang/vhost-accelerate-metadata-access-through-vmap/20181214-200417 config: mips-malta_kvm_defconfig (attached as .config) compiler: mipsel-lin

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-14 Thread Michael S. Tsirkin
On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: > > On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: > > On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote: > > > It was noticed that the copy_user() friends that was used to access > > > virtqueue metdata tends to be very expens

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-13 Thread Jason Wang
On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote: 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 softwa

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-13 Thread Michael S. Tsirkin
On Thu, Dec 13, 2018 at 04:18:40PM -0500, Konrad Rzeszutek Wilk wrote: > .giant snip.. > > > + npinned = get_user_pages_fast(uaddr, npages, write, pages); > > > + if (npinned != npages) > > > + goto err; > > > + > > > > As I said I have doubts about the whole approach, but this > > impleme

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-13 Thread Konrad Rzeszutek Wilk
.giant snip.. > > + npinned = get_user_pages_fast(uaddr, npages, write, pages); > > + if (npinned != npages) > > + goto err; > > + > > As I said I have doubts about the whole approach, but this > implementation in particular isn't a good idea > as it keeps the page around forever. >

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-13 Thread Michael S. Tsirkin
On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote: > 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 check, > speculation barrier, hardware featur

[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-13 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 check, speculation barrier, hardware feature toggling (e.g SMAP). The extra cost will be more obvious when tran