From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWsxp-0008Tr-4c for qemu-devel@nongnu.org; Mon, 18 Jan 2010 09:52:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWsxk-0008Sn-Bh for qemu-devel@nongnu.org; Mon, 18 Jan 2010 09:52:20 -0500 Received: from [199.232.76.173] (port=60833 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWsxk-0008Sb-3y for qemu-devel@nongnu.org; Mon, 18 Jan 2010 09:52:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54263) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWsxj-00012A-Ko for qemu-devel@nongnu.org; Mon, 18 Jan 2010 09:52:15 -0500 Message-ID: <4B54759A.1030208@redhat.com> Date: Mon, 18 Jan 2010 16:52:10 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers References: <20100104194904.GB21299@redhat.com> <4B545C03.40807@redhat.com> <20100118135234.GC8317@redhat.com> <4B54691B.7090601@redhat.com> <20100118144456.GD8317@redhat.com> In-Reply-To: <20100118144456.GD8317@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: gleb@redhat.com, qemu-devel@nongnu.org On 01/18/2010 04:44 PM, Michael S. Tsirkin wrote: > > >>> The point is that clients can be registered at any point. >>> >>> A client that registered when memory is present needs to >>> be notified about it. >>> >>> >> It looks very expensive. >> > Shouldn't be hard to optimize ... > It's O(memory size), which can be very big. >> Maybe we mandate clients be registered at init-time? >> > > This might be tricky - vhost currently only registers when the > first device is hot-added. > I see. Maybe coalesce adjacent pages and call the callback with the ranges? -- error compiling committee.c: too many arguments to function