From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ0XO-0007sX-Bb for qemu-devel@nongnu.org; Wed, 04 Feb 2015 09:02:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ0XK-0001D0-Bj for qemu-devel@nongnu.org; Wed, 04 Feb 2015 09:02:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ0XK-0001Cs-4J for qemu-devel@nongnu.org; Wed, 04 Feb 2015 09:02:34 -0500 Message-ID: <54D2266B.5050305@redhat.com> Date: Wed, 04 Feb 2015 15:02:19 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1418796150-3156-1-git-send-email-haifeng.lin@huawei.com> <54CEB6EB.1090202@redhat.com> <20150204135200.GA16345@redhat.com> In-Reply-To: <20150204135200.GA16345@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files to vhost-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: haifeng.lin@huawei.com, jerry.lilijun@huawei.com, n.nikolaev@virtualopensystems.com, qemu-devel@nongnu.org, milo.raofei@huawei.com, arei.gonglei@huawei.com On 04/02/2015 14:52, Michael S. Tsirkin wrote: > I'm not sure: does memory core ever give us two adjacent > RAM segments that we *can* merge? I don't think so. Memory core merges ranges already if the following holds: - same memory region - same dirty logging mode - same readonly behavior (ignore reads, trap reads as MMIO, read/write) - r2 end address is the same as r1 start address - r2's offset in the memory region is equal to r1's plus the size of r1 Paolo > If yes it would trigger, and extra memory slots slow down lookups > linearly so they aren't free.