Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-14 Thread Jason Wang
On 2019/3/15 上午3:33, Andrea Arcangeli wrote: Hello Jason, On Thu, Mar 14, 2019 at 09:49:03PM +0800, Jason Wang wrote: Yes since we don't want to slow down 32bit. If you've a lot of ram there's no justification to stick to a 32bit kernel, so I don't think there's need to maintain a separate mo

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-14 Thread Andrea Arcangeli
Hello Jason, On Thu, Mar 14, 2019 at 09:49:03PM +0800, Jason Wang wrote: > Yes since we don't want to slow down 32bit. If you've a lot of ram there's no justification to stick to a 32bit kernel, so I don't think there's need to maintain a separate model just for 32bit. I really wouldn't care abou

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-14 Thread Jason Wang
On 2019/3/14 下午6:42, Michael S. Tsirkin wrote: Which means after we fix vhost to add the flush_dcache_page after kunmap, Parisc will get a double hit (but it also means Parisc was the only one of those archs needed explicit cache flushes, where vhost worked correctly so far.. so it kinds of proo

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-14 Thread Michael S. Tsirkin
On Wed, Mar 13, 2019 at 09:37:08AM -0700, James Bottomley wrote: > On Wed, 2019-03-13 at 09:05 -0700, Christoph Hellwig wrote: > > On Tue, Mar 12, 2019 at 01:53:37PM -0700, James Bottomley wrote: > > > I've got to say: optimize what? What code do we ever have in the > > > kernel that kmap's a page

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-13 Thread Christoph Hellwig
On Tue, Mar 12, 2019 at 01:53:37PM -0700, James Bottomley wrote: > I've got to say: optimize what? What code do we ever have in the > kernel that kmap's a page and then doesn't do anything with it? You can > guarantee that on kunmap the page is either referenced (needs > invalidating) or updated (

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Andrea Arcangeli
On Tue, Mar 12, 2019 at 03:02:54PM -0700, James Bottomley wrote: > I'm sure there must be workarounds elsewhere in the other arch code > otherwise things like this, which appear all over drivers/, wouldn't > work: > > drivers/scsi/isci/request.c:1430 > > kaddr = kmap_atomic(page); > m

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Andrea Arcangeli
On Tue, Mar 12, 2019 at 02:19:15PM -0700, James Bottomley wrote: > I mean in the sequence > > flush_dcache_page(page); > flush_dcache_page(page); > > The first flush_dcache_page did all the work and the second it a > tightly pipelined no-op. That's what I mean by there not really being > a doubl

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Andrea Arcangeli
On Tue, Mar 12, 2019 at 01:53:37PM -0700, James Bottomley wrote: > I've got to say: optimize what? What code do we ever have in the > kernel that kmap's a page and then doesn't do anything with it? You can > guarantee that on kunmap the page is either referenced (needs > invalidating) or updated (

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Andrea Arcangeli
On Tue, Mar 12, 2019 at 08:46:50AM -0700, James Bottomley wrote: > On Tue, 2019-03-12 at 07:54 -0400, Michael S. Tsirkin wrote: > > On Tue, Mar 12, 2019 at 03:17:00PM +0800, Jason Wang wrote: > > > > > > On 2019/3/12 上午11:52, Michael S. Tsirkin wrote: > > > > On Tue, Mar 12, 2019 at 10:59:09AM

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Michael S. Tsirkin
On Tue, Mar 12, 2019 at 03:17:00PM +0800, Jason Wang wrote: > > On 2019/3/12 上午11:52, Michael S. Tsirkin wrote: > > On Tue, Mar 12, 2019 at 10:59:09AM +0800, Jason Wang wrote: > > > On 2019/3/12 上午2:14, David Miller wrote: > > > > From: "Michael S. Tsirkin" > > > > Date: Mon, 11 Mar 2019 09:59:28

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Jason Wang
On 2019/3/12 下午3:51, Jason Wang wrote: On 2019/3/12 下午1:14, James Bottomley wrote: On Tue, 2019-03-12 at 10:59 +0800, Jason Wang wrote: On 2019/3/12 上午2:14, David Miller wrote: From: "Michael S. Tsirkin" Date: Mon, 11 Mar 2019 09:59:28 -0400 On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Jason Wang
On 2019/3/12 下午1:14, James Bottomley wrote: On Tue, 2019-03-12 at 10:59 +0800, Jason Wang wrote: On 2019/3/12 上午2:14, David Miller wrote: From: "Michael S. Tsirkin" Date: Mon, 11 Mar 2019 09:59:28 -0400 On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason Wang wrote: On 2019/3/8 下午10:12, Christ

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-12 Thread Jason Wang
On 2019/3/12 上午11:52, Michael S. Tsirkin wrote: On Tue, Mar 12, 2019 at 10:59:09AM +0800, Jason Wang wrote: On 2019/3/12 上午2:14, David Miller wrote: From: "Michael S. Tsirkin" Date: Mon, 11 Mar 2019 09:59:28 -0400 On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason Wang wrote: On 2019/3/8 下午10

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-11 Thread Michael S. Tsirkin
On Tue, Mar 12, 2019 at 10:59:09AM +0800, Jason Wang wrote: > > On 2019/3/12 上午2:14, David Miller wrote: > > From: "Michael S. Tsirkin" > > Date: Mon, 11 Mar 2019 09:59:28 -0400 > > > > > On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason Wang wrote: > > > > On 2019/3/8 下午10:12, Christoph Hellwig w

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-11 Thread Jason Wang
On 2019/3/12 上午2:14, David Miller wrote: From: "Michael S. Tsirkin" Date: Mon, 11 Mar 2019 09:59:28 -0400 On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason Wang wrote: On 2019/3/8 下午10:12, Christoph Hellwig wrote: On Wed, Mar 06, 2019 at 02:18:07AM -0500, Jason Wang wrote: This series tries

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-11 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 11 Mar 2019 09:59:28 -0400 > On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason Wang wrote: >> >> On 2019/3/8 下午10:12, Christoph Hellwig wrote: >> > On Wed, Mar 06, 2019 at 02:18:07AM -0500, Jason Wang wrote: >> > > This series tries to access virtqueue metadat

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-11 Thread Michael S. Tsirkin
On Mon, Mar 11, 2019 at 03:13:17PM +0800, Jason Wang wrote: > > On 2019/3/8 下午10:12, Christoph Hellwig wrote: > > On Wed, Mar 06, 2019 at 02:18:07AM -0500, Jason Wang wrote: > > > This series tries to access virtqueue metadata through kernel virtual > > > address instead of copy_user() friends sin

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-11 Thread Jason Wang
On 2019/3/8 下午10:12, Christoph Hellwig wrote: On Wed, Mar 06, 2019 at 02:18:07AM -0500, Jason Wang wrote: This series tries to access virtqueue metadata through kernel virtual address instead of copy_user() friends since they had too much overheads like checks, spec barriers or even hardware fe

Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-08 Thread Christoph Hellwig
On Wed, Mar 06, 2019 at 02:18:07AM -0500, Jason Wang wrote: > This series tries to access virtqueue metadata through kernel virtual > address instead of copy_user() friends since they had too much > overheads like checks, spec barriers or even hardware feature > toggling. This is done through setup

[RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap()

2019-03-05 Thread Jason Wang
This series tries to access virtqueue metadata through kernel virtual address instead of copy_user() friends since they had too much overheads like checks, spec barriers or even hardware feature toggling. This is done through setup kernel address through vmap() and resigter MMU notifier for invalid