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=1796141947; b=t4NlwXnpXCptrRMOZt0d0fjnwUwTWbGiv/g6HLnOAS/xGT+UhguEeabv5wINV+UyDAe/ afDIizWqlwlUBz9G38YDwAtZ9sRu6TTlAc6cTr7c1D16ugYGlvmVbX/aZKs9vgJeoNEQp DBWswVyIO3PWClB7+KvCiV6qkIW/SQQzcW3k4cs0s54JbQbngaSQMD6wNmN4RGWPXsOKL yi1kxMOYP47wMZfzQlEzRILY9Fk8CyxQlSpX6lNU2TrY8m/RLfVCMjTCYUOEwBUHxJ16v lrvboXUfacj+mwiSJxquqbJz+Jp5qvhskew9aoiHBloyKgvR0cax3TLruo8GrKUkLcg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796141947; 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=Q8TCiINgaylp1eg77KTDTKVmJczsPUaLxJBM3uvHECo=; b=rnJHiql3LXyHJxmT1RJapPKeSCbETP8ivQorQru6/YVT54osILNY/6IXZgq9AeMKAqGA ihrwh01J+ZpAFuJwt9chb3AnrW+8aNaUoyIbGEUgl4YOEqTjBwIXUZDwO05R3+o3Ot5VV h97vq+sxU7CkwNuf+FmmvqVaP0ETe1MOk6Zka76eF8LK1Px3T0wMqE9Js9SgFWcuBHsL/ 7cyXoCZA5D1vXAsy16tghYNQUaHKIgzcycVaLgF91Cmug4hc0NZZAa6kk4QgFEZVSlpHj WbECNTU4zgUK+xoiZHwjhFCh8vqYxaKpBYHWOCYHNRnMk/4r7kTFd0m9vpYzhH0eH9Q== 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=uYkmKo+Z; 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 D7253606A68F for ; Tue, 1 Dec 2026 16:19:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7253606A68F 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=uYkmKo+Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=smtpout1; t=1796141940; bh=Q8TCiINgaylp1eg77KTDTKVmJczsPUaLxJBM3uvHECo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uYkmKo+ZcqPZpgjOWndzz8vEizUgaz27IvUtjPW2UOvcCMuA5bYSjhfK8scWc6cMV cSRikSVDCBUNOdo4o3I396niE3eqMhMKbnUa0xZLWkx8JRH6Wpv/tIXbxQl/VSf9E3 WHVYj8CaYLVPdF9XnYxYe1SdydCOVUcRmXib9N4ssdk7altHXZxfGYa+5+2V3Y7G1j I/BlIrRUUKXbbFQ1f4BfwAjspi44Kn2B69+RRTNQharf+kzgKWOa8rMKJStTrTyCVO CN/8w1oCVZDFxE6JdrdBiYojUPZT94Cu3yvhbtarQYoRaiR2E020KPs5m0MLqSsFro OPz+DnBAD0h0w== Received: from thinkos.internal.efficios.com (mtl.efficios.com [216.120.195.104]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4jf5g82QWqzXZ0; Tue, 01 Dec 2026 11:19:00 -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 01/43] sched/deadline: Keep departing bandwidth across a root domain rebuild Date: Tue, 1 Dec 2026 11:18:46 -0500 Message-ID: <20261201161900.284450-1-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 > Can dl_clear_root_domains() charge departing bandwidth to the wrong root > domain and underflow cpu_rq(cpu)->dl.extra_bw when dl_departed_cpu is > moved into a new child cpuset partition root before the 0-lag timer > fires? Yes, until the 0-lag time of the departed tasks. Until then, the new root domain counts their bandwidth. It can refuse tasks with EBUSY, and extra_bw of the recorded CPU can underflow. The root domain of top_cpuset does not count them, so it can admit tasks before that bandwidth is free. At the 0-lag time, each release removes the bandwidth from the root domain that counted it. The accounting is then exact again. On v7.4-rc2, the rebuild drops that bandwidth from every root domain, and the release removes it a second time. v13 does not fix it. Its cover will list it as a known limit. > When a departed task returns to SCHED_DEADLINE in the same root domain > before its 0-lag timer fires, doesn't releasing p->dl.dl_bw after dropping > dl_b->lock transiently double-count the task's old and new bandwidth in > dl_b->total_bw and rq->dl.extra_bw? Yes, for a short time. sched_dl_overflow() adds the new bandwidth under dl_b->lock. Then dl_task_release_bw() takes that lock again, and removes the old bandwidth. The release cannot run under the first lock: dl_departed_lock is taken before any dl_bw lock. The double count errs on the safe side. A check that runs meanwhile can refuse with EBUSY. The admission check also passes old_bw = 0 for a task that comes back, as on v7.4-rc2. It does not subtract the bandwidth that the task still holds. So a task that comes back before its 0-lag time can get EBUSY in a full root domain. v13 leaves both cases as they are. Its cover will list them as a known limit. Thanks, Mathieu