Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754657Ab1BWNMs (ORCPT ); Wed, 23 Feb 2011 08:12:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50285 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752917Ab1BWNMr (ORCPT ); Wed, 23 Feb 2011 08:12:47 -0500 Message-ID: <4D6507C9.1000906@redhat.com> Date: Wed, 23 Feb 2011 15:12:41 +0200 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7 MIME-Version: 1.0 To: Alex Williamson CC: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, mtosatti@redhat.com, xiaoguangrong@cn.fujitsu.com Subject: Re: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree References: <1298386481.5764.60.camel@x201> <20110222183822.22026.62832.stgit@s20.home> In-Reply-To: <20110222183822.22026.62832.stgit@s20.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1868 Lines: 43 On 02/22/2011 08:54 PM, Alex Williamson wrote: > This series introduces a new weight-balanced binary tree (wbtree) for > general use. It's largely leveraged from the rbtree, copying it's > rotate functions, while introducing different rebalance and erase > functions. This tree is particularly useful for managing memory > ranges, where it's desirable to have the most likely targets (the > largest ranges) at the top of each subtree. > > Patches 2& 3 go on to convert the KVM memory slots to a growable > array and make use of wbtree for efficient managment. Trying to > exercise the worst case for this data structure, I ran netperf > TCP_RR on an emulated rtl8139 NIC connected directly to the host > via a tap. Both qemu-kvm and the netserver on the host were > pinned to optimal CPUs with taskset. This series resulted in > a 3% improvement for this test. > In this case, I think most of the faults (at least after the guest was warmed up) missed the tree completely. In this case a weight balanced tree is hardly optimal (it is optimized for hits), so I think you'll see a bigger gain from the mmio fault optimization. You'll probably see most of the gain running mmu intensive tests with ept=0. > Note that part of why this series is RFC is that the print_tree > function in the last patch is debug code that generates output > for dot. You can copy the output to a file and run: > > dot -Tpdf foo.dot> foo.pdf > > to generate a nice diagram of the tree currently in use. I'll > follow-up with a few examples. Thanks, > > Alex > -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/