get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222509,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222509/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/53f26493-09fc-4f8b-9751-24d2c2e80697@linux.ibm.com/",
    "project": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/59/?format=api",
        "name": "Linux Test Project development",
        "link_name": "ltp",
        "list_id": "ltp.lists.linux.it",
        "list_email": "ltp@lists.linux.it",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<53f26493-09fc-4f8b-9751-24d2c2e80697@linux.ibm.com>",
    "list_archive_url": null,
    "date": "2026-04-12T13:05:42",
    "name": "sched_football: fix false failures on many-CPU systems",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "88c075852eefe57bb1ca28c236819aaefbc70303",
    "submitter": {
        "id": 93035,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/93035/?format=api",
        "name": "Soma Das",
        "email": "somadas1@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/53f26493-09fc-4f8b-9751-24d2c2e80697@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 499605,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499605/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=499605",
            "date": "2026-04-12T13:05:42",
            "name": "sched_football: fix false failures on many-CPU systems",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499605/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222509/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222509/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ltp@lists.linux.it"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ltp@picard.linux.it"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=pW4ugye7;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ftrQ31jQfz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 23:06:03 +1000 (AEST)",
            "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 34EA53E294A\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 15:06:00 +0200 (CEST)",
            "from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 930D63D6B2D\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 15:05:56 +0200 (CEST)",
            "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 1EEDC60028D\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 15:05:53 +0200 (CEST)",
            "from pps.filterd (m0356517.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63C2OWi0987509\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 13:05:52 GMT",
            "from ppma12.dal12v.mail.ibm.com\n (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dfe17kyfk-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 13:05:51 +0000 (GMT)",
            "from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1])\n by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 63C70PNa015149\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 13:05:50 GMT",
            "from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73])\n by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dg0ms9nar-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 13:05:50 +0000",
            "from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com\n [10.39.53.228])\n by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63CD5mbq27591372\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Sun, 12 Apr 2026 13:05:48 GMT",
            "from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 48BD758059;\n Sun, 12 Apr 2026 13:05:48 +0000 (GMT)",
            "from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 98DC158055;\n Sun, 12 Apr 2026 13:05:45 +0000 (GMT)",
            "from [9.43.115.131] (unknown [9.43.115.131])\n by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTPS;\n Sun, 12 Apr 2026 13:05:45 +0000 (GMT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-type:date:from:message-id:mime-version:subject:to; s=\n pp1; bh=e1tlWmrx1/CiC5d4B5hjrUcAw8qYbEi3gUSy3sg6FaM=; b=pW4ugye7\n /3K9Z7lVxWYgbLLlb5JwfOkZ8UrogIopAh+I6li+SkX2SNe2jxAAjZW89NaAdUPI\n YYs5NPuNGfbNAK/S4wp6a0MccR4yzBw7sp3jn53PS9ChutFOUh1iiRkQ6WmeLz01\n 3AQRd8gVg4SLlx4rPaVj9JZeFdHd6OEcnMVwU5mvtWp5SF8mE9Z9oPNjY7yKEPw3\n xa8A/+b8+NzkTaoDJDMs7YTuTcnSXbUyczJYtTjobQ5/ocxX7qVd99DFrfCYoXuL\n EGURiQZeGHSZAJd3CCAtXenTmcCCOYLRt8dPb7sznGBrMblRI2wFBtN41v+qgLU6\n 5itgThmEzyZaKw==",
        "Content-Type": "multipart/mixed; boundary=\"------------KoftN55XF2kU9eP0nYjzdlBs\"",
        "Message-ID": "<53f26493-09fc-4f8b-9751-24d2c2e80697@linux.ibm.com>",
        "Date": "Sun, 12 Apr 2026 18:35:42 +0530",
        "MIME-Version": "1.0",
        "User-Agent": "Mozilla Thunderbird",
        "Content-Language": "en-US",
        "To": "ltp@lists.linux.it",
        "From": "Soma Das <somadas1@linux.ibm.com>",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDEyMDEyNSBTYWx0ZWRfX9x4YEqjwmofp\n nEXuDPDeDQPOPZETmN0laSMzqqwvb/B5EVxpn2toH0IRSzZdGsc9ycLll1/0dRYrvIy3kpmQ4uv\n 9iXgcnQEFLcEpvrkJLrBvik7mechKSspU7B3MdWoQoTnf9bV+3jlJSrnvejXRtn4ngyTiHd5WQK\n QITtw3dc4E/qDVLYAyxxrYwiObAIhl21iWXGgFD9QtJyxu4Yj8SRm5N7gLizzk/3idfclR2P1ke\n 5FjB4sALz+QfRoUjxY+yhF/7EJzRgsb4i11F0aVVHQlqhfJ/tg20CnbLw1RRMcTyow0EjleC/Xh\n UPOKtqGNS52wHpPjVbs5Vl9Pyf0J7QQspnuOTzyJPyHFDQTA4WbZwzhAUnZyAhmpshgUzQ66CVM\n tsVcZLhIDYv1qS5ohdslGc+5fwh5YFFOJnQKDXIKrOT3vI+ZZJnnTrpHSbuV67lIlBAEH/C0ZI3\n u3GHpP5h2J2xfSaS3qA==",
        "X-Proofpoint-ORIG-GUID": "im3xLgECeAMq1oUlOJB7GorCY4TXeyyP",
        "X-Proofpoint-GUID": "im3xLgECeAMq1oUlOJB7GorCY4TXeyyP",
        "X-Authority-Analysis": "v=2.4 cv=SrOgLvO0 c=1 sm=1 tr=0 ts=69db98af cx=c_pps\n a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=U7nrCbtTmkRpXpFmAIza:22 a=r77TgQKjGQsHNAKrUKIA:9 a=VnNF1IyMAAAA:8\n a=1XWaLZrsAAAA:8 a=siWNEoOW7s7Ygp0yksoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=wsqAA3S-N5NTywhLvvoA:9 a=B2y7HmGcmWMA:10 a=F5Znv7b2CywGJPwBC_AA:9\n a=m-Z_27IZkzAA:10",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-12_03,2026-04-09_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n adultscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 bulkscore=0\n phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 impostorscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604120125",
        "X-Spam-Status": "No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-5.smtp.seeweb.it",
        "X-Virus-Scanned": "clamav-milter 1.0.9 at in-5.smtp.seeweb.it",
        "X-Virus-Status": "Clean",
        "Subject": "[LTP] [PATCH] sched_football: fix false failures on many-CPU systems",
        "X-BeenThere": "ltp@lists.linux.it",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux Test Project <ltp.lists.linux.it>",
        "List-Unsubscribe": "<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>",
        "List-Archive": "<http://lists.linux.it/pipermail/ltp/>",
        "List-Post": "<mailto:ltp@lists.linux.it>",
        "List-Help": "<mailto:ltp-request@lists.linux.it?subject=help>",
        "List-Subscribe": "<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>",
        "Cc": "somadas1@linux.ibm.com",
        "Errors-To": "ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it",
        "Sender": "\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"
    },
    "content": "Test logs attached — 40+ consecutive runs passing after fix on 80-CPU \nppc64le LPAR. ---\n From 3fc17dd06907785f5b1b65aebfe150c8ac73d54a Mon Sep 17 00:00:00 2001\nFrom: Soma Das <somadas1@linux.ibm.com>\nDate: Sun, 12 Apr 2026 13:13:08 +0000\nSubject: [PATCH] sched_football: fix false failures on many-CPU systems\nOn large SMP systems with CONFIG_RT_GROUP_SCHED=n, four independent\nissues cause false failures.\n1. RT throttling freezes all SCHED_FIFO threads simultaneously. On\nrelease, the kernel does not always reschedule the highest-priority\nthread first on every CPU, so offense briefly runs and increments\nthe_ball before defense is rescheduled. Fix by saving and disabling\nsched_rt_runtime_us in setup and restoring it in a new cleanup\ncallback.\n2. Offense and defense threads were unpinned, allowing the scheduler\nto migrate them freely. An offense thread could land on a CPU with\nno defense thread present and run unchecked. Fix by passing a CPU\nindex as the thread arg and calling sched_setaffinity() at thread\nstart. Pairs are distributed round-robin (i % ncpus) so each\noffense thread shares its CPU with a defense thread.\n3. game_over was never reset between iterations, causing all threads\nto exit immediately on reruns (-i N), making the test a no-op.\nFix by resetting both kickoff_flag and game_over at the top of\ndo_test().\n4. sched_setscheduler() failure for the referee was silently ignored.\nIf the call fails the test produces meaningless results. Fix by\nchecking the return value and calling tst_brk(TBROK) on failure.\nSigned-off-by: Soma Das <somadas1@linux.ibm.com>\n---\n.../func/sched_football/sched_football.c | 83 +++++++++++++++++--\n1 file changed, 78 insertions(+), 5 deletions(-)\nstatic int game_length = DEF_GAME_LENGTH;\nstatic tst_atomic_t kickoff_flag;\nstatic tst_atomic_t game_over;\n+/* saved before disabling RT throttling so cleanup can restore the \noriginal value */\n+static long saved_rt_runtime_us;\nstatic char *str_game_length;\nstatic char *str_players_per_team;\n@@ -77,9 +88,24 @@ void *thread_fan(void *arg LTP_ATTRIBUTE_UNUSED)\n}\n/* This is the defensive team. They're trying to block the offense */\n-void *thread_defense(void *arg LTP_ATTRIBUTE_UNUSED)\n+void *thread_defense(void *arg)\n{\n+ struct thread *t = (struct thread *)arg;\n+ int cpu = (int)(intptr_t)t->arg;\n+ cpu_set_t cpuset;\n+\nprctl(PR_SET_NAME, \"defense\", 0, 0, 0);\n+\n+ /*\n+ * Pin to the designated CPU. When fans (higher priority) temporarily\n+ * displace this thread, it re-occupies the same CPU immediately on fan\n+ * sleep — no cross-CPU migration delay that could let offense in.\n+ */\n+ CPU_ZERO(&cpuset);\n+ CPU_SET(cpu, &cpuset);\n+ if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0)\n+ tst_brk(TBROK | TERRNO, \"sched_setaffinity failed for defense on CPU \n%d\", cpu);\n+\npthread_barrier_wait(&start_barrier);\nwhile (!tst_atomic_load(&kickoff_flag))\n;\n@@ -92,9 +118,24 @@ void *thread_defense(void *arg LTP_ATTRIBUTE_UNUSED)\n}\n/* This is the offensive team. They're trying to move the ball */\n-void *thread_offense(void *arg LTP_ATTRIBUTE_UNUSED)\n+void *thread_offense(void *arg)\n{\n+ struct thread *t = (struct thread *)arg;\n+ int cpu = (int)(intptr_t)t->arg;\n+ cpu_set_t cpuset;\n+\nprctl(PR_SET_NAME, \"offense\", 0, 0, 0);\n+\n+ /*\n+ * Pin to the same CPU as the paired defense thread so there is\n+ * always a higher-priority defense thread locally available to\n+ * preempt this one without requiring cross-CPU migration.\n+ */\n+ CPU_ZERO(&cpuset);\n+ CPU_SET(cpu, &cpuset);\n+ if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0)\n+ tst_brk(TBROK | TERRNO, \"sched_setaffinity failed for offense on CPU \n%d\", cpu);\n+\npthread_barrier_wait(&start_barrier);\nwhile (!tst_atomic_load(&kickoff_flag))\nsched_yield();\n@@ -154,11 +195,15 @@ static void do_test(void)\n{\nstruct sched_param param;\nint priority;\n+ int ncpus;\nint i;\nif (players_per_team == 0)\nplayers_per_team = get_numcpus();\n+ /* actual CPU count used for affinity assignment, independent of \nplayers_per_team */\n+ ncpus = get_numcpus();\n+\ntst_res(TINFO, \"players_per_team: %d game_length: %d\",\nplayers_per_team, game_length);\n@@ -167,8 +212,13 @@ static void do_test(void)\n/* We're the ref, so set our priority right */\nparam.sched_priority = sched_get_priority_min(SCHED_FIFO) + 80;\n- sched_setscheduler(0, SCHED_FIFO, &param);\n+ /* fail loudly if we can't elevate to SCHED_FIFO — test results would \nbe meaningless */\n+ if (sched_setscheduler(0, SCHED_FIFO, &param) != 0)\n+ tst_brk(TBROK | TERRNO, \"sched_setscheduler(SCHED_FIFO) failed\");\n+\n+ /* Reset flags so the test is safe to re-run (e.g. with -i N) */\ntst_atomic_store(0, &kickoff_flag);\n+ tst_atomic_store(0, &game_over);\n/*\n* Start the offense\n@@ -177,15 +227,17 @@ static void do_test(void)\npriority = 15;\ntst_res(TINFO, \"Starting %d offense threads at priority %d\",\nplayers_per_team, priority);\n+ /* i % ncpus distributes threads round-robin across CPUs; the CPU index is\n+ * passed as the thread arg so offense and defense pairs share the same \nCPU */\nfor (i = 0; i < players_per_team; i++)\n- create_fifo_thread(thread_offense, NULL, priority);\n+ create_fifo_thread(thread_offense, (void *)(intptr_t)(i % ncpus), \npriority);\n/* Start the defense */\npriority = 30;\ntst_res(TINFO, \"Starting %d defense threads at priority %d\",\nplayers_per_team, priority);\nfor (i = 0; i < players_per_team; i++)\n- create_fifo_thread(thread_defense, NULL, priority);\n+ create_fifo_thread(thread_defense, (void *)(intptr_t)(i % ncpus), \npriority);\n/* Start the crazy fans*/\npriority = 50;\n@@ -203,6 +255,18 @@ static void do_setup(void)\n{\ntst_check_rt_group_sched_support();\n+ /* save current value so cleanup can restore it regardless of what it \nwas */\n+ SAFE_FILE_SCANF(\"/proc/sys/kernel/sched_rt_runtime_us\", \"%ld\",\n+ &saved_rt_runtime_us);\n+\n+ tst_res(TINFO,\n+ \"Disabling RT throttling (sched_rt_runtime_us was %ld, setting to -1) \"\n+ \"to prevent bandwidth exhaustion that violates SCHED_FIFO priority \"\n+ \"ordering on many-CPU systems\",\n+ saved_rt_runtime_us);\n+\n+ SAFE_FILE_PRINTF(\"/proc/sys/kernel/sched_rt_runtime_us\", \"%ld\", -1L);\n+\nif (tst_parse_int(str_game_length, &game_length, 1, INT_MAX))\ntst_brk(TBROK, \"Invalid game length '%s'\", str_game_length);\n@@ -210,9 +274,18 @@ static void do_setup(void)\ntst_brk(TBROK, \"Invalid number of players '%s'\", str_players_per_team);\n}\n+static void do_cleanup(void)\n+{\n+ tst_res(TINFO, \"Restoring RT throttling (sched_rt_runtime_us = %ld)\",\n+ saved_rt_runtime_us);\n+ SAFE_FILE_PRINTF(\"/proc/sys/kernel/sched_rt_runtime_us\", \"%ld\",\n+ saved_rt_runtime_us);\n+}\n+\nstatic struct tst_test test = {\n.test_all = do_test,\n.setup = do_setup,\n+ .cleanup = do_cleanup,\n.needs_root = 1,\n.options = (struct tst_option[]) {\n{\"l:\", &str_game_length, \"Game length in sec (default: \"",
    "diff": "diff --git a/testcases/realtime/func/sched_football/sched_football.c \nb/testcases/realtime/func/sched_football/sched_football.c\nindex 2cb85322d..43bac9468 100644\n--- a/testcases/realtime/func/sched_football/sched_football.c\n+++ b/testcases/realtime/func/sched_football/sched_football.c\n@@ -3,6 +3,15 @@\n* Copyright © International Business Machines Corp., 2007, 2008\n* Copyright (c) 2024 Petr Vorel <pvorel@suse.cz>\n* Author: John Stultz <jstultz@google.com>\n+ *\n+ * On many-CPU systems with CONFIG_RT_GROUP_SCHED=n, the global RT\n+ * bandwidth limit (sched_rt_runtime_us, default 950000/1000000)\n+ * periodically freezes *all* SCHED_FIFO tasks together and then\n+ * releases them together. During the release window the kernel does\n+ * not always re-pick defense first on every CPU, so lower-priority\n+ * offense threads briefly get scheduled and bump the_ball, breaking\n+ * the invariant the test checks. Disable RT throttling for the\n+ * duration of the test and restore it in cleanup.\n*/\n/*\\\n@@ -46,6 +55,8 @@ static int players_per_team = 0;\n",
    "prefixes": []
}