From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=40.107.193.109 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796137592; b=YS/AZ7pfRlmAuffu6h1bLDIWz7KJSAoc1ek06357QUbpBmN/H5JN69ScV/v1yMtP56ny Hy5E+vA+cWQhfdNBF9q1koxUV0Wzo+UsfVZmO4V1ocqfuhSmcqQGTSUrFQ1IHWlM4toA0 McJ9o09r4kJsr3PSLmbiijIzH/qB5TbV/7WV77yDY2cBkxll/RcPx2Hs+InDkiYZI/4rp jzulOcpg8oHibkpeCcg2aKvPXC9wEF4eK2Rciz0Zwqism3o9ZS/ARTZBKrtjOVgmTSNj9 U0FLYiSlDlyswMyHsbEsX96j5eqVQfnFQ4IXCR0usRD2ljinroIMKVveZbGgCY9UU5w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796137592; h=DMARC-Filter:DKIM-Signature:Received:Received:Message-ID:Date: User-Agent:Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=8mguk/ENmK3affSLfmm4lbsj+g4Eo7d9gdXYQgAZ1IE=; b=lNSvgGI+TGZkvICGZRYusrNlu/rx26ps0Qh30eK2uQ1XUir7wJtvDlzP+Jo0+geHxeyQ FMczXoqeAAAZfoueZgQwWf0p49faGWupzwVie0UB1cLy/Qy0IUNU0l3j9kN9t458USobH ki2lpMBMWKF5ibrbdwJALq+0WpX0km0vYJ/HjRk4nxlDhaNrn0txYtkNmgT8Qh+wpk5Z8 FBAyNr+f5tBhNfwwH1b8u0pNy0lE2iayYoJHWT70R6xUqNBsZc6i8Qd4wSS2+KZx8E/9M dlhLM+qIoFwMYmwq4lyXr4/leZEfAk8KLw6mSE/kzNKqYa8xtHVau0NdNoD+PXVSSfA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=selector1 header.b=JaemHMsB; arc=pass header.oldest-pass=0 smtp.remote-ip=40.107.193.109 Received: from YT6PR01CU002.outbound.protection.outlook.com (mail-canadacentralazon11022109.outbound.protection.outlook.com [40.107.193.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB6B0606A31A; Tue, 1 Dec 2026 15:06:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DB6B0606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=selector1 header.b=JaemHMsB ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=A5V9txAUnx9ob5vhM/yF1FsHUM5Xe67ExvnyQY5a1ejB1n4vitpvEHIH+Hxe1c6erkwWBrFl1heqgyTCtBn+lqoCMTCU6ux/EgYyiwI+pTC232HSVq3ndyTDGoGwQrhKsTjVz5RkUYIrQ1uRKzeFHVa23dM/oYd6KQ/BUh+eXSM3xC9wUiRqq4w62RApbb6HMggz+jabW6Wf2EY485Q8uiWOTCXXl53dNaxM0mLTmQ29VXfRNqZv2KERovgoKge3CkmlCIf0Y5hfplDiNLhbsuDXBeM7EUW20GHIMmXJbAoh5q2qw/Uqv3Fk0tVIgcfUc7jmMj7u3czlyXdsCqnzYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8mguk/ENmK3affSLfmm4lbsj+g4Eo7d9gdXYQgAZ1IE=; b=SP2w5mhcNzAhleADnpPFFhodfZGJQ1BA/NZInt9G5Xf2KkCfBMy9aAuIGMopZ6Lxhuz0WDSNw7DRKiyS5NjGB3Z6wuFA9rsmvt4/acNaFDGuVBUlORcr+/u98wCOCNkMRQznA6l7IMrQV5F0DzTjlc58VUMa4JJV/cZhy4P3jYWFNNpzcyfLAoHIi+ZY0wGMDbP4CRz4C+5XnfMDXnujlqp4mvQbfS7R3HhzAea/miiZUCO8ViHrtK2O0SwQy7EWldlWo09Vt7gY41UvdlZtOYYdQVnGC9Js4UaTjrLLEByMt9MzD378zGPaJJz7UeBF2gtqCjYielOwSkv3l9eATg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=efficios.com; dmarc=pass action=none header.from=efficios.com; dkim=pass header.d=efficios.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8mguk/ENmK3affSLfmm4lbsj+g4Eo7d9gdXYQgAZ1IE=; b=JaemHMsBVyQmcbLHCR8Vs1rUqPOyPLb5m+cqDrz7BZ2Nd2WxpkRQ82Br3iPijjf5BeBjvbbXvLVyUrHP9Hk6Umw3tOzLSGy3uo1zQ3bDRo19kXIEL92xhoEbWE+uonn655rpZpuCHAq5gpjmqIOlJ6kIlFDPFU1w5XcKdpRK1wPFh+78yK8wOiESoPvHUAUz/efBTd5ua07zm9DIeC9PUQCVFWZPRW2arj7we7w7Id8hbCDeMLpG8IOlrjYiioDgCTLMcBpcoyw94VW+mnYmDW5ETMrjxBpEDIzuM4KKH//2oujPzesnqAbfB2BSjs39oS2BIRnwDqfWk00bloYPsA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=efficios.com; Received: from YT6PR01MB491026.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:1d0::10) by YT5PR01MB943537.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:1b8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Tue, 1 Dec 2026 15:06:28 +0000 Received: from YT6PR01MB491026.CANPRD01.PROD.OUTLOOK.COM ([fe80::6b9e:a901:67c5:7ddc]) by YT6PR01MB491026.CANPRD01.PROD.OUTLOOK.COM ([fe80::6b9e:a901:67c5:7ddc%6]) with mapi id 15.21.0688.009; Tue, 1 Dec 2026 15:06:27 +0000 Message-ID: Date: Tue, 1 Dec 2026 10:06:26 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 00/43] sched/deadline: bandwidth accounting fixes and selftests To: Juri Lelli Cc: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, tglx@kernel.org, will@kernel.org, boqun@kernel.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, luca.abeni@santannapisa.it, tommaso.cucinotta@gmail.com, mathieu.poirier@linaro.org, longman@redhat.com, ridong.chen@linux.dev, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com, shuah@kernel.org, bigeasy@linutronix.de, clrkwllms@kernel.org, parri.andrea@gmail.com, m.szyprowski@samsung.com, kayracizmeci@gmail.com, weihengqiuu@gmail.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rt-devel@lists.linux.dev References: From: Mathieu Desnoyers Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YQZPR01CA0015.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:85::20) To YT6PR01MB491026.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:1d0::10) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: YT6PR01MB491026:EE_|YT5PR01MB943537:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fd04138-7088-4c0f-10ba-08df4fbcac89 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|23010399003|1800799024|376014|7416014|22082099003|18002099003|10067099003|56012099006|261028144727099003|261102123227099003|261026140227099003|261026121527099003|261021123027099003|261021121427099003|261022075727099003|261022105027099003|261009223027099003|4143699003|6133799003|3023799007; X-Microsoft-Antispam-Message-Info: PPGRsHJXWy8coXBtO9hYOlJoe74BiYqUCUPrdROcaJ+jN2CmVbD06xjwF2R7Qi36xnHFM62UG9GjoKA8PmwIRgIs5zX7TnQVa0ohvcUSCBaMgZgTTinigioGfo96fHqeelP8YNhbK8B1iH5gRtVYLP0wpwcj+yGMSVeNCOajZg/ZWwPFdBxJaSOdM0O0Wykdk4iP+tdE++ckQIaSrD6WaRHd0MHyYE6x73/SYYEGiJyrVMV7bqgnmIrR+InypxdP+i9BUpgYRCcUE2oSVyfdtDEGG8qug2MWCQ99eQRBqwubLr8n/uIjcgaiNw5l5PODrxnWMZdG1ZRtBArBCZVsjo0EY2puBUB6vcvuh3bDSRf5uuHbJSrC0K+PEI6TVKHUuLEGs4IvIZzlvK6cSzE0hcIpx50fLeXmN93pU40ySREXGSUKQALx31iuTReEM9iylsjSFQL8TA8wOOAr5zPgzbzybWw65WWHHcvzGCuu+OPKXe9t251UiOZQRQay9AO2UKx7NFeyVgVLXG7bteGb/GEL/iXxG4CH7A0TJp3t/vPOLO1FDjD28GKmWIqgKSC89DE0iVs7Z+6OW+CKTzXHCprY7uYeeOB8n7vxCmBH8U8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:YT6PR01MB491026.CANPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(23010399003)(1800799024)(376014)(7416014)(22082099003)(18002099003)(10067099003)(56012099006)(261028144727099003)(261102123227099003)(261026140227099003)(261026121527099003)(261021123027099003)(261021121427099003)(261022075727099003)(261022105027099003)(261009223027099003)(4143699003)(6133799003)(3023799007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eDUxMFNuZDVyRVVvazYzc1Q2Rmc3L2FKTlMreTJhaXdkMlE2OW9wcm1GSUxD?= =?utf-8?B?bjQyUys2aVZxS3Q0ZU1QZ2QwTTM0MjlxRDh2UjJpa0Zma2NtUGo4bFBIYlJs?= =?utf-8?B?R2hnc1BsTDU0RUVES2h0RWsva3JjbGpETlk4WlNMN1FEdGNMNkhH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ZGdTeGM4azFyUzRMOTUvSTk4dGVLL0poeFFiMnVG?= =?utf-8?B?V0FkS0JsR1hkdXRRTCt1ZjJrZVJlNGx1aFE5VVk2VnA2QkFMeTM0UlBqWkJr?= =?utf-8?B?N3N1SWtMNU5sWXZLaUZ4TGxzcFVSRktOTjYrdjhwS0xzbHBSdlJCZjZRK1Bw?= =?utf-8?B?WjBPcGc2TkZwek55d2lHNm9MN0NJWUp6eWF6TUZYSXNDQVI2Nmx5T1RpbFRp?= =?utf-8?B?cEQ5RkdjNUhhaGRPUkNqN3lJdkM5VG5ZUzFSSjJheVdFVitKYkI4c0dYa3lo?= =?utf-8?B?bGVNRDJYaVlSZVhHUnovR2hwb3B5eEx5UkR6M0FtNjd6bUxtYzI5MkNNbEx0?= =?utf-8?B?Ti9Wd0NPbktXZUNhM0lXNmRiaElyMGRVUTNKdDNtWW9rUWZxWDJmM1BiZHpt?= =?utf-8?Q?Wn/nGCkSpv7F3xK0=3D?= X-OriginatorOrg: efficios.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fd04138-7088-4c0f-10ba-08df4fbcac89 X-MS-Exchange-CrossTenant-AuthSource: YT6PR01MB491026.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 15:06:27.8074 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4f278736-4ab6-415c-957e-1f55336bd31e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rdyHImwC4KRtd5XVnMYvtrBOpu1lsvAyVeuY6wqf0Bjt2suj/ohKJzpTxuGRsstsMRtbLYwWuRIT5302NJOK2eRPXCxZVwm4Sm8QZVMQV28= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT5PR01MB943537 On 2026-11-30 12:15, Juri Lelli wrote: > To set expectations: I have roughly a week's worth of work left before > the holiday break :)), and I'll probably spend it on what looks highest > priority, the crash and hang fixes (23, 27, and 20 with them) plus 25 > and 26 for the first series. Thanks, that helps. v13 starts with the five patches of your list. They come in your order: 23, 27, 20, 25 and 26. They apply on the first series alone. > The rtmutex/PI part makes me a bit nervous. Beyond the memory safety and > hang fixes, it grows DEADLINE PI quite a bit (held boosts, donor > periods, an irq_work calling rt_mutex_setprio() from hard irq context), > while proxy execution is meant to replace this code. I'd rather keep > changes there to what is needed for correctness and weigh the rest > against that, and it will need Peter's and Thomas' eyes anyway. Understood. The rtmutex and PI changes move out of v13, into a new PI series for Peter and Thomas. I will post it next, on top of v13. 40 moves with them, since it must come after 38 and 39. One test case of the PI series also needs 22, which goes to my rtmutex series (see below). Of the PI changes, v13 keeps only 23 and 27, the memory safety and hang fixes. Each fix that moves out fixes a bug. Its message names the test case, reproducer, model or reading that shows it. The bugs are of these kinds: - A task runs on more than its reservation. Other deadline tasks can then miss their deadlines (28, the part of 37 for a boosted task, 40 and 41). - A deadline waiter waits for the next period of an owner that cannot run, and can miss its deadline (38 and 39). - A waiter with a deadline of 0, or one that has passed, takes the lock before waiters with earlier deadlines (30 and 32). - this_bw or total_bw counts a boosted task wrongly. A warning fires, or sched_setattr() refuses a task that fits (29 and 31). - In a lock cycle, rt_mutex_setprio() can make a task with no deadline policy its own donor. The task would then not run again until its priority changes (part of 38). - A chain walk stops too early. The owner at the end of the chain keeps an old donor, with a later deadline, while a deadline task waits for it (21). The held boosts and the donor periods are what the fixes of 28 and 38 need. The irq_work is what 39 needs. The code that throttles the owner holds the rq lock. rt_mutex_setprio() needs the owner's pi_lock, which nests outside the rq lock. If you or Peter would rather leave some of these bugs to proxy execution, I will drop those patches. > 22 also > looks like an old RT priority bug that might be worth sending out > separately? Yes. It does not need deadline tasks. With SCHED_FIFO waiters, an owner further down the chain keeps the old RT priority. I will move it to my series "locking/rtmutex: priority inheritance fixes and tests", with a SCHED_FIFO test case. > On the accounting side, I've been playing with a different approach: > keep the bandwidth of each task in a per-CPU sum (on the CPU recorded > with it), so that a rebuild only sums the CPUs of each root domain. [...] > It's > still WIP; I'll try to post it as an RFC, most likely in January, so > that we can compare, if you are up for it? Yes, I am. The test cases of deadline_bw_test and deadline_rebuild_test should help to compare the two. v13 adds three fixes that are more cases to compare. They are in the departed list and the rebuild: - v13 patch 31: a task leaves the class while a rebuild walks the task list. - v13 patch 32: a boost brings a departed task back into the class, after a rebuild dropped its bandwidth. - v13 patch 33: a task is reaped before its last schedule. In each case, total_bw would miss the bandwidth of the task for a while. Admission control could then accept too much. Reading the code and a Spin model of the accounting found them. v13 patch 35 adds test cases for the first two. > > Ingo, Juri, a question on patches 25 and 26. Would you rather have > > them in the first series, after its patch 10? > > Either way works for me, as long as they come right after it: as I said > on 25, at the top of the next version (with 23 and 27) is fine too. I > think 26 first needs a fix for the race Sashiko reported (its first two > findings on 26 look right to me). I agree, and v13 fixes both, in its patch 5. In both, the handler of the inactive timer is running, so the timer cannot be canceled: - The first finding: the new flag dl_inactive_pending tells whether the handler will still release the bandwidth or restart the timer. If it will, task_non_contending() leaves the task to the handler. - The second finding: the restarted timer can fire after the task came back to the class. The next task_non_contending() cancels it, as in v12. If the timer fires before that, the handler now leaves the task alone, since dl_non_contending is clear. This also fixes the third finding, the bandwidth left in running_bw and this_bw at exit. 26 no longer calls dl_task_depart(), so it needs none of 1 to 19. With the fix of the first finding, 26 leaves some departing tasks to the timer handler. 1 adds the departed list. It now comes after 26, as v13 patch 6, and puts these tasks on the list. > > Peter, Juri, a question on patch 37. Would you take a follow-up for > > tasks with an implicit deadline? > > I think so, it's what the XXX in sched_dl_overflow() asks for. Thanks. v13 does not include it. > > Peter, Juri, a question on patch 37. It is large: it adds about 600 > > lines. [...] Would you like it split? > > I'd find it easier to review split, yes. The period_start / > dl_next_period() part, for instance, looks like it could stand alone. OK, v13 splits it, as patches 28 and 29. But dl_next_period() cannot count from period_start in the first patch. That change alone makes three cases of deadline_bw_test fail: wake_after_deadline_shrunk, period_shrunk_no_burst and constrained_after_job. In each, the task has run in its period when sched_setattr() lowers dl_deadline. The job that ran counts as a job of the new parameters, released at deadline - dl_deadline. Its next period starts one dl_period later. The deadline still comes from the old dl_deadline, so this is later than period_start + dl_period. The rule that keeps the debt gives this later start. Today's formula, deadline - dl_deadline + dl_period, happens to give it too. So the first patch only records period_start. The second applies the rule, and computes dl_next_period() from period_start. The part for a boosted task goes to the PI series, since it builds on the held boost. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com