From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752392AbcD1GUk (ORCPT ); Thu, 28 Apr 2016 02:20:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55810 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbcD1GUi (ORCPT ); Thu, 28 Apr 2016 02:20:38 -0400 Subject: Re: [RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree To: "Michael S. Tsirkin" References: <1458873274-13961-1-git-send-email-jasowang@redhat.com> <1458873274-13961-2-git-send-email-jasowang@redhat.com> <20160427142948-mutt-send-email-mst@redhat.com> Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterx@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org From: Jason Wang Message-ID: <5721ABB0.8070509@redhat.com> Date: Thu, 28 Apr 2016 14:20:32 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160427142948-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/27/2016 07:30 PM, Michael S. Tsirkin wrote: > On Fri, Mar 25, 2016 at 10:34:33AM +0800, Jason Wang wrote: >> > Current pre-sorted memory region array has some limitations for future >> > device IOTLB conversion: >> > >> > 1) need extra work for adding and removing a single region, and it's >> > expected to be slow because of sorting or memory re-allocation. >> > 2) need extra work of removing a large range which may intersect >> > several regions with different size. >> > 3) need trick for a replacement policy like LRU >> > >> > To overcome the above shortcomings, this patch convert it to interval >> > tree which can easily address the above issue with almost no extra >> > work. >> > >> > The patch could be used for: >> > >> > - Extend the current API and only let the userspace to send diffs of >> > memory table. >> > - Simplify Device IOTLB implementation. > Does this affect performance at all? > In pktgen test, no difference. Thanks