get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2026276/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2026276,
    "url": "http://patchwork.ozlabs.org/api/patches/2026276/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20241220104220.2007786-2-npiggin@gmail.com/",
    "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": "<20241220104220.2007786-2-npiggin@gmail.com>",
    "list_archive_url": null,
    "date": "2024-12-20T10:42:03",
    "name": "[01/17] replay: Fix migration use of clock for statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7962d22c93fa3a0faba303c164485323d01ea720",
    "submitter": {
        "id": 69518,
        "url": "http://patchwork.ozlabs.org/api/people/69518/?format=api",
        "name": "Nicholas Piggin",
        "email": "npiggin@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20241220104220.2007786-2-npiggin@gmail.com/mbox/",
    "series": [
        {
            "id": 437728,
            "url": "http://patchwork.ozlabs.org/api/series/437728/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=437728",
            "date": "2024-12-20T10:42:02",
            "name": "replay: Fixes and avocado test updates",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/437728/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2026276/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2026276/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@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=Ynu1bUml;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4YF3sr0bMkz1ySC\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Dec 2024 21:43:11 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1tOaT6-0001qc-SR; Fri, 20 Dec 2024 05:42:53 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <npiggin@gmail.com>)\n id 1tOaSx-0001nM-Oq; Fri, 20 Dec 2024 05:42:45 -0500",
            "from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <npiggin@gmail.com>)\n id 1tOaSw-0005CO-5K; Fri, 20 Dec 2024 05:42:43 -0500",
            "by mail-pg1-x533.google.com with SMTP id\n 41be03b00d2f7-7ea9739647bso1146473a12.0;\n Fri, 20 Dec 2024 02:42:41 -0800 (PST)",
            "from wheely.local0.net (14-200-18-130.tpgi.com.au. [14.200.18.130])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-2f2ee06dfd3sm5376942a91.32.2024.12.20.02.42.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 20 Dec 2024 02:42:39 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1734691360; x=1735296160; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=XupcwXC4o3WF/HULC2+F2cneFMCliOmRf8I9otsFFoY=;\n b=Ynu1bUmlM2Rtrzp7v9pUsjTpReyS6Dg9Jc8nHfU/2r+nz6rNKKTReJOcp+tXfVp+CO\n A2HnpyKuf1sTZOLXDd2QySH1PBoH/YEPW2MEmurZjYorcYHH0mSQbmROvDqVwaTRCGuc\n k/pYgBWW8T/XwB3gC0cq0P0lVPhRDQVrjNkJsxG/9RUNjpzPrsnWgBGPCC4XRyQb/Eat\n UE4hFs076h4Upl5gZGevRZlT+8tFOSK42AjoC8fUveyAmeyhJs8AyB9GlEeB7dveM9cU\n ZcQJsNy2kTdEhvqZB1Fi35OKAnRH8AuPPJmdebFViI1Nw0DMEYd84gl7pVNkWY5l0Yim\n YGng==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1734691360; x=1735296160;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=XupcwXC4o3WF/HULC2+F2cneFMCliOmRf8I9otsFFoY=;\n b=Z6B5ZLDxuFckeybKmCwNWgHjZdZuPAS5vMxcn/syXinuL66lci8GSIM92h7gTL0Gs9\n uuv4/te/Nix1mQHiM39+clSIsm9jyFA1uxqpKY8375Sg3ELELxRXlSt2wMyion9dgVHw\n 8KqwHsgXErsxFIE7WFD1yPXA2a5ZJqLWNGaBAcu9U5fTvLsWD4i1z1H/ORVjJN++MTaW\n MTeyr0Hh3LMSnaA5B2baQsnduGHHqwDQojDU79ObYveh98JJv+9TT36SctuJoZOpd+w9\n 6w4wWW4vIAMy2htXKOcyV3C3pmjyTWVnak9x+enRHWnevxIii/1wafl2VtcUwzU4PD/b\n tSnw==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCU66/7USo7gPJmtnj5toDkWLOubmuXADI6M/5x9SVzNJX4OgcH3dsdPWsxffVBuBvicX20kFwDXACAy@nongnu.org",
        "X-Gm-Message-State": "AOJu0YyzapgNBekOJkMRP6wJEmZNBi7MpOxJfZJ70GgJb56La2T0rnuo\n 5vTTWrap3RhUPzQJquuX682UZCy1khL7UqsBLFG2De1NWubsTutBHzd2RA==",
        "X-Gm-Gg": "ASbGnct1CdgAD475rEpIqDETZFDyBSIyF2DDQxoPkWrBWFAVwpdmwMGhOFHqo2CnrjK\n thLF5FG6oNQyXh/xTgisyWL6k1gOdEXSBDee4UmcxyiorFt8DJIxsGDAFspDjS7UKmEN8oeoHIB\n 2w42UxDp6AskUhjXqxny7dBh4iQPeAlVFTgmxqR6ycWB9IC8CJlTBSdC/DCgPLLRhbAiECCUB3m\n 3yyuVxUz+ShXtvAgUTyWSSspy4nSMrO+UQlO4/XXBP723SZzi4Sxm4PVIb0okuk/6wJ70TVnibN\n diebb3G0jQ==",
        "X-Google-Smtp-Source": "\n AGHT+IHJhPOBTvl9hvqnAZAZ22ZbgfEzsYzSOUpu2MkVulCan7laK8qWWrQZ8Uj1EucTtG726jT1rw==",
        "X-Received": "by 2002:a17:90b:524b:b0:2ee:c457:bf83 with SMTP id\n 98e67ed59e1d1-2f452e38c6cmr3862965a91.19.1734691360038;\n Fri, 20 Dec 2024 02:42:40 -0800 (PST)",
        "From": "Nicholas Piggin <npiggin@gmail.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Nicholas Piggin <npiggin@gmail.com>, qemu-block@nongnu.org, =?utf-8?q?Al?=\n\t=?utf-8?q?ex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,\n Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>,\n Paolo Bonzini <pbonzini@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>,\n Fam Zheng <fam@euphon.net>, Ronnie Sahlberg <ronniesahlberg@gmail.com>,\n John Snow <jsnow@redhat.com>, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Jason Wang <jasowang@redhat.com>,\n Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,\n Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>,\n Wainer dos Santos Moschetta <wainersm@redhat.com>",
        "Subject": "[PATCH 01/17] replay: Fix migration use of clock for statistics",
        "Date": "Fri, 20 Dec 2024 20:42:03 +1000",
        "Message-ID": "<20241220104220.2007786-2-npiggin@gmail.com>",
        "X-Mailer": "git-send-email 2.45.2",
        "In-Reply-To": "<20241220104220.2007786-1-npiggin@gmail.com>",
        "References": "<20241220104220.2007786-1-npiggin@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::533;\n envelope-from=npiggin@gmail.com; helo=mail-pg1-x533.google.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://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 <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Migration reads CLOCK_HOST when not holding the replay_mutex, which\nasserts when recording a trace. These are not guest visible so should\nbe CLOCK_REALTIME like other statistics in MigrationState, which do\nnot require the replay_mutex.\n\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n migration/migration.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/migration/migration.c b/migration/migration.c\nindex 8c5bd0a75c8..2eb9e50a263 100644\n--- a/migration/migration.c\n+++ b/migration/migration.c\n@@ -3433,7 +3433,7 @@ static void *migration_thread(void *opaque)\n {\n     MigrationState *s = opaque;\n     MigrationThread *thread = NULL;\n-    int64_t setup_start = qemu_clock_get_ms(QEMU_CLOCK_HOST);\n+    int64_t setup_start = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);\n     MigThrError thr_error;\n     bool urgent = false;\n     Error *local_err = NULL;\n@@ -3504,7 +3504,7 @@ static void *migration_thread(void *opaque)\n         goto out;\n     }\n \n-    s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_HOST) - setup_start;\n+    s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME) - setup_start;\n \n     trace_migration_thread_setup_complete();\n \n@@ -3584,7 +3584,7 @@ static void *bg_migration_thread(void *opaque)\n \n     migration_rate_set(RATE_LIMIT_DISABLED);\n \n-    setup_start = qemu_clock_get_ms(QEMU_CLOCK_HOST);\n+    setup_start = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);\n     /*\n      * We want to save vmstate for the moment when migration has been\n      * initiated but also we want to save RAM content while VM is running.\n@@ -3629,7 +3629,7 @@ static void *bg_migration_thread(void *opaque)\n         goto fail_setup;\n     }\n \n-    s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_HOST) - setup_start;\n+    s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME) - setup_start;\n \n     trace_migration_thread_setup_complete();\n \n",
    "prefixes": [
        "01/17"
    ]
}