From: Jason Wang Subject: Re: [PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap() Date: Tue, 29 Jan 2019 10:34:46 +0800 Message-ID: References: <20190123095557.30168-1-jasowang@redhat.com> <20190126.143708.1203048880266877709.davem@davemloft.net> <20190126193126-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: "Michael S. Tsirkin" , David Miller Return-path: In-Reply-To: <20190126193126-mutt-send-email-mst@kernel.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.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 >> 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".