netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	David Miller <davem@davemloft.net>
Cc: virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap()
Date: Tue, 29 Jan 2019 10:34:46 +0800	[thread overview]
Message-ID: <e6f97f48-0fcb-9bea-1603-c6d93f83b3a8@redhat.com> (raw)
In-Reply-To: <20190126193126-mutt-send-email-mst@kernel.org>


On 2019/1/27 上午8:31, Michael S. Tsirkin wrote:
> On Sat, Jan 26, 2019 at 02:37:08PM -0800, David Miller wrote:
>> From: Jason Wang <jasowang@redhat.com>
>> Date: Wed, 23 Jan 2019 17:55:52 +0800
>>
>>> 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.
>>>
>>> Test shows about 24% improvement on TX PPS. It should benefit other
>>> cases as well.
>> I've read over the discussion of patch #5 a few times.
>>
>> And it seems to me that, at a minimum, a few things still need to
>> be resolved:
>>
>> 1) More perf data added to commit message.


Ok.


>>
>> 2) Whether invalidate_range_start() and invalidate_range_end() must
>>     be paired.


The reason that vhost doesn't need an invalidate_range_end() is because 
we have a fallback to copy_to_user() friends. So there's no requirement 
to setup the mapping in range_end() or lock the vq between range_start() 
and range_end(). We try to delay the setup of vmap until it will be 
really used in vhost_meta_prefetch() and we hold mmap_sem when trying to 
setup vmap, this will guarantee there's no intermediate state at this time.


>
> Add dirty tracking.


I think this could be solved by introducing e.g 
vhost_meta_prefetch_done() at the end of handle_tx()/handle_rx() and 
call set_page_dirty() for used pages instead of the tricks of 
classifying VMA. (As I saw hugetlbfs has its own set dirty method).

Thanks


>
>> Etc.  So I am marking this series "Changes Requested".

      reply	other threads:[~2019-01-29  2:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23  9:55 [PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap() Jason Wang
2019-01-23  9:55 ` [PATCH net-next V4 1/5] vhost: generalize adding used elem Jason Wang
2019-01-23  9:55 ` [PATCH net-next V4 2/5] vhost: fine grain userspace memory accessors Jason Wang
2019-01-23  9:55 ` [PATCH net-next V4 3/5] vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch() Jason Wang
2019-01-23  9:55 ` [PATCH net-next V4 4/5] vhost: introduce helpers to get the size of metadata area Jason Wang
2019-01-23  9:55 ` [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address Jason Wang
2019-01-23 14:08   ` Michael S. Tsirkin
2019-01-24  4:07     ` Jason Wang
2019-01-24  4:11       ` Jason Wang
2019-01-24  4:53         ` Michael S. Tsirkin
2019-01-25  2:33           ` Jason Wang
2019-01-24  4:51       ` Michael S. Tsirkin
2019-01-25  3:00       ` Michael S. Tsirkin
2019-01-25  9:16         ` Jason Wang
2019-01-25  3:03   ` Michael S. Tsirkin
2019-01-25  9:21     ` Jason Wang
2019-01-25  9:24     ` Jason Wang
2019-01-23 13:58 ` [PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap() Michael S. Tsirkin
2019-01-23 17:24   ` David Miller
2019-01-26 22:37 ` David Miller
2019-01-27  0:31   ` Michael S. Tsirkin
2019-01-29  2:34     ` Jason Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6f97f48-0fcb-9bea-1603-c6d93f83b3a8@redhat.com \
    --to=jasowang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).