[{"id":1772084,"web_url":"http://patchwork.ozlabs.org/comment/1772084/","msgid":"<611f7d09-7c5d-20c4-9b9b-1c1f58525fb1@redhat.com>","list_archive_url":null,"date":"2017-09-20T17:15:15","subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","submitter":{"id":2701,"url":"http://patchwork.ozlabs.org/api/people/2701/","name":"Paolo Bonzini","email":"pbonzini@redhat.com"},"content":"On 20/09/2017 13:46, Alexey Kardashevskiy wrote:\n> Address spaces get to keep a root MR (alias or not) but FlatView stores\n> the actual MR as this is going to be used later on to decide whether to\n> share a particular FlatView or not.\n> \n> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n> ---\n> Changes:\n> v4:\n> * s/memory_region_unalias_entire/memory_region_get_flatview_root/\n\nDid you try the idea of checking for single-child regions too?\n\nPaolo","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pbonzini@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xy5xB6V4Vz9t2V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 03:15:58 +1000 (AEST)","from localhost ([::1]:49867 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duibM-0007x9-TB\n\tfor incoming@patchwork.ozlabs.org; Wed, 20 Sep 2017 13:15:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:46993)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1duiam-0007vv-UO\n\tfor qemu-devel@nongnu.org; Wed, 20 Sep 2017 13:15:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1duiak-0000vX-9a\n\tfor qemu-devel@nongnu.org; Wed, 20 Sep 2017 13:15:20 -0400","from mx1.redhat.com ([209.132.183.28]:6973)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pbonzini@redhat.com>) id 1duiak-0000vC-30\n\tfor qemu-devel@nongnu.org; Wed, 20 Sep 2017 13:15:18 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 392596A15;\n\tWed, 20 Sep 2017 17:15:17 +0000 (UTC)","from [10.36.117.211] (ovpn-117-211.ams2.redhat.com [10.36.117.211])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 9D70F60481;\n\tWed, 20 Sep 2017 17:15:16 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 392596A15","To":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org","References":"<20170920114637.42004-1-aik@ozlabs.ru>\n\t<20170920114637.42004-10-aik@ozlabs.ru>","From":"Paolo Bonzini <pbonzini@redhat.com>","Message-ID":"<611f7d09-7c5d-20c4-9b9b-1c1f58525fb1@redhat.com>","Date":"Wed, 20 Sep 2017 19:15:15 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170920114637.42004-10-aik@ozlabs.ru>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tWed, 20 Sep 2017 17:15:17 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1772322,"web_url":"http://patchwork.ozlabs.org/comment/1772322/","msgid":"<e9f654aa-ca37-b4fc-a4b9-e916d62a5847@ozlabs.ru>","list_archive_url":null,"date":"2017-09-21T00:02:28","subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 21/09/17 03:15, Paolo Bonzini wrote:\n> On 20/09/2017 13:46, Alexey Kardashevskiy wrote:\n>> Address spaces get to keep a root MR (alias or not) but FlatView stores\n>> the actual MR as this is going to be used later on to decide whether to\n>> share a particular FlatView or not.\n>>\n>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n>> ---\n>> Changes:\n>> v4:\n>> * s/memory_region_unalias_entire/memory_region_get_flatview_root/\n> \n> Did you try the idea of checking for single-child regions too?\n\nNo, I did not, I do not see how I can actually measure the difference - the\nPCI and virtio root MRs or single child MRs are unique anyway, I can save\nsome time by just checking for 2 @enabled flags instead of rendering a\nFlatView but rendering such cases itself is fast as well. I'll give a try\nthough.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ozlabs-ru.20150623.gappssmtp.com\n\theader.i=@ozlabs-ru.20150623.gappssmtp.com\n\theader.b=\"lUh9laFJ\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyGzx34l8z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 10:03:57 +1000 (AEST)","from localhost ([::1]:51150 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duoyB-0002qI-KY\n\tfor incoming@patchwork.ozlabs.org; Wed, 20 Sep 2017 20:03:55 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:41052)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1duoww-0002PH-PT\n\tfor qemu-devel@nongnu.org; Wed, 20 Sep 2017 20:02:40 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1duowr-0000yf-Nb\n\tfor qemu-devel@nongnu.org; Wed, 20 Sep 2017 20:02:37 -0400","from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:38836)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <aik@ozlabs.ru>) id 1duowr-0000xP-HH\n\tfor qemu-devel@nongnu.org; Wed, 20 Sep 2017 20:02:33 -0400","by mail-pg0-x243.google.com with SMTP id m30so2457414pgn.5\n\tfor <qemu-devel@nongnu.org>; Wed, 20 Sep 2017 17:02:33 -0700 (PDT)","from [192.168.10.22] (124-171-134-202.dyn.iinet.net.au.\n\t[124.171.134.202]) by smtp.googlemail.com with ESMTPSA id\n\tn18sm98852pgd.69.2017.09.20.17.02.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 17:02:31 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ozlabs-ru.20150623.gappssmtp.com; s=20150623;\n\th=subject:to:references:from:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-language:content-transfer-encoding;\n\tbh=j7Ie0se1/pfrlOS9C3pB4vkvxEw1Y4NYi1Dd3FiYk64=;\n\tb=lUh9laFJd3xSPpzOVEn8MBczcWPWP5RIsZElE637CVrALITHoNas/on9tczOCLfenq\n\tvy+HGp26WsW70AwFANZ/gWZCnFbLt1MT9mThtLxKo8/YBhuT5VGZeB9Uyl69ShZxiX11\n\t1Ts68cx7lUGo9X8cXrc79yA/uwfmNMx30tt41JXojywhfhwo5e3/lrmJwJ4WDCKo+v8Q\n\tlHOS3l/1t8ziDueySuqVUy7Y+L9jphlo1wkRWAvhucxaqnnV1u7kw3a6Nh6ouEfk4XrS\n\tTr8GdmcdtIOqN6dhjdIl91vyyDwcBLXkrFvglL1GCKJyK3ppfFL59IGABdCcxR7zs9eF\n\tDTDw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=j7Ie0se1/pfrlOS9C3pB4vkvxEw1Y4NYi1Dd3FiYk64=;\n\tb=q4B8fYSF3CrgdrXaiQ4EokJQc1IpzvV+Q3K7xbeI2voMcMLqGsTcnTtxeuQZrMVK/m\n\tYkbLn7bf9eoDTKiP4Ohh9uQIdwttcUNrXKpkA27vzMaBX9ZZaWnK5TbNU7s0efnyUGei\n\tA/bygbrXxVu6tOOU01gA63lGpxYZlNnSvzqrmeRQSE+AIrqpsIS2pb5R/V/jWXCYhoOW\n\t4yT/V4ajzewfFrwHm96OaybajZhp/8PtLS0RGXJvmpzvlNzhw+93LZOtg025KN04w9Hk\n\tQYkMumiulN1Czy9ElrrzN11urGoBslmm9+AGztcqQbdkIWFV2ORN8gfVLfAiYdP7Q/GZ\n\tu2BQ==","X-Gm-Message-State":"AHPjjUhjNdO3C3yYILlfHeaSkYzhAURDPpVlyL7+uAnb/gh3qB/jWojS\n\tDV0Yh91pMAR8J8Ea2IWgB+AxUTrn","X-Google-Smtp-Source":"AOwi7QDf1qYlW4UObH11GT/UUgw4CtAR80E9raYwAL4S5Dbx+7lZNgFNgzGKe7BEfByQvQdmSPZCUw==","X-Received":"by 10.99.186.15 with SMTP id k15mr3787210pgf.402.1505952152457; \n\tWed, 20 Sep 2017 17:02:32 -0700 (PDT)","To":"Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org","References":"<20170920114637.42004-1-aik@ozlabs.ru>\n\t<20170920114637.42004-10-aik@ozlabs.ru>\n\t<611f7d09-7c5d-20c4-9b9b-1c1f58525fb1@redhat.com>","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<e9f654aa-ca37-b4fc-a4b9-e916d62a5847@ozlabs.ru>","Date":"Thu, 21 Sep 2017 10:02:28 +1000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<611f7d09-7c5d-20c4-9b9b-1c1f58525fb1@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-AU","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c05::243","Subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1772422,"web_url":"http://patchwork.ozlabs.org/comment/1772422/","msgid":"<97ce1385-01c9-1045-2791-494a14a86a78@ozlabs.ru>","list_archive_url":null,"date":"2017-09-21T05:22:33","subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 21/09/17 10:02, Alexey Kardashevskiy wrote:\n> On 21/09/17 03:15, Paolo Bonzini wrote:\n>> On 20/09/2017 13:46, Alexey Kardashevskiy wrote:\n>>> Address spaces get to keep a root MR (alias or not) but FlatView stores\n>>> the actual MR as this is going to be used later on to decide whether to\n>>> share a particular FlatView or not.\n>>>\n>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n>>> ---\n>>> Changes:\n>>> v4:\n>>> * s/memory_region_unalias_entire/memory_region_get_flatview_root/\n>>\n>> Did you try the idea of checking for single-child regions too?\n> \n> No, I did not, I do not see how I can actually measure the difference - the\n> PCI and virtio root MRs or single child MRs are unique anyway, I can save\n> some time by just checking for 2 @enabled flags instead of rendering a\n> FlatView but rendering such cases itself is fast as well. I'll give a try\n> though.\n\nI tried. memory_region_get_flatview_root() returns a last child which still\ncovers the same space as the root; generate_memory_topology() checks for\n@enabled first and only if it is enabled - renders a new FV (this solves\nPCI busmater).\n\nWith 256 CPUs and 256 virtio devices this saves 0.1s (20.4s -> 20.3s) and\n100MB of RAM (14.38G -> 14.28G) :) I'll push it out anyway.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ozlabs-ru.20150623.gappssmtp.com\n\theader.i=@ozlabs-ru.20150623.gappssmtp.com\n\theader.b=\"GcNDmm+P\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyQ5l6070z9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 15:24:24 +1000 (AEST)","from localhost ([::1]:51865 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dutyG-0006dg-R8\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 01:24:20 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:49342)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dutwi-0005ru-J2\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 01:22:45 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dutwe-0007Ea-Kp\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 01:22:44 -0400","from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]:36002)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <aik@ozlabs.ru>) id 1dutwe-0007E9-Bt\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 01:22:40 -0400","by mail-it0-x241.google.com with SMTP id e134so2474816ite.3\n\tfor <qemu-devel@nongnu.org>; Wed, 20 Sep 2017 22:22:39 -0700 (PDT)","from [10.61.2.175] ([122.99.82.10])\n\tby smtp.googlemail.com with ESMTPSA id\n\te34sm307629ioj.23.2017.09.20.22.22.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 22:22:38 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ozlabs-ru.20150623.gappssmtp.com; s=20150623;\n\th=subject:from:to:references:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-language:content-transfer-encoding;\n\tbh=H6fgjsy+k2FdlYWXgCbx7ID9BRpNYKt+vv9MC2o9YCA=;\n\tb=GcNDmm+PoN7oDqVuMhlxwHBQJZH6esfiv6jb0Q4c+jLNMRNQ9UuHYUBYzz3FQmaLUk\n\t22rJuVo1UHME/vMFEiWxgYveSYsb08wD4QZWb/tUucWeRRB1K0KQMaRJF2/NcytnU2vl\n\tC6lDoNf1A42BQMEplmFdOAv0tApDQsvQGrc7JDtTTJSN3SfRWv737YEVtA+5kLi1XTXY\n\t+2/8M57EAiuBk3t7k1woZbpd9nklLSduwlhCScGGnwSqmLSs0287aCSnRX2GVz5mKHrs\n\trCB3H7K/2r3Oa0aEPy+VhTkARkrdXwoMoN6ESt4tMLxrMfM4ZelvmqvLRBnh89ZE4qsc\n\tztZg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:references:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=H6fgjsy+k2FdlYWXgCbx7ID9BRpNYKt+vv9MC2o9YCA=;\n\tb=eavfCnDD9BSynHiawdfll6IpaqWlS0qGnYufTeJLaxQVfHC/R9CGbSvLW4PPcoPJ4J\n\tc/z3dy7jutZEqZ+fyojx488lHaQA1spT7UsVtlDzWGgSVJ2wN2IPmwR2hOWnVVpo9rcv\n\tCgvgzme5Zz1/4LK4B999/6+oGwbTJH21f17RlTZypCGQLMIAuFIt5ztgFyqBHk2ojmXQ\n\tJ85Cq5vxJQTkK+FZTl3U1xreoeEpOTh7BafO14ZgoDFxZp5/hXdxf+3DjpSywxPZd98R\n\tdkGp8EEe7OQezkIUy+xn9lLpc7D9sKDrpTyR9WYeKnKG3vQOJhD4v6dLZIytsoDOe2Zj\n\t8pSA==","X-Gm-Message-State":"AHPjjUiLWBphsg2tvNzSBrDq/lQQwjN0fOYAqSOy0iCv1OIp0mnLkqUR\n\tPTuC35nk8cgwkhDmtVKnorfNVX9d","X-Google-Smtp-Source":"AOwi7QBlGvu7cu8ol8wjP28bgqhmJqsVsQzA/+wDAApUerY1i26MpjWBPkAvto1N78oTLM5re6lh6w==","X-Received":"by 10.36.79.71 with SMTP id c68mr6355948itb.18.1505971359095;\n\tWed, 20 Sep 2017 22:22:39 -0700 (PDT)","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","To":"Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org","References":"<20170920114637.42004-1-aik@ozlabs.ru>\n\t<20170920114637.42004-10-aik@ozlabs.ru>\n\t<611f7d09-7c5d-20c4-9b9b-1c1f58525fb1@redhat.com>\n\t<e9f654aa-ca37-b4fc-a4b9-e916d62a5847@ozlabs.ru>","Message-ID":"<97ce1385-01c9-1045-2791-494a14a86a78@ozlabs.ru>","Date":"Thu, 21 Sep 2017 15:22:33 +1000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<e9f654aa-ca37-b4fc-a4b9-e916d62a5847@ozlabs.ru>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-AU","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c0b::241","Subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1772442,"web_url":"http://patchwork.ozlabs.org/comment/1772442/","msgid":"<3f073ddb-a46a-523d-fb0b-037b3a193d78@ozlabs.ru>","list_archive_url":null,"date":"2017-09-21T06:28:27","subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 21/09/17 15:22, Alexey Kardashevskiy wrote:\n> On 21/09/17 10:02, Alexey Kardashevskiy wrote:\n>> On 21/09/17 03:15, Paolo Bonzini wrote:\n>>> On 20/09/2017 13:46, Alexey Kardashevskiy wrote:\n>>>> Address spaces get to keep a root MR (alias or not) but FlatView stores\n>>>> the actual MR as this is going to be used later on to decide whether to\n>>>> share a particular FlatView or not.\n>>>>\n>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n>>>> ---\n>>>> Changes:\n>>>> v4:\n>>>> * s/memory_region_unalias_entire/memory_region_get_flatview_root/\n>>>\n>>> Did you try the idea of checking for single-child regions too?\n>>\n>> No, I did not, I do not see how I can actually measure the difference - the\n>> PCI and virtio root MRs or single child MRs are unique anyway, I can save\n>> some time by just checking for 2 @enabled flags instead of rendering a\n>> FlatView but rendering such cases itself is fast as well. I'll give a try\n>> though.\n> \n> I tried. memory_region_get_flatview_root() returns a last child which still\n> covers the same space as the root; generate_memory_topology() checks for\n> @enabled first and only if it is enabled - renders a new FV (this solves\n> PCI busmater).\n> \n> With 256 CPUs and 256 virtio devices this saves 0.1s (20.4s -> 20.3s) and\n> 100MB of RAM (14.38G -> 14.28G) :) I'll push it out anyway.\n\n\nHm. Actually using that child as a root for FV in 09/18 increases memory\nuse from 18G to 20G. If I just check the nested MR if it is not enabled,\nthis does not change a thing - time and memory use is the same. Well, it is\nbeyond accuracy of my measurements :)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ozlabs-ru.20150623.gappssmtp.com\n\theader.i=@ozlabs-ru.20150623.gappssmtp.com\n\theader.b=\"2S2B0we/\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyRXC25J8z9t3m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 16:28:58 +1000 (AEST)","from localhost ([::1]:52030 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duuym-0003bN-2A\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 02:28:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:38418)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1duuyT-0003bG-7Q\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 02:28:38 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1duuyP-0005nM-8F\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 02:28:37 -0400","from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]:51475)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <aik@ozlabs.ru>) id 1duuyO-0005nC-Vk\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 02:28:33 -0400","by mail-it0-x22a.google.com with SMTP id o200so5347485itg.0\n\tfor <qemu-devel@nongnu.org>; Wed, 20 Sep 2017 23:28:32 -0700 (PDT)","from [10.61.2.175] ([122.99.82.10])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb102sm566121itd.19.2017.09.20.23.28.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 23:28:31 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ozlabs-ru.20150623.gappssmtp.com; s=20150623;\n\th=subject:from:to:references:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-language:content-transfer-encoding;\n\tbh=L0wxf6qW6DLpD6rCGBueQ5DLAykzsKLhLQIfFMphn3Q=;\n\tb=2S2B0we/dBcVmZYXsEP9BY6ZQr/ko/kqD/GRNSH3BrHAsu9e6mdR/ytriamMoPGnew\n\tknayAi7SNRZKhE8fH2mjouqx2n2gwNih88E0D6kiWDKZkFvvjwLhKYzhuwUOc56CJHqS\n\taw/GCLecuDURX5W+1mJohFfJ2ZjMLI5wQY/SsDQpV4kqVS9iasZg1wYG4E3AvirvQg1u\n\tA3AM4i5ypf+RPGyzQ9pwr1qeO8H9BK5M+Ne7qW1l7F8dXxANUILVdGbab1nHRXnGEVz0\n\tKZDmpW0c7FWGA6S1vzSrI9ZgH2NdmgZ8AYP4rw88BhDHDyS2x2wBWIwWurrythU3iGZ9\n\tKSnQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:references:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=L0wxf6qW6DLpD6rCGBueQ5DLAykzsKLhLQIfFMphn3Q=;\n\tb=oYuY2kojEej7G4I2av73h6CRoMhmmML2uHPfYrPhG4vVn2FJhM9y47FcLTPMN19mR9\n\tsb/PFW4PjaZVmONr2J2KEnYkBAkhERm5dlEh+uohAh5l9Gq6O3QOb0yHpn9M8JBuDQx4\n\tm7SX5ZxydlzqC0QE20dM33037LSl8ocEx/nYtYB9DTl0StdoBv6Ep5VayO0LGYBjYQcd\n\t0+Jgn1uegFPtxe5DcckVuI5BKi4BW8/mRwl3W28amlyYbbnCNtfZReH7vS+atJ4bPDev\n\tlfdGQgWhyhEe1iJ6sxmDYm8EMu+0a4McVgfLh9g+HrrG53aXbEKsJv6tQ8KjVDl0nUXl\n\tp6Cw==","X-Gm-Message-State":"AHPjjUhnxuF5xrdp4kziKpw8/JCDblJNTfnEa1R51nQNvWS0O/hh0yQ2\n\tP5J6QqoqvauOOnzvZ6LPt7WI0bpJ","X-Google-Smtp-Source":"AOwi7QBCOXDuXK8bJqdWfy5s8LNXBeNPzPu6HGXMTNsvqKzd5yrQ8czYm60xWtd7nUQbDN+SAQzX6A==","X-Received":"by 10.36.179.76 with SMTP id z12mr6862922iti.123.1505975311993; \n\tWed, 20 Sep 2017 23:28:31 -0700 (PDT)","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","To":"Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org","References":"<20170920114637.42004-1-aik@ozlabs.ru>\n\t<20170920114637.42004-10-aik@ozlabs.ru>\n\t<611f7d09-7c5d-20c4-9b9b-1c1f58525fb1@redhat.com>\n\t<e9f654aa-ca37-b4fc-a4b9-e916d62a5847@ozlabs.ru>\n\t<97ce1385-01c9-1045-2791-494a14a86a78@ozlabs.ru>","Message-ID":"<3f073ddb-a46a-523d-fb0b-037b3a193d78@ozlabs.ru>","Date":"Thu, 21 Sep 2017 16:28:27 +1000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<97ce1385-01c9-1045-2791-494a14a86a78@ozlabs.ru>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-AU","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c0b::22a","Subject":"Re: [Qemu-devel] [PATCH qemu v4 09/18] memory: Store physical root\n\tMR in FlatView","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]