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=1796223272; b=of4yBvyQjF46BwEkblgbKMgmTWUIuLAGCoFTzs2Z/zPi61dLz2NNyFrzRRaLwawjK6UH Hqnfd606ZuyvgNNo8jcT8SVWdT43cpvZXcRoRyv3PxfS1FqT75HptompEowso/n1q7hbq c+xELD2H498vgiAhR63dtWM3SbpShIDmBoK6rBKnrUUyF0vOSNmoHDOAdRr6ZEzPTgQPQ O/Yw/502grv7N8Eemi0wikCgfChFIyo543zQRAJf5Dqw1M/0kUHTk5WVUs7oO0luiZk5S k7CMyOmYr9Uwc3Jc/VxlgQkkCWKfCd0u3Sqh2OnEh2RAO1IDEsUgnPnUX0KaJXeIKMg== 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=anPHuVV7LImCgvBFWSElUl7zPHfoC/+sCzRaRlJ4Gk6BPlSK4TwfUgoPfLfqfhVccpNI mCvP5EY5Ua0+/BFbyrgyyU/bOtBjn3ibunkZIoTU/+JusvWwZcsYpfuOML9w5Gex3G72G TjmHCKcN2V4PBLd0H1wvXpX0Tro5EBeGLca95DfoK7m4BTG4oZJfsi6ESM6UA+/LYFsnE eH7MwFPhSGOFFKW0QfTcZpI5ojZRTvu//xbX1iEkzUZ9XvubtbzYHT/MoGDgF+aAGHy4/ LxtNv2ggIzOI6jspKEmJY3VpJWH4i4jLspCNbVaNQ6oepZ8SG0+8TFRHsuHgjYrDIFw== 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 42B78606A31A for ; Wed, 2 Dec 2026 14:54:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 42B78606A31A 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-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 > 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