From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71CE7229B2A for ; Tue, 27 Jan 2026 08:52:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769503976; cv=none; b=TwutK29wJfMXoJtpkQqZ5VbnevKpI/sUjlgi4XJJuqLn236lkt0dLiVTXjIHz4r08y+7zsGKhWHHQTVBFDef5lQWIqVH+ASRF9dFC113LtRc5INB72KSIx23JGnf15U9esiT1xXHF9+Mf6gLk8Y08QXJJ0uNFG0eGRhOpZFhe0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769503976; c=relaxed/simple; bh=HARrLeRvlbAVyFhYP8StMCmJTs00OtP9eCqLafd59bk=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=VdZLbWkiJjDMrnZG9egkRtc817tdevxu1Nh8ZDOroC3AOn+7TSlXTYJsEcZDN6lwus6W/ReRfGl1ZrBal7NKgnR3+UxY/f3N+Nltv8Z4X/c+tjNcXGGykQdWl4si213EF4rEDDjeQuuE8+aANnzOvLOtAs/fRJFjhyAnTxU7kXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IYZNOl5F; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZM1bJhO2; arc=none smtp.client-ip=170.10.129.124 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.b="IYZNOl5F"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZM1bJhO2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769503974; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HARrLeRvlbAVyFhYP8StMCmJTs00OtP9eCqLafd59bk=; b=IYZNOl5FDdW3QsqHJQy9wDfrGbuAey7RG2MgjKVZ7S4Tz/0+SGovW4/L7FGKgHihs4xlqM xpx/LODllqwvdWT2ReipYwrcXDffu0pot4upp8EXC42nl33YAstsiLgFOyJiZbduuZLGW6 Tau2NBsFERd2zZwI4VLhiGCvtDJLBHg= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-35-4XgZZqQtOkmmjZIOHsdNHA-1; Tue, 27 Jan 2026 03:52:52 -0500 X-MC-Unique: 4XgZZqQtOkmmjZIOHsdNHA-1 X-Mimecast-MFC-AGG-ID: 4XgZZqQtOkmmjZIOHsdNHA_1769503972 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-42fdbba545fso4499318f8f.0 for ; Tue, 27 Jan 2026 00:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769503971; x=1770108771; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=HARrLeRvlbAVyFhYP8StMCmJTs00OtP9eCqLafd59bk=; b=ZM1bJhO2BNZzf/uhpXZFeMYCsOKUZ5HJE6uh7v4zBRgaPJXku+I45AqmhLgvrlFlth ftt5l0jqNOX1HR7X45vYA9FshWWYkSiYH4+9hCfTm+y4LSRVQwbEDvCkiLAeFGEXB4/+ JAeLnOcPaLM/nffxNboGM3HnXQGpM6NXfFas/wnKvoJelKvTAXpCckb7GBdNT0WUoX04 rl9pWlYq5ep6xwfbRFenGpLPEVRLPTa2ELFdu4LViKg+D7Iv5PdkRmo1Eh8r7XnET09q zcextk2Pss0OiBiExm72vcGhQZhoGCzw7PVz922UD7HW+7nClyf9l8+HV0BzvL8c1wxH aCNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769503971; x=1770108771; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HARrLeRvlbAVyFhYP8StMCmJTs00OtP9eCqLafd59bk=; b=LqRPHCo3U4yv8qMeFksZUi2060KJyVfvrl6eQ+WGmrbwgpjP1/0WLXW7f356MEl3hp OWRd+zbwxxvJcphDaZxvy2TAhSqNpNbPaR7Ld7+GoTEmLTgUluiu4Nvl9fX6o6uKVC+A 39tbh9AxlB/HXnmtAimBgj1rSUtBLPHtTQjEEVeWTlNSE6Gjgh1ZPE+Ef25mv58+HFfN jsHLV8HvSG8b8lmo3CUZzdMtKZX+lL4BlINB+FkE6yBZSupNvZrpt4eomcF34I29PdHI vzz2x7xaYX+l6EkVq/gIjmeqkqu8KNqf2mixHOQKpsqTCuuYtdLdl3Tqj6NSFJZ+4Ey8 GYdA== X-Forwarded-Encrypted: i=1; AJvYcCUPxVZlGfGrFzI5oZQMdUAWAGn/LvsaWy3EFHXtB+xqSnEWKi3Z+Ix5s7N4wBGmx9q1HZOPJofs4obfm0g=@vger.kernel.org X-Gm-Message-State: AOJu0YwkEYl47RoAKs6Ogdzdc8e9zn5XoUVOcckYlIele/wBFgO5PVCj XFfvn8N2dAt8cCJUZFjxao7cw2B/NZ4dEjSWYggY26mki29ZeJwSpuMLvgXfZSb7V/7c43UU3F5 0zRagFO0UUpYzJNmf/3vHCOAtRZ6DL/enSC0IHSzI3U/Sfo0amVccgUpqxHUUov3F3Q== X-Gm-Gg: AZuq6aLVtKQcu+D8Z/lz0os9inQpnPKNQkKxvTqbgmbolMQh7wqRoRzNZgIa+Bnnyq/ 1QS7s1gX0OGD1VfTsA7AjZd0qmnAriPXNmzXB88m4LCiIG7zRz0STaCRHbYvqkWR4F8WJV3tZFU PHSOLlcxCQCKelTterYZC+a2ccjlyBbY0jHl3UrxHG24ncl6uhSqwecOX5PnDGT5MFO9niVpr+d Xy4QOKxmRnkn0Dr8qEIocUHADX/1d7H2gCAwu7t5IiWIDMGMWcuMZksWKBxguf/zKkQx/hVc+92 HfAS4s/jqhj3qincWvUx2vBBBq1I++fdL3tJmm9XUdsnV5cRboGhJFtn3U4yMmJ83B3ebThbN0L yfGiT X-Received: by 2002:a05:6000:1787:b0:435:97ff:7d35 with SMTP id ffacd0b85a97d-435dd0a88e9mr1366669f8f.4.1769503971490; Tue, 27 Jan 2026 00:52:51 -0800 (PST) X-Received: by 2002:a05:6000:1787:b0:435:97ff:7d35 with SMTP id ffacd0b85a97d-435dd0a88e9mr1366636f8f.4.1769503971107; Tue, 27 Jan 2026 00:52:51 -0800 (PST) Received: from [127.0.0.1] ([176.33.57.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e7156dsm37237149f8f.20.2026.01.27.00.52.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Jan 2026 00:52:50 -0800 (PST) Date: Tue, 27 Jan 2026 08:52:48 +0000 From: Gabriele Monaco To: Andrea Righi Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Tejun Heo , Joel Fernandes , David Vernet , Changwoo Min , Daniel Hodges , sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org Message-ID: <9b8c90b1-9247-4159-9bf6-72bd71bb74a2@redhat.com> In-Reply-To: References: <20260123161645.2181752-1-arighi@nvidia.com> Subject: Re: [PATCH v2] sched/deadline: Reset dl_server execution state on stop Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Correlation-ID: <9b8c90b1-9247-4159-9bf6-72bd71bb74a2@redhat.com> 2026-01-26T21:27:11Z Andrea Righi : > On Mon, Jan 26, 2026 at 04:56:52PM +0000, Gabriele Monaco wrote: >> Still if it starts before the deadline, the server is going to get throttled as you observed, and perhaps since in your tests the CPU isn't idle, we don't stop the server after that dequeue and then we never replenish after the deadline (because we never start and as you mentioned, the timer is not armed). >> >> Can this be what you're observing? > > Yes, I think it matches what I'm observing. > > In my case the server is (re)started before the deadline, so it immediately > runs with exhausted runtime, gets throttled, and is dequeued. Since the CPU > isn't idle, we don't hit a path that would stop the server cleanly and > reset its execution state. > > At that point, because dl_defer_running is still set, the restart path > assumes the server is already in the running phase and skips arming the > deferral/replenishment timer. Therefore, once the deadline passes there is > no remaining trigger to replenish a new period and the server gets stuck in > a throttled-but-running state. > Alright thanks. I believe your fix would work even if you reset the defer_running only when the runtime is exhausted. This way we'd still keep a bit of benefits of the start-running sequence if fair/scx tasks sleep and run back when the server still has runtime. We could even keep the defer_running as it is and mark the server as defer_armed (with laxity timer and stuff) only if it starts in this exact condition (runtime = 0 and deadline not expired). But this may just be overly complex for little benefit. What do you think? Thanks, Gabriele