[{"id":1772643,"web_url":"http://patchwork.ozlabs.org/comment/1772643/","msgid":"<5e836306-27bd-a0fd-5bdd-8c8a510bf8eb@redhat.com>","list_archive_url":null,"date":"2017-09-21T10:03:31","subject":"Re: [Qemu-devel] [PATCH qemu v5 00/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 21/09/2017 10:50, Alexey Kardashevskiy wrote:\n> This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593\n> Previous versions:\n> v1: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html\n> v2: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04069.html\n> v3: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04523.html\n> v4: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg05669.html\n> \n> This patchset tries to reduce amount of memory used by FlatViews\n> and tries share as many FVs between address spaces as possible.\n\nThanks, this looks good!  (Patch 18 indeed is not what I had in mind :)).\n\nPaolo\n\n\n> Changelog:\n> v5:\n> * removed \"memory: Give memory_region_transaction_commit a hint\" (broken)\n> * added \"memory: Avoid temporary FlatView allocation in a single child case\"\n> but I suggest ditching it, it is just there to demonsrate how I checked\n> the suggested idea\n> * updated example of \"info mtree -f -d\" in 14/18 to demonstrate the result\n> \n> v4:\n> * total rework again to provide grounds for new 15/18, 17/18, 18/18\n> \n> v3:\n> * addressed comments from v2, mainly simplified the code\n> \n> v2:\n> * total rework\n> \n> \n> This is based on sha1\n> c51700273a Peter Maydell \"Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170919-v2' into staging\".\n> \n> Please comment. Thanks.\n> \n> \n> \n> Alexey Kardashevskiy (18):\n>   exec: Explicitly export target AS from\n>     address_space_translate_internal\n>   memory: Open code FlatView rendering\n>   memory: Move FlatView allocation to a helper\n>   memory: Move AddressSpaceDispatch from AddressSpace to FlatView\n>   memory: Remove AddressSpace pointer from AddressSpaceDispatch\n>   memory: Switch memory from using AddressSpace to FlatView\n>   memory: Cleanup after switching to FlatView\n>   memory: Rename mem_begin/mem_commit/mem_add helpers\n>   memory: Store physical root MR in FlatView\n>   memory: Alloc dispatch tree where topology is generared\n>   memory: Move address_space_update_ioeventfds\n>   memory: Share FlatView's and dispatch trees between address spaces\n>   memory: Do not allocate FlatView in address_space_init\n>   memory: Rework \"info mtree\" to print flat views and dispatch trees\n>   memory: Share special empty FlatView\n>   memory: Get rid of address_space_init_shareable\n>   memory: Create FlatView directly\n>   memory: Avoid temporary FlatView allocation in a single child case\n> \n>  include/exec/memory-internal.h |  16 +-\n>  include/exec/memory.h          |  76 +++++-----\n>  include/hw/arm/armv7m.h        |   2 +-\n>  cpus.c                         |   5 +-\n>  exec.c                         | 330 ++++++++++++++++++++++++----------------\n>  hw/arm/armv7m.c                |   9 +-\n>  hw/intc/openpic_kvm.c          |   2 +-\n>  memory.c                       | 335 +++++++++++++++++++++++++++++++----------\n>  monitor.c                      |   3 +-\n>  target/arm/cpu.c               |  16 +-\n>  target/i386/cpu.c              |   5 +-\n>  hmp-commands-info.hx           |   7 +-\n>  12 files changed, 533 insertions(+), 273 deletions(-)\n>","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-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.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 3xyXJW0b8rz9t49\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 20:04:09 +1000 (AEST)","from localhost ([::1]:52698 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 1duyL1-000179-28\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 06:04:07 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39088)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1duyKb-00016b-Mg\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:03:48 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1duyKY-0002Ks-El\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:03:41 -0400","from mx1.redhat.com ([209.132.183.28]:41326)\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 1duyKY-0002Bj-67\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:03:38 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\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 226847E422;\n\tThu, 21 Sep 2017 10:03:37 +0000 (UTC)","from [10.36.117.52] (ovpn-117-52.ams2.redhat.com [10.36.117.52])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 542475EDEB;\n\tThu, 21 Sep 2017 10:03:35 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 226847E422","To":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org","References":"<20170921085110.25598-1-aik@ozlabs.ru>","From":"Paolo Bonzini <pbonzini@redhat.com>","Message-ID":"<5e836306-27bd-a0fd-5bdd-8c8a510bf8eb@redhat.com>","Date":"Thu, 21 Sep 2017 12:03:31 +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":"<20170921085110.25598-1-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.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tThu, 21 Sep 2017 10:03:37 +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 v5 00/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":1772649,"web_url":"http://patchwork.ozlabs.org/comment/1772649/","msgid":"<44820288-1464-de78-8a23-59cf9b945aea@ozlabs.ru>","list_archive_url":null,"date":"2017-09-21T10:11:55","subject":"Re: [Qemu-devel] [PATCH qemu v5 00/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 20:03, Paolo Bonzini wrote:\n> On 21/09/2017 10:50, Alexey Kardashevskiy wrote:\n>> This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593\n>> Previous versions:\n>> v1: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html\n>> v2: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04069.html\n>> v3: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04523.html\n>> v4: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg05669.html\n>>\n>> This patchset tries to reduce amount of memory used by FlatViews\n>> and tries share as many FVs between address spaces as possible.\n> \n> Thanks, this looks good!  (Patch 18 indeed is not what I had in mind :)).\n\n\nHmmm, then what did you have in mind then?\n\nWhen clear my backlog a bit, I'd give it a try.\n\nThanks for the ideas and review.\n\n\nps. this could make a semidecent kvm forum talk, could not it? :)\n\n> \n> Paolo\n> \n> \n>> Changelog:\n>> v5:\n>> * removed \"memory: Give memory_region_transaction_commit a hint\" (broken)\n>> * added \"memory: Avoid temporary FlatView allocation in a single child case\"\n>> but I suggest ditching it, it is just there to demonsrate how I checked\n>> the suggested idea\n>> * updated example of \"info mtree -f -d\" in 14/18 to demonstrate the result\n>>\n>> v4:\n>> * total rework again to provide grounds for new 15/18, 17/18, 18/18\n>>\n>> v3:\n>> * addressed comments from v2, mainly simplified the code\n>>\n>> v2:\n>> * total rework\n>>\n>>\n>> This is based on sha1\n>> c51700273a Peter Maydell \"Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170919-v2' into staging\".\n>>\n>> Please comment. Thanks.\n>>\n>>\n>>\n>> Alexey Kardashevskiy (18):\n>>   exec: Explicitly export target AS from\n>>     address_space_translate_internal\n>>   memory: Open code FlatView rendering\n>>   memory: Move FlatView allocation to a helper\n>>   memory: Move AddressSpaceDispatch from AddressSpace to FlatView\n>>   memory: Remove AddressSpace pointer from AddressSpaceDispatch\n>>   memory: Switch memory from using AddressSpace to FlatView\n>>   memory: Cleanup after switching to FlatView\n>>   memory: Rename mem_begin/mem_commit/mem_add helpers\n>>   memory: Store physical root MR in FlatView\n>>   memory: Alloc dispatch tree where topology is generared\n>>   memory: Move address_space_update_ioeventfds\n>>   memory: Share FlatView's and dispatch trees between address spaces\n>>   memory: Do not allocate FlatView in address_space_init\n>>   memory: Rework \"info mtree\" to print flat views and dispatch trees\n>>   memory: Share special empty FlatView\n>>   memory: Get rid of address_space_init_shareable\n>>   memory: Create FlatView directly\n>>   memory: Avoid temporary FlatView allocation in a single child case\n>>\n>>  include/exec/memory-internal.h |  16 +-\n>>  include/exec/memory.h          |  76 +++++-----\n>>  include/hw/arm/armv7m.h        |   2 +-\n>>  cpus.c                         |   5 +-\n>>  exec.c                         | 330 ++++++++++++++++++++++++----------------\n>>  hw/arm/armv7m.c                |   9 +-\n>>  hw/intc/openpic_kvm.c          |   2 +-\n>>  memory.c                       | 335 +++++++++++++++++++++++++++++++----------\n>>  monitor.c                      |   3 +-\n>>  target/arm/cpu.c               |  16 +-\n>>  target/i386/cpu.c              |   5 +-\n>>  hmp-commands-info.hx           |   7 +-\n>>  12 files changed, 533 insertions(+), 273 deletions(-)\n>>\n>","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=\"siQNWzoX\"; 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 3xyXV93Fkfz9t49\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 20:12:32 +1000 (AEST)","from localhost ([::1]:52731 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 1duyT7-0004T7-Ky\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 06:12:29 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:41075)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1duySl-0004Si-OP\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:12:12 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1duySf-0008F2-Rr\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:12:07 -0400","from mail-it0-x230.google.com ([2607:f8b0:4001:c0b::230]:53099)\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 1duySf-0008C3-M0\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:12:01 -0400","by mail-it0-x230.google.com with SMTP id c195so61777itb.1\n\tfor <qemu-devel@nongnu.org>; Thu, 21 Sep 2017 03:12:01 -0700 (PDT)","from [10.61.2.175] ([122.99.82.10])\n\tby smtp.googlemail.com with ESMTPSA id\n\tx8sm758381itf.14.2017.09.21.03.11.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 21 Sep 2017 03:11:59 -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=YyC7RX/ouvS39ZfWCusnSHO8hCkD0Be9jc5iX7y7op8=;\n\tb=siQNWzoXb5iTLsRmFhfrgLT0miOhpsxfdO/a2JcDXtqvnd3T0xRd00tiHbknTgLQaQ\n\tWXBCARZSTJUutQI5Edon/fMy1xIdNtvPecZJAEjiMyaHRqH+3/hgvzIFTCz3pYg9gXZ9\n\tWy441p5weVu/0Phg3F3uwmgsfzlVC5oKQe17n1GFUnjR2deUbnYnQ0LnrtVYuF47ojEU\n\tVughiTP/2PDef6lK9lN662p0tdB55no+al9PtzdR9g5OxuDrJSZEXM0li06YJw6paEED\n\t0Ig6bO7hgQD+AfkEfz2V+KGqWdEXEiYLQR+CD6W8MeByN15qnKsDTH+ftmhNLThgqC/A\n\tMWCw==","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=YyC7RX/ouvS39ZfWCusnSHO8hCkD0Be9jc5iX7y7op8=;\n\tb=Qq+SLVj5cIS7Khg//j5GD6z5YX+NNNT1Akz7XVOH7DUzIcPL7SP/XNE4cgZjI/JvAj\n\tPwqw3HADG/OafsbOrjeximH1Gdkff8UsvCJB1a3RgQL8le06VeuyD2VVPpZa9X5G+o3d\n\tK5AfWKvHpoH/uvevVxuNVkf9YPSvj/yNeTDxB90aEjFG52OvuFxzfXw0giFaN1tTwzpk\n\tQipK8Str0rstD3+NoIW2HvOfsVmBWYjpsSyPXeG2QydzmkA8QJO95Ed2ebhggS7+yAFv\n\tUKGi+17/+D4DLk0pWD7AeKyFDBGMK34AYZveKXxV+TmThqa3rZKPojLCngFYapvIUlHB\n\tO8RA==","X-Gm-Message-State":"AHPjjUhi4zDi/JemAN6Y+z3J0lWQsKo+07S2yKOOrf9CGSFXdlNCM4HU\n\t+MaP1B1wOiTc9iz94N87ER8KA0wj","X-Google-Smtp-Source":"AOwi7QAuTWl34YgVXw8BbyXG2P4SyPrNcJ9zaDaUVzoHs6MK9axlZgErtTZ1NOPcoBOxFVAWirhIPQ==","X-Received":"by 10.36.158.10 with SMTP id p10mr654484itd.146.1505988720561;\n\tThu, 21 Sep 2017 03:12:00 -0700 (PDT)","To":"Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org","References":"<20170921085110.25598-1-aik@ozlabs.ru>\n\t<5e836306-27bd-a0fd-5bdd-8c8a510bf8eb@redhat.com>","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<44820288-1464-de78-8a23-59cf9b945aea@ozlabs.ru>","Date":"Thu, 21 Sep 2017 20:11:55 +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":"<5e836306-27bd-a0fd-5bdd-8c8a510bf8eb@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:4001:c0b::230","Subject":"Re: [Qemu-devel] [PATCH qemu v5 00/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":1772727,"web_url":"http://patchwork.ozlabs.org/comment/1772727/","msgid":"<0fb7a236-668f-e147-b325-23d2355c46e3@redhat.com>","list_archive_url":null,"date":"2017-09-21T11:38:32","subject":"Re: [Qemu-devel] [PATCH qemu v5 00/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 21/09/2017 12:11, Alexey Kardashevskiy wrote:\n> On 21/09/17 20:03, Paolo Bonzini wrote:\n>> On 21/09/2017 10:50, Alexey Kardashevskiy wrote:\n>>> This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593\n>>> Previous versions:\n>>> v1: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html\n>>> v2: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04069.html\n>>> v3: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04523.html\n>>> v4: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg05669.html\n>>>\n>>> This patchset tries to reduce amount of memory used by FlatViews\n>>> and tries share as many FVs between address spaces as possible.\n>>\n>> Thanks, this looks good!  (Patch 18 indeed is not what I had in mind :)).\n\nWith further review:\n\n- this is missing from patch 17:\n\ndiff --git a/memory.c b/memory.c\nindex f3db61621c..7d266ec8a2 100644\n--- a/memory.c\n+++ b/memory.c\n@@ -2770,6 +2770,7 @@ void address_space_init(AddressSpace *as,\nMemoryRegion *root, const char *name)\n     QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);\n     as->name = g_strdup(name ? name : \"anonymous\");\n     address_space_update_topology(as);\n+    address_space_update_ioeventfds(as);\n }\n\n static void do_address_space_destroy(AddressSpace *as)\n\n- with non-virtio devices 98% (!) of created FlatViews are the empty\nones that are destroyed immediately, so we probably should detect those\nin advance\n\nI'll then drop patches 15 and 18, and send some more optimizations on top.\n\nThanks again for doing the *real* optimization work!\n\nPaolo\n\n\n> Hmmm, then what did you have in mind then?\n> When clear my backlog a bit, I'd give it a try.\n> \n> Thanks for the ideas and review.\n> \n> \n> ps. this could make a semidecent kvm forum talk, could not it? :)\n> \n>>\n>> Paolo\n>>\n>>\n>>> Changelog:\n>>> v5:\n>>> * removed \"memory: Give memory_region_transaction_commit a hint\" (broken)\n>>> * added \"memory: Avoid temporary FlatView allocation in a single child case\"\n>>> but I suggest ditching it, it is just there to demonsrate how I checked\n>>> the suggested idea\n>>> * updated example of \"info mtree -f -d\" in 14/18 to demonstrate the result\n>>>\n>>> v4:\n>>> * total rework again to provide grounds for new 15/18, 17/18, 18/18\n>>>\n>>> v3:\n>>> * addressed comments from v2, mainly simplified the code\n>>>\n>>> v2:\n>>> * total rework\n>>>\n>>>\n>>> This is based on sha1\n>>> c51700273a Peter Maydell \"Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170919-v2' into staging\".\n>>>\n>>> Please comment. Thanks.\n>>>\n>>>\n>>>\n>>> Alexey Kardashevskiy (18):\n>>>   exec: Explicitly export target AS from\n>>>     address_space_translate_internal\n>>>   memory: Open code FlatView rendering\n>>>   memory: Move FlatView allocation to a helper\n>>>   memory: Move AddressSpaceDispatch from AddressSpace to FlatView\n>>>   memory: Remove AddressSpace pointer from AddressSpaceDispatch\n>>>   memory: Switch memory from using AddressSpace to FlatView\n>>>   memory: Cleanup after switching to FlatView\n>>>   memory: Rename mem_begin/mem_commit/mem_add helpers\n>>>   memory: Store physical root MR in FlatView\n>>>   memory: Alloc dispatch tree where topology is generared\n>>>   memory: Move address_space_update_ioeventfds\n>>>   memory: Share FlatView's and dispatch trees between address spaces\n>>>   memory: Do not allocate FlatView in address_space_init\n>>>   memory: Rework \"info mtree\" to print flat views and dispatch trees\n>>>   memory: Share special empty FlatView\n>>>   memory: Get rid of address_space_init_shareable\n>>>   memory: Create FlatView directly\n>>>   memory: Avoid temporary FlatView allocation in a single child case\n>>>\n>>>  include/exec/memory-internal.h |  16 +-\n>>>  include/exec/memory.h          |  76 +++++-----\n>>>  include/hw/arm/armv7m.h        |   2 +-\n>>>  cpus.c                         |   5 +-\n>>>  exec.c                         | 330 ++++++++++++++++++++++++----------------\n>>>  hw/arm/armv7m.c                |   9 +-\n>>>  hw/intc/openpic_kvm.c          |   2 +-\n>>>  memory.c                       | 335 +++++++++++++++++++++++++++++++----------\n>>>  monitor.c                      |   3 +-\n>>>  target/arm/cpu.c               |  16 +-\n>>>  target/i386/cpu.c              |   5 +-\n>>>  hmp-commands-info.hx           |   7 +-\n>>>  12 files changed, 533 insertions(+), 273 deletions(-)\n>>>\n>>\n> \n>","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>)","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 3xyZQ03Bp7z9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 21:39:03 +1000 (AEST)","from localhost ([::1]:53032 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 1duzor-0001J0-1Y\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 07:39:01 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:60516)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1duzoV-0001Io-GZ\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 07:38:42 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1duzoS-000555-D4\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 07:38:39 -0400","from mail-wr0-f175.google.com ([209.85.128.175]:56598)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <pbonzini@redhat.com>) id 1duzoS-00054x-7J\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 07:38:36 -0400","by mail-wr0-f175.google.com with SMTP id r74so4325773wrb.13\n\tfor <qemu-devel@nongnu.org>; Thu, 21 Sep 2017 04:38:36 -0700 (PDT)","from [192.168.10.165]\n\t(dynamic-adsl-78-12-246-117.clienti.tiscali.it.\n\t[78.12.246.117]) by smtp.gmail.com with ESMTPSA id\n\tz108sm1571636wrc.49.2017.09.21.04.38.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 21 Sep 2017 04:38:33 -0700 (PDT)"],"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=5djKf9BrKlX5JrfgHIRVfXNuP4L5hF11WFibHvRJrEA=;\n\tb=iA3/v9ixB+sY0hjZgxnNyswU+Oy13NdHzKTA+wlOUlHpQvcMH7uav9Wb7ECGyR3yXf\n\tjUh/8bAE/euskaxEb0fae6Qx1knv3rnFEDsVwEGJ9AJ34+h6EWynsBDY2exzry9yDYRe\n\tMpTT0JIrz+tqnMq+Rp792VN0jK7+wXGuRGsOeIfLhgH303MsmIrZZf5VtoDMtJij5IaJ\n\tK8A1miuxyIiGtTr7sE5OOEg6QYc/MM1uNWBcLe5LMLi41hOnoDSvg5mNC+nZplvPH+4H\n\tF2ThIBfj6DJinsMliuKPSiVCJCCE0kgPViZVfEOelmOITetRxBKWhMxt2ILhjPE5tadG\n\t+wlQ==","X-Gm-Message-State":"AHPjjUjHbhTobI30t2TdUf5WGrlEpo6bByEaXmhxnciov0ThsgMUQG0i\n\tQEakkoXbgmUBVB1vo45kTXxvlKHtgK4=","X-Google-Smtp-Source":"AOwi7QDMF0FqnWo4D5k8kQ0m8qSekCZciRt6T2I1YWeoI89YSXl4ZZYVdiyxvBEn8rMvo5q0vR4cvA==","X-Received":"by 10.223.193.140 with SMTP id x12mr1626806wre.155.1505993914625;\n\tThu, 21 Sep 2017 04:38:34 -0700 (PDT)","To":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org","References":"<20170921085110.25598-1-aik@ozlabs.ru>\n\t<5e836306-27bd-a0fd-5bdd-8c8a510bf8eb@redhat.com>\n\t<44820288-1464-de78-8a23-59cf9b945aea@ozlabs.ru>","From":"Paolo Bonzini <pbonzini@redhat.com>","Message-ID":"<0fb7a236-668f-e147-b325-23d2355c46e3@redhat.com>","Date":"Thu, 21 Sep 2017 13:38:32 +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":"<44820288-1464-de78-8a23-59cf9b945aea@ozlabs.ru>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.85.128.175","Subject":"Re: [Qemu-devel] [PATCH qemu v5 00/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>"}}]