From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796282875; b=ShMZJzF7SJgFRBEWPScXFFwK0q7xnK458K84Zemi0uen6YgZzlVvtRViZ3LhECrSV41Z MZJRP5bosYO2xO2MFPJlvEfvwyyzK0IGojh2+ZtC/B7lB7efQmNAdeaV0/EwapaDj/CsH aW/hodhb0UQ7gx3JTzBYVy4HV0bQvq+6wWqtRburubmJgq4TFr2c1g6LXEmq5sIcEB3Fg YmchLnf+BNPXpfo5wSLPvayNJiEDHM3vh19fsAeVwclkgknkX2cbzaJQV6zbic3u4sLOJ hIJSeCQs92uPkhL+J2iu+WxoXixCFaMfmImoJu090diNurr57H1KAV+3ilrcMzj1guQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796282875; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=mcWdaXfVk/T54NwwQcOCsYFsmbjndwA+gLReKFBYpIA=; b=b1ohQW8F1kSxIvm0GN6idC6ISf6kUdl8ePwHvywLKlxE5kB58P3qqKbVFpMHWHk+HphD YiLDZRZ9qvt7i5b13ntE7hs7CTYUFXQZB3EmiqZNNAk+d3QW7NF/U+BpCJNrx9MmVFjRD cgLBow36rkY+v/An4HDBIBXLbrb7nRXvrJKgzj1wHDHe9fZWpV57Odf/V0hMdc5RusJSL XJrlc/QEsO4a2m4oSrUkx5UgxFP43MBWb/aaiWbIbx+oj3HaTl1N4zsXFxk/Iza5R/Ri7 eCpKyD7VdIzzptUdE/BboJPs4lFoygRA/Ac3ejAlCB76JK+K51ASWbo3hkr7OEGpMNQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WeHaRnpm; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=JVkjQNmz; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 18BB6606A322 for ; Thu, 3 Dec 2026 07:27:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 18BB6606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WeHaRnpm; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=JVkjQNmz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796282874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mcWdaXfVk/T54NwwQcOCsYFsmbjndwA+gLReKFBYpIA=; b=WeHaRnpmmEToS+UpJZHriHBFEtfNrm22crUN+Oq/MCWgC+nLDy2/dr7Iazxj03+fYRYS9p YUiBqk7eo9acSUgJlZMFpBi9H0qJ2UPkyqlb/qrS432p59BDCinefHPKYefF+8hDcXUGje znHM1aRB85xrSj1vpCm2qgnF9/sgBoM= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-4gy6oQCTO1qBZ15_fKef2g-1; Thu, 3 Dec 2026 07:27:52 +0000 X-MC-Unique: 4gy6oQCTO1qBZ15_fKef2g-1 X-Mimecast-MFC-AGG-ID: 4gy6oQCTO1qBZ15_fKef2g_1796282871 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4bb66fc3aa6so117244985e9.2 for ; Wed, 02 Dec 2026 23:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796282871; x=1796887671; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=mcWdaXfVk/T54NwwQcOCsYFsmbjndwA+gLReKFBYpIA=; b=JVkjQNmznjTojIcqx/igGlc0WynZ417cEgF5S6OYqh8V1H/Ey1ha8wurvAZ/kElNG3 sS3mnsRs0Yqy9HFS8YpidvIc4ccin+BAl05DUiLXwQtdHz19G97ybP/iV4Wvz93TsJ4t oEsn9h6SyIy4CaWxeOD7m4SpbMhW814aOMkZ8OySuc+e7R2zvNHz5mgiob3hbVTyu3U1 EiCfKQjY2LCqVBpT3imV0enBgW6NGx37D9+rZRyf6/E8GU5+++4V647IutVbGJ5FEbhv WwUkKgctTsU7v/2Wm/0zpWdWWgB+7lJirngFuBtXC0FCRDQg2BdGQje+jwhjjcpx6QMd UNJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796282871; x=1796887671; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=mcWdaXfVk/T54NwwQcOCsYFsmbjndwA+gLReKFBYpIA=; b=e5YF18/OHsUxQ6fhzARlyDCNrWzZ91ffSrYaMwCw5DJ1hbOViK47pSFIs+YRjiD88p PJ9fCCIh4wQQTb0HobbD1btfOD3d5hjAHlEohxgSD0jfrfqdFF/g8lroD8CcNOBsQN1c wj+9+4x1+gUaObR5iHpXDerE9lLcQYKYEIwPAYIO4vR+mD3vNMDHkx9kh8IpejY7TdSp tl+kI2hU4FAUaRUZe9G0L2rmyU36QbzvEY/rqON/q2ZwE+OlILlMtJhjX0L1uH/YNZy3 kAe65h58xmI9O3nozau6RBUalO6LWPEqiuIdzOKIQdtb+e9LkDWk3ZaaoQI8WiUIH7uj AqFw== X-Forwarded-Encrypted: i=1; AL+hErECwOx4viV1K8Ej30TJhd3otLEpYs1gltc65ezc3cg3tTqj1R36eKT5rE7dKZPEcliYc9mErlPBy33Ud2w=@vger.kernel.org X-Gm-Message-State: APuU4Z+l9qpUIdDxM3EY4pXr/SQisAVk42oqMyArHSZc+N2Sdvfr3jEP Xj3GO/do8TA7DAok9nqFnFZarPsn/f71/O6R+b8Yqvijunn4FHpGHICO+o9t693RWvXx9+XAlDm OeuiZ75p/LqvBgbdJaVQk/kcqV+1/R7OIaaT9N9mC1vT/TEgXyz96CVa05kd71Ju3/g== X-Gm-Gg: AZFdTZeKJOT8rfSBCH26vBrBD2eOcUFp2AvJhHuhe5fD9GCCR4e2/jNt8t0L9Ioc2sL OZD/FtZ7LLtqSDrxWx0Fdud9oKENHPTQuC46VjUx6kl3r/zZWYBJ7RTwAmY2O+lORnxZq0m0EKu HzgMOKPu+uKyrafRG1jfY4yeElnCybgHj1cJLRXBatRVwIfyxqei02nOMwci6Vj+YcMP8xwZncI XKyBf2B+uCKu7qQA/8LdUIIWdxZZK/N7QqGty4rmxPuiIQqMkwcvWW5T1QHROHgvUSVR9IWSVuC y0+ZKyILsQktjc6YxOR6v9+Pm804jG6B0ebAKpwXgirD56pfo8dbCTeARlOWlTiRfFiIU2Qom9R 8cKOgz9kw5dvKXQMV7qkyNT9v7w5KngbUCeB+70Z+VOUI7F0N/rVjBUqA3NCUM//MoH7qVhV3mF T9p1Y= X-Received: by 2002:a05:600c:8906:b0:4bb:a60e:a316 with SMTP id 5b1f17b1804b1-4bba60ea355mr428688455e9.12.1796282871132; Wed, 02 Dec 2026 23:27:51 -0800 (PST) X-Received: by 2002:a05:600c:8906:b0:4bb:a60e:a316 with SMTP id 5b1f17b1804b1-4bba60ea355mr428688025e9.12.1796282870739; Wed, 02 Dec 2026 23:27:50 -0800 (PST) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.146.153]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bba6a0d65fsm679589125e9.3.2026.12.02.23.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 23:27:50 -0800 (PST) Date: Thu, 3 Dec 2026 08:27:47 +0100 From: Juri Lelli To: Mathieu Desnoyers Cc: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, tglx@kernel.org, will@kernel.org, boqun@kernel.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, luca.abeni@santannapisa.it, tommaso.cucinotta@gmail.com, mathieu.poirier@linaro.org, longman@redhat.com, ridong.chen@linux.dev, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com, shuah@kernel.org, bigeasy@linutronix.de, clrkwllms@kernel.org, parri.andrea@gmail.com, m.szyprowski@samsung.com, kayracizmeci@gmail.com, weihengqiuu@gmail.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rt-devel@lists.linux.dev, oleg@redhat.com, brauner@kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v13 05/36] sched/deadline: Keep a departing constrained task until its next period Message-ID: References: <835511935d961be832cbaf24e902762d1926e611.1796146461.git.mathieu.desnoyers@efficios.com> <9430f4cd-bdb6-4003-98a2-740296aed499@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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9430f4cd-bdb6-4003-98a2-740296aed499@efficios.com> On 02/12/26 13:02, Mathieu Desnoyers wrote: ... > One question. The inactive timer can be armed in one period. Its > handler can then wait for the rq lock while the task runs a new period. > If the task leaves the class then, task_non_contending() releases the > bandwidth at once, as on v7.4-rc2. This is before the 0-lag time of the > new period. The root domain can then admit another task into that > bandwidth too early. The task itself keeps its deadline, so it gains no > runtime. v13 closed this window with the timer restart. Is this window > fine with you, or should the planned next version close it? I'd leave it open. It is on v7.4-rc2 already, the rework doesn't make it wider, and it is hard to hit: nothing holds the rq lock across the wakeup, the run and the class change, and once the handler spins on pi_lock/rq lock the queued spinlock lets it in after a few short sections. The handler's CPU has to stall between __run_hrtimer() marking the timer running and task_rq_lock(), for about a period of the task (a preempted vCPU?). Maybe we can list it as a known limit or corner case. Thanks for picking up the two fixes and the bail as separate patches, and for the new test case. I'll look at the reworked version when it's out (but, again, it might take a while as, after today, I will only be back for a week on the 14th before disappearing again until new year :). Thanks, Juri