Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810922/?format=api
{ "id": 810922, "url": "http://patchwork.ozlabs.org/api/patches/810922/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907092010.3605-2-aik@ozlabs.ru/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170907092010.3605-2-aik@ozlabs.ru>", "list_archive_url": null, "date": "2017-09-07T09:20:07", "name": "[RFC,qemu,1/4] memory: Postpone flatview and dispatch tree building till all devices are added", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f6447d095f57ae627a6c102422c13316e0391c75", "submitter": { "id": 7621, "url": "http://patchwork.ozlabs.org/api/people/7621/?format=api", "name": "Alexey Kardashevskiy", "email": "aik@ozlabs.ru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907092010.3605-2-aik@ozlabs.ru/mbox/", "series": [ { "id": 1955, "url": "http://patchwork.ozlabs.org/api/series/1955/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1955", "date": "2017-09-07T09:20:10", "name": "memory: Reduce memory use", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1955/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810922/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810922/checks/", "tags": {}, "related": [], "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 3xnw2375cYz9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 7 Sep 2017 19:21:47 +1000 (AEST)", "from localhost ([::1]:39512 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 1dpt0M-0001Kz-2F\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 05:21:46 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:57239)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dpszZ-0001Fa-Ci\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 05:21:02 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dpszU-0007ev-QZ\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 05:20:57 -0400", "from ozlabs.ru ([107.173.13.209]:51572)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dpszU-0007e8-Kl\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 05:20:52 -0400", "from vpl1.ozlabs.ibm.com (localhost [IPv6:::1])\n\tby ozlabs.ru (Postfix) with ESMTP id 21F1E3A60027;\n\tThu, 7 Sep 2017 05:21:31 -0400 (EDT)" ], "From": "Alexey Kardashevskiy <aik@ozlabs.ru>", "To": "qemu-devel@nongnu.org", "Date": "Thu, 7 Sep 2017 19:20:07 +1000", "Message-Id": "<20170907092010.3605-2-aik@ozlabs.ru>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20170907092010.3605-1-aik@ozlabs.ru>", "References": "<20170907092010.3605-1-aik@ozlabs.ru>", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 3.x [fuzzy]", "X-Received-From": "107.173.13.209", "Subject": "[Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added", "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>", "Cc": "Alexey Kardashevskiy <aik@ozlabs.ru>, Paolo Bonzini <pbonzini@redhat.com>,\n\tStefan Hajnoczi <stefanha@gmail.com>,\n\tPeter Maydell <peter.maydell@linaro.org>,\n\tDavid Gibson <david@gibson.dropbear.id.au>", "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>" }, "content": "Most devices use at least one address space and every time a new address\nspace is added, flat views and dispatch trees are rebuild for all address\nspaces. This is not a problem for a relatively small amount of devices but\neven 50 virtio-pci devices use more than 8GB of RAM.\n\nWhat happens that on every flatview/dispatch rebuild, new arrays are\nallocated and old ones release but the release is done via RCU so until\nan entire machine is build, they are not released.\n\nThis wraps devices creation into memory_region_transaction_begin/commit\nto massively reduce amount of flat view/dispatch tree (re)allocations.\n\nSigned-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n---\n vl.c | 4 ++++\n 1 file changed, 4 insertions(+)", "diff": "diff --git a/vl.c b/vl.c\nindex 8e247cc2a2..3c39cc8b3a 100644\n--- a/vl.c\n+++ b/vl.c\n@@ -4655,12 +4655,16 @@ int main(int argc, char **argv, char **envp)\n igd_gfx_passthru();\n \n /* init generic devices */\n+ memory_region_transaction_begin();\n+\n rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE);\n if (qemu_opts_foreach(qemu_find_opts(\"device\"),\n device_init_func, NULL, NULL)) {\n exit(1);\n }\n \n+ memory_region_transaction_commit();\n+\n cpu_synchronize_all_post_init();\n \n rom_reset_order_override();\n", "prefixes": [ "RFC", "qemu", "1/4" ] }