From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=158.69.130.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796141948; b=TZh0P2NHTn2iKaQYRy194fsbYM5iAQA10fDYQohr0e5FseHxSYOtDUT930QCskUw/qk1 DR2SZPwgePQepIx0vhLxUqm/o5WEz/TT0FSn+v7+piwuLC9HFIYcYvuTedwaddfEDPJq4 /CPrR8VtAgeGceMKV9qRGgQ4AkPO04yihheiw/quI5HsHIgB7kvscvqzAnahc9VnHd3xm tVP5WcJtlouwW5GWYS3/xtI+CNYcs8CQcv+ZxyvyfyzN2Z9nhpIXIfFKs90rVnHlUoJGT mAqd5SUrPTQY4N4l5ZzmMrtKeujmaP0cCAo+B7xhMYCaW4Fc2OBHiX7GuXC/U027ddA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796141948; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=c9PPSI/hjYIe1mKsH/5L4SIaw++uD1BjrGXzxjROdVU=; b=XT+9RH3yZFVTNpKwDlk9mn8FVmEzeq7pRctTrKp/Z85oqFeOf7BXuQPUlWBsj8JxuVda Up5DKqRO1i0lZ/kYZh3NAIUKC6gkyf9cNzWX/XPNZ+yp12UUjk8pbvmyecYLec0Yytx7U KUQv2JSa0tMfrNAa8jSLZ5hcFY0Q+AcpJL8dtjnZYQ2GBjbY1V1aUGc/nYSK1CuWHh50b 3rflo6ZFVAm4tcA8TBMTArNMJ193wg5uLVOD5/81epUfNU4k4e7v+xPWOF0CGxr+szXhE sXr4vBnJHJm+G4Q8tr5POYUGOgqPdNOP5AwmY3Q4PG3nQfd4g/48zKjCipfm3IbxdDA== ARC-Authentication-Results: i=1; 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=smtpout1 header.b=V97bXqki; arc=none smtp.remote-ip=158.69.130.18 Received: from smtpout.efficios.com (smtpout.efficios.com [158.69.130.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EDF560A260A for ; Tue, 1 Dec 2026 16:19:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4EDF560A260A 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) header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=smtpout1 header.b=V97bXqki DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=smtpout1; t=1796141941; bh=c9PPSI/hjYIe1mKsH/5L4SIaw++uD1BjrGXzxjROdVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V97bXqki1Rua23oVmICZxOouLtedxwRPowbUfN6/4BgjT6E7gYWG5sJ/dMrLvUIrM MA4tNBLU53D1SWpIqohZEYIqdswvPllCrSnKDK5CqnNmNjmvV8pZGX7YOBoaLS3r3y Bkn6rm6L6UYysR2kYjp8NBnKGoQZ1N5dbI61mzn1onFQwHxXr69U1Dk7TCmUbt0opQ hxvcQLW72mFmlTt8fhMSBWfj+s3oC73c1yT1jmzgkIBNFnXRMLV0hDO1c1Fn9ufS4r T/qKbjnphfPn5Ht4SdALjyo2Eyv8xVbZUYxjt7IoMn8o6+Qicy9AgnNbfBWgAaqDbF V+h85hKdhi6xw== Received: from thinkos.internal.efficios.com (mtl.efficios.com [216.120.195.104]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4jf5g93LJwzYw1; Tue, 01 Dec 2026 11:19:01 -0500 (EST) From: Mathieu Desnoyers To: sashiko-reviews@lists.linux.dev Cc: Mathieu Desnoyers , linux-rt-devel@lists.linux.dev, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v12 38/43] sched/deadline: Boost an owner that cannot run on its own reservation Date: Tue, 1 Dec 2026 11:18:56 -0500 Message-ID: <20261201161900.284450-11-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: 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 Content-Transfer-Encoding: 8bit > When a new top waiter with an earlier deadline replaces old_donor during > a held boost (p->dl.dl_boost_held == 1 and old_donor != &p->dl), does > rt_mutex_setprio() leave p->dl.deadline at the previous donor's later > deadline? Yes, in v12. The PI series, which will follow v13, adds dl_boost_check_donor(). rt_mutex_setprio() calls it. When the new donor has other parameters than those the period was placed with, it fits the period to the new donor at once. It uses the rules that sched_setattr() uses for a change of parameters. The new case pi_owner_swap_donor tests this. A new donor with the same parameters keeps the period. A new period at each change of donor would give the owner one donor runtime per change. > Can dl_deboost() fail to re-throttle a sleeping task whose held boost ends > before its own next period? It can, but the task keeps its negative runtime at its wakeup. dl_entity_overflow() does not count a negative runtime as an overflow. So update_dl_entity() keeps the runtime and the deadline of the task. enqueue_dl_entity() then throttles the task until its next period, since it has no runtime left. Patch 31, "sched/deadline: Restore the owner's period at a deboost out of the class", adds that throttle. In v13, the throttle will be in "sched/deadline: Keep the debt of a task across a change of parameters". > Can an unboosted owner whose deadline has passed outside its constrained > gap be left with its stale past deadline when boosted while not queued? Yes, as on v7.4-rc2. An owner that sleeps outside an rt_mutex gets a period of the donor at its wakeup. An owner blocked on another rt_mutex keeps its passed deadline in its waiter node. The PI series will list this as a known limit: a waiter keeps the deadline it blocked with. > Can dl_boost_donor_period() place dl_se->deadline far past the new donor's > deadline when resuming a period across different donors? Yes, in v12. In the PI series, dl_boost_donor_period() will no longer take the saved period as it is. It will fit it to the current donor, by the same rules. For that, the saved period records the parameters of its donor. The PI series also removes boost_deadline, which nothing reads. The new case pi_owner_reboost_periods tests a donor that changes its period at each wait. > Should dl_waiter_boosts() and dl_boost_start() use matching conditions for > dl_se->runtime <= 0? Yes. In the PI series, both will use the new dl_cannot_run_own(). It is true for a task that is throttled, in its constrained gap, or out of runtime with its deadline still ahead. A task with no runtime and a passed deadline is compared at now + dl_deadline, as other owners past their deadline are. So a sleeping owner deboosted after its own next period is not boosted again at once. For an owner with no runtime left before its own deadline, dl_boost_start() holds the boost and runs it on a period of the donor. > Does skipping dl_boost_start(&p->dl) here and when !dl_prio(p->normal_prio) > in rt_mutex_setprio() miss holding the boost for a task that left > SCHED_DEADLINE while throttled or in its constrained gap? Yes. Such a task gets its boost held only at its first refill, in dl_hold_refilled_boost(). That function saves a negative runtime as 0. So the overrun of the task is forgiven, and its 0-lag time comes earlier. A blocked task keeps its deadline in its waiter node, as in the third answer. The PI series will leave both as they are. Its cover will list them as known limits. Thanks, Mathieu