get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218135,
    "url": "http://patchwork.ozlabs.org/api/patches/2218135/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260331131622.30505-2-frederic@kernel.org/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260331131622.30505-2-frederic@kernel.org>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260331131622.30505-2-frederic@kernel.org/",
    "date": "2026-03-31T13:16:09",
    "name": "[01/14] sched/idle: Handle offlining first in idle loop",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "ae47c6a8c0c11d688c2f0b4b780b7fd47356e852",
    "submitter": {
        "id": 79411,
        "url": "http://patchwork.ozlabs.org/api/people/79411/?format=api",
        "name": "Frederic Weisbecker",
        "email": "frederic@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260331131622.30505-2-frederic@kernel.org/mbox/",
    "series": [
        {
            "id": 498198,
            "url": "http://patchwork.ozlabs.org/api/series/498198/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=498198",
            "date": "2026-03-31T13:16:08",
            "name": "tick/sched: Refactor idle cputime accounting",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/498198/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218135/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218135/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19081-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=QOd19h22;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19081-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=172.105.4.254",
            "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=QOd19h22;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org\n (client-ip=172.105.4.254; helo=tor.source.kernel.org;\n envelope-from=frederic@kernel.org; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flTCw5lvWz1yGT\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 00:16:44 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4flTCw54jjz2yhZ;\n\tWed, 01 Apr 2026 00:16:44 +1100 (AEDT)",
            "from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4flTCv5Skjz2ybQ\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 01 Apr 2026 00:16:43 +1100 (AEDT)",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id B8F286012B;\n\tTue, 31 Mar 2026 13:16:40 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 83B22C2BCB1;\n\tTue, 31 Mar 2026 13:16:33 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774963004;\n\tcv=none;\n b=dRj3sYZPaxVCsnNjx4xtFP28QvIWOxuv+LWpi00nPtSCe+i83m/qnGBaLN5yrmV1+XKHtFiD+vI77cOWGYHE91lBNCet5S9GASoy4O4Kyxa7GTDpo5yXgWLzc6VFNEqL6jbq4ekCnitgUvyglCWwVjnlkGzdgtyJGr5T3tetNuXnO2aHH1ygvV0XIoeCan4D8/qUbb9xZbyJ/+cNxDJiW0ost0IB8m4MuUWa2UcqK/3hO/qYH9A85DZlkjldMzeb4BaVH+FXz/zr/LpGN+pNuswbmFxvaS1eTLgJIyDHbBatVNcgrVZ96+mR1bcEll8dzdveUABc4QMq1JI/GYzViQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774963004; c=relaxed/relaxed;\n\tbh=UukHkjxfYVojdWVe8yPWL86ukvidAuj5oJ2PgQZqghQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=GTd3N21rca9ucfLwej2UZRd+KqFeL4yonSMa88E2Em3VHlMUnZRJIW4YQk5qR74dOr53uod/G5HPDv5TzlAkQbwW4GsUQ8zj81PUJE51Fd/p5PPNP6lr6br6wC/unuuttzrU+u06guXe2aGB2pO244javPFEr4TIl/ztKYoVmYAcZOSGm36l11nuPPrXHkObNjHAN0lOtpOCIrfRUHwmz4HYrVu8V1lpgvqWtJEdKjw0LYA2WPNW3lEniYB0ttQM9wmIyTLUk417q1u2jB7oHPtyd68Rng++c52qIQ1baDfU1C1s0Xxqh4WDFhSN35JhloBNb3X6iz6c+ExrcEq2ww==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=QOd19h22; dkim-atps=neutral;\n spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org;\n envelope-from=frederic@kernel.org;\n receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1774963000;\n\tbh=HS19yv/P2kO5uwZtZn6WI3D14aCIjKAvAWdMPBQbuaw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=QOd19h22X/RosrIg36sqR4C547PJmOMUOXt8k01W677Q/+RAOIFeVhFiiIG3+TE7i\n\t cEvV7ifj6S5hMQ9Qt0gKuz7aAICwb+07P0jD4HkZsSG4WgYxmcLrxbZ7CNEpwQYFaC\n\t 155JAD301rzIjSi9iS9GCaKWPMy24AxgjmpEMnBLjTeqBhSqPcUJgapbOoYDiBGbAW\n\t gFIQXoFMXIj7EFweb4d76Xur0LXUrumcFb8U69WbG2lvZNZna2ck9OCggdrGD8j3Mr\n\t b4xrQfFkgwpL0VrKHQ2sHNRU6njozzz+aDPA/o+UH+4//C+LDkvpopk8p7AFypemWl\n\t 1gbQ+yOSVjQsg==",
        "From": "Frederic Weisbecker <frederic@kernel.org>",
        "To": "LKML <linux-kernel@vger.kernel.org>",
        "Cc": "Frederic Weisbecker <frederic@kernel.org>,\n\t\"Christophe Leroy (CS GROUP)\" <chleroy@kernel.org>,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tAlexander Gordeev <agordeev@linux.ibm.com>,\n\tAnna-Maria Behnsen <anna-maria@linutronix.de>,\n\tBen Segall <bsegall@google.com>,\n\tBoqun Feng <boqun.feng@gmail.com>,\n\tChristian Borntraeger <borntraeger@linux.ibm.com>,\n\tDietmar Eggemann <dietmar.eggemann@arm.com>,\n\tHeiko Carstens <hca@linux.ibm.com>,\n\tIngo Molnar <mingo@redhat.com>,\n\tJan Kiszka <jan.kiszka@siemens.com>,\n\tJoel Fernandes <joelagnelf@nvidia.com>,\n\tJuri Lelli <juri.lelli@redhat.com>,\n\tKieran Bingham <kbingham@kernel.org>,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>,\n\tMel Gorman <mgorman@suse.de>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tNeeraj Upadhyay <neeraj.upadhyay@kernel.org>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\t\"Paul E . McKenney\" <paulmck@kernel.org>,\n\tPeter Zijlstra <peterz@infradead.org>,\n\tShrikanth Hegde <sshegde@linux.ibm.com>,\n\tSteven Rostedt <rostedt@goodmis.org>,\n\tSven Schnelle <svens@linux.ibm.com>,\n\tThomas Gleixner <tglx@linutronix.de>,\n\tUladzislau Rezki <urezki@gmail.com>,\n\tValentin Schneider <vschneid@redhat.com>,\n\tVasily Gorbik <gor@linux.ibm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tViresh Kumar <viresh.kumar@linaro.org>,\n\tXin Zhao <jackzxcui1989@163.com>,\n\tlinux-pm@vger.kernel.org,\n\tlinux-s390@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org",
        "Subject": "[PATCH 01/14] sched/idle: Handle offlining first in idle loop",
        "Date": "Tue, 31 Mar 2026 15:16:09 +0200",
        "Message-ID": "<20260331131622.30505-2-frederic@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260331131622.30505-1-frederic@kernel.org>",
        "References": "<20260331131622.30505-1-frederic@kernel.org>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,\n\tDKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS\n\tautolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "Offline handling happens from within the inner idle loop,\nafter the beginning of dyntick cputime accounting, nohz idle\nload balancing and TIF_NEED_RESCHED polling.\n\nThis is not necessary and even buggy because:\n\n* There is no dyntick handling to do. And calling tick_nohz_idle_enter()\n  messes up with the struct tick_sched reset that was performed on\n  tick_sched_timer_dying().\n\n* There is no nohz idle balancing to do.\n\n* Polling on TIF_RESCHED is irrelevant at this stage, there are no more\n  tasks allowed to run.\n\n* No need to check if need_resched() before offline handling since\n  stop_machine is done and all per-cpu kthread should be done with\n  their job.\n\nTherefore move the offline handling at the beginning of the idle loop.\nThis will also ease the idle cputime unification later by not elapsing\nidle time while offline through the call to:\n\n\ttick_nohz_idle_enter() -> tick_nohz_start_idle()\n\nSigned-off-by: Frederic Weisbecker <frederic@kernel.org>\nReviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>\nTested-by: Shrikanth Hegde <sshegde@linux.ibm.com>\n---\n kernel/sched/idle.c | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c\nindex 3681b6ad9276..521a076d8845 100644\n--- a/kernel/sched/idle.c\n+++ b/kernel/sched/idle.c\n@@ -260,6 +260,14 @@ static void do_idle(void)\n {\n \tint cpu = smp_processor_id();\n \n+\tif (cpu_is_offline(cpu)) {\n+\t\tlocal_irq_disable();\n+\t\t/* All per-CPU kernel threads should be done by now. */\n+\t\tWARN_ON_ONCE(need_resched());\n+\t\tcpuhp_report_idle_dead();\n+\t\tarch_cpu_idle_dead();\n+\t}\n+\n \t/*\n \t * Check if we need to update blocked load\n \t */\n@@ -311,11 +319,6 @@ static void do_idle(void)\n \t\t */\n \t\tlocal_irq_disable();\n \n-\t\tif (cpu_is_offline(cpu)) {\n-\t\t\tcpuhp_report_idle_dead();\n-\t\t\tarch_cpu_idle_dead();\n-\t\t}\n-\n \t\tarch_cpu_idle_enter();\n \t\trcu_nocb_flush_deferred_wakeup();\n \n",
    "prefixes": [
        "01/14"
    ]
}