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=1796223272; b=FoEey0/L3Jz+CgRJGiRWc9W9Sn5BepQzvc73GvhLG0BV4GEwK9nza+rcuXOKyGZP0G+s ISCMUJGBOVQoII+iBOWbeu03d+SiNadH/nfSywpKal+AX5LSsyqZaJe7BxqgF5+Ldjv9Z 4MzAEB01QqyQEdx3y97Mqn5WVZl7Pxovpw5ZcIE3K4rqERu9d16ltotnMdgM5qlWOEtu+ GZFpAqblKfh2ue6LFKcbzBcnpVjhvvFDgSXMe6Je/uGx2N9SBHy0GKBztivhjYq91HCS6 cPv3pDozg6Wu7y/shJzhCAfsJ0KBQz+/TWRi9CrjJLkgdGDawRdfXSmUTR2csdAjVOQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796223272; 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=9+4G+HH7y41Hnkh4cmjh/96mlRkk4f5SaPa9G/vkF/Q=; b=RTXK9+UAIpxftgBOhqYtO9IqBrNszkHG6W8bRC6czv5oyA91R6oxoXQ+3j3WYlBsu2pd FRcOQUS6sy9Dc0zoFQ3Nl1CsRyJ2Sp2FJixmkEShOm2cTB6ncdZb+687n7eMxnzBUk6vc M++oPthMX/xqW4yi2bufR1f6U64p+h5El/HlWAPvb9Apjt+pJSbjTHv7yRpdW8ZykmYyQ AiqzNFEP90BMsWrY6XyxN1RG+HT/XoYmwrC9UDdxF4iB+cgkIs4BZK4Ytgwh3yWsxtYd5 yEJR/Kg1mq9DU/kyix7q3sMqvDsg224QVeO61Z/gEqBDqwlR1otNBtq8gylqTMnJVTw== 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=wrLYNG38; 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) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42CE0606A325; Wed, 2 Dec 2026 14:54:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 42CE0606A325 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=wrLYNG38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=smtpout1; t=1796223270; bh=9+4G+HH7y41Hnkh4cmjh/96mlRkk4f5SaPa9G/vkF/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wrLYNG38fm3+lxnoD/s2SLj4lwul0T58oYeU7M4wYwGxozFgcO6t/mPEbNbsfomD0 0LtUldkjrCFDHeeX+FzXDjz4lcsOiKKpmbZimWb/ZZcbQF7fD5HoicPVs8cvgKcoGh hmhmSEMfgelvYy0mqT84Edpq4iwLRlZYuTzKL4ifYU2KjSDPEZWP6EAiSeQR8LHwqt vQtS5sqMxYEnijlEJSFiqsYYcQYDJ9005jlqsztd6/Y1wwBaDVm4BEsNnmAYWthuaX KIiDlvwapNbKq5Xmbi9L7/6Jc7G/dOuQnQ3ANqGRbKkrGU0lS1EIZYdA3hekxyz+34 ZfNw0dyutaxyg== Received: from thinkos.internal.efficios.com (mtl.efficios.com [216.120.195.104]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4jfglB0YFRzYXp; Wed, 02 Dec 2026 09:54:30 -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 v13 05/36] sched/deadline: Keep a departing constrained task until its next period Date: Wed, 2 Dec 2026 09:54:18 -0500 Message-ID: <20261202145428.341797-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: <835511935d961be832cbaf24e902762d1926e611.1796146461.git.mathieu.desnoyers@efficios.com> X-Mailing-List: linux-rt-devel@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > Can a throttled constrained task that leaves SCHED_DEADLINE end up keeping > its bandwidth and deadline for an extra unused period? Yes. At the end of the period, dl_task_timer() replenishes the departed task, and starts its next period. The task then keeps its bandwidth until the end of that period. That is too long, but safe: a task that comes back before its new deadline runs in that period. Sashiko found the same case in its v12 review of "sched/deadline: Cancel the replenishment timer with the parameters". v14 will leave it as it is. > Can inactive_task_timer() release a departing task's bandwidth before its > 0-lag time when task_non_contending() takes the pending early return? Yes. The handler can wait for the rq lock while the task wakes up, runs in a new period and leaves the class. It then acts on a time computed from the old period. This is not new: v7.4-rc2 also releases the bandwidth at once in this window. In v14, the handler will compute the 0-lag time again. For a constrained task, it will also compute the next period again, and wait for the later of the two. It will call dl_next_period() only when dl_se->deadline is not 0, as task_non_contending() does. Thanks, Mathieu