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=1796223273; b=GM04wzLV+p1cdpCc/h442fWRbYAGJbiUv5R3LB3mo3ka5/BDq+BgnOUwKwWiH0cN5MZy 6H6AMytDNZ1HTpqTQkODyTTGHFTdw2dXt3g12f234PQsIjRBhvloReOOa43Fzij9ZbEjU +ROqDeXlxSJlZaPgCgwxXZXGs1IpN53F2cyJIdI8cmwMDWyjn0rrqAazPHgixZYqHW57t 9z4NbN+j6krBhL6R6u8nKBHWwPuZJ3ctTIOaAO6Uiy/kw6kGS3p5EaTr6trTXRGIxVlSP lzLcTL1VI+wGKrFRv1hIPxgPeMtwMDbhIKxxQ+zMCbvrn/9rsV7ZovhNgn+OaW8yhgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796223273; 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=NY1YGiK17OXUS6E4wmmIP26yS5vShMwuEcSgqqL6UcE=; b=bHYXcFD/CoCMta2395z7XQgi9wW0FD4+m1qrEHNRRHPUi4mMvi20QDJjnWhZFpd0G7Tq lh5wqXFdfpIhuKVBRvQYYsB78v936Usd3Yl7EyZNUn8Y7XIFSG3et6oZd7g0kZtgYpX/b NMJ2XOvFLYtiDv7tY1yDzKJ3qs+R+JllOyLk+4PRlnWF65Zzmzz/S535IOfgG82N2cbop /WnYYrcpw448p8Q7WVP5+SbhCNHV/0wlWc4Vrhb42EpOrye4yg+oVY0yz+LlgTJBQbbSf lJ54+0FUP8F6Q5evhpCIEVhLp+8bFIyW2cH7tk/jydvUcN3Pb6iTI/FSR333JJ0sKZA== 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=D20oZDqo; 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 AC51C606A691 for ; Wed, 2 Dec 2026 14:54:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AC51C606A691 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=D20oZDqo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=smtpout1; t=1796223271; bh=NY1YGiK17OXUS6E4wmmIP26yS5vShMwuEcSgqqL6UcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D20oZDqoV4dpxYBBvEe/5aMCqZF3pECVK5q7wrfdpYfyQEYiUke/YMHadkmTlyINv C8TF2Bs5O30ZhfhsOgfytyAtOdLHc3RqZVrw5204YUQzix2Mf3fU7YM/r0oP9rAIBy +N5maxjpWmN1Ay5obJcxRE5151B+LFymURHof5OUO3K7Kr+iqp+0pMuK7T1JsPg5xX WNDyi8rAk5bM9omTwOey9m5HS9sNzl8eeeADWrUGKFViCiNf2faEB6ZkIEyWQV+tDe mljJ3t72JIr1Ap0nf4jtp1gNZF7VJ1cFKQmhySYsmr8rTIcbrHeCrjKcTCC+w4LjSs fPovb7lCsPGXg== Received: from thinkos.internal.efficios.com (mtl.efficios.com [216.120.195.104]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4jfglC04KRzZQY; Wed, 02 Dec 2026 09:54:31 -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 33/36] sched/deadline: Keep a reaped deadline task in a rebuild Date: Wed, 2 Dec 2026 09:54:26 -0500 Message-ID: <20261202145428.341797-9-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: <3edb25262589e32cd881312999f521f9bab9d910.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 the lockless check of p->dl.dl_bw race with __sched_setscheduler() > admitting p to SCHED_DEADLINE? Yes. In v14, dl_task_unhash() will test dl_bw under the rq lock. release_task() will then take the rq lock of each task it reaps. > If p migrates to another active CPU in the same root domain between > release_task() and its final schedule in do_task_dead(), does > dl_task_depart() leave a stale p->dl.dl_bw_cpu? Yes. In v14, dl_task_depart() will record the CPU the task departs from, even for a task already on the list. Also, if the CPU recorded is inactive, dl_clear_root_domains() will no longer drop a task that still runs in the class. It will count it on the CPU that the walk of the task list would pick. It reads the task without its locks, so that CPU can be wrong. The bandwidth then stays in that root domain until the release, or the next rebuild. > Can keeping an active exited task on dl_departed_list cause a rebuild to > drop its bandwidth while it is still running in SCHED_DEADLINE? Yes, for both cases. The second fix above covers the second case. For the first case, dl_task_undepart() in v14 will set dl_bw_skip_gen. That asks dl_clear_root_domains(), which ends the rebuild, to count the task. Thanks, Mathieu