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.133.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 5652B3590D5 for ; Mon, 19 Jan 2026 11:04:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768820685; cv=none; b=dTtxcsCRZ2Xh6lGnzzRlDRyo+b0sU/HVPPs7iizBo3NRpKkE1roAAqTbsGsNSB0O6TMqJVKesMoNM37jE/fwLN1ex4xcqeSLn/7o1xNQgxV/z0qW42vyay75jyGAixGYalsCuCLb5emI8RmzNe2hOWc7DkR2cer9oD+BwvWRAgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768820685; c=relaxed/simple; bh=/muiXxKbxDRdO0MB+mCm4SfaD5B3F+0ImKkl0B9gKiQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jpYsFHAm12coXuUejD2wLl9CY70jhCTrZAH9NqlxYpGrna003Sl2O0gBRW7P5cN3F0tnfrIghV68lsSaU8wHfmr0JkPWSaP/l3i6q/rRseRxbxy9Ase7E28cCmrCQgflB25AeBBM6mPOq1JGxMub2cJ1Et6+6iDl07pJNlwwT0o= 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=IUWqQC0C; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=nSyY1rrM; arc=none smtp.client-ip=170.10.133.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="IUWqQC0C"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="nSyY1rrM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768820675; 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=hNfGrzoWgmkgHbgWpkrQnRoddNG6uHNGHcsuvEPWnR4=; b=IUWqQC0CI4DWj/FbZf+8lBDAWwZzwRD/1uvRMC/t7kNlUOmunzGEgFePVLfJSZ8wY5lClI fu60WM4Zx9LXqstwGoP3GYbwIU9EvnJN8DsLIKQkCyfJHvEVzK3qKC8qoanQyj5gLDNJ3f /0nTlsPalBRWZQUfLiCpAlUiVEzxv9s= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-TdiBj3J1NVOzgkt7iQKUkA-1; Mon, 19 Jan 2026 06:04:34 -0500 X-MC-Unique: TdiBj3J1NVOzgkt7iQKUkA-1 X-Mimecast-MFC-AGG-ID: TdiBj3J1NVOzgkt7iQKUkA_1768820673 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-43102ac1da8so3521430f8f.2 for ; Mon, 19 Jan 2026 03:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1768820673; x=1769425473; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hNfGrzoWgmkgHbgWpkrQnRoddNG6uHNGHcsuvEPWnR4=; b=nSyY1rrMvzEgw5q5ekPkpYf+X7bEsGR2ZnMi3a1KsILuFhjGJyOKSEzUYU6lmU+oCD ao9N0vEHTBgp+qJIEYl6Z2JA7ejBbZKiqBO90y42uS4b11Vjm8BhoPf+bHY9qS/PuoK0 4ndt3DkZR116lRCo8ZANW0zTtGJxvDjgaa9rajLS5IXSHr3LONPGb/FLzFvER1wzo4ye SbkklVlkkz/L9JbjvHCPgXyzp8TYtdDcUQAujbI3YXVeSJkk7HgZek3PulxwnoNsHH9L U2amH4MxoZUzf3VbaXaM5aiSPasIHYYTABShZAw9czJ2WN7R+1KIir859nNBaWFK2hS6 hA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768820673; x=1769425473; h=in-reply-to:content-disposition: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; bh=hNfGrzoWgmkgHbgWpkrQnRoddNG6uHNGHcsuvEPWnR4=; b=Wl7gAcjS9pqhCzNwq3g7L+f01kfMGcJHL+3SqCQ8SEK7Tpc9XPPcSshrFLS61n03G8 q8VWrizPNctIp+f3j1THZauOoldimitVEmZ3nH2qsTlnPgMWyr0pmJDyinETDzb5O8HW Yt3NUeapfRxrZXsAISc/we8XaKNd9jGT1uVWTjsHDMPV2RQ5az/tHSYo5xhrSYJHjC1j If1NYuQpu0xiZ3tFqTfMg7KVWZTONnbd1M941CgyNcRNSs1xmLtYwco61U4PBqO+0Xu+ WCVLfFwgC3c7hTxrRWGRhS13O0rV6pCele75icLhrvgkQXkX7sdxk9qcswgmMv8hMhzf JdgQ== X-Gm-Message-State: AOJu0YyUT8w7SkGAeJtSCU1ZZJZTwHKSBO46SxnrIQhfpL3WtZcUPZ8R moBOgpyhixclJ6ntElz6JjNbDjLLFsyEwwFLMnIEs1rKZicYqMNtos2QkJ5ExnhxaEUjKNF/QMD EHANmO9fzmxCDNltuKMHj4vQwWfqdnXumbJM61r/3Ed5xrwxhrOFkYJW1p93K4KZ6Sw== X-Gm-Gg: AZuq6aI1xCF5UGSp1ifmAghnRw0KQphnJrHrI2h6O8Z1b8/iPVgxgAEcSb4HfH+T4ie j1wWm+qI7AqWiEAo3Bpq4EY/FH36P+AhXQM/3MvdromW3aMyf37u2r3MQ94FPZB+oI1uTKhPp40 Kfij7XiDCXcwBusIOyWUmAEJjWAw7/0ZZoeqhxc3O3kDQqsiwMIAAh0n/5a2raPQqudW6uS5nGn grbWggaf8+ZeWKz2f0qCjaBnTtybWsYiiF7QvYBoYZ72WwyAfxUFJOw1g5e4uNdoFo4WWJWwHbw lH+meLukfSSBurapxTl7ZqEacsaQSGW6Gy/guRKJ3WSXodOQnohgJ+123/XLGYjhPSyaQ2r+acY U6GtCJlSMh3kUAIFkRnwTFQXUtizngqT/Ou0kK9dq X-Received: by 2002:a05:6000:1843:b0:431:864:d492 with SMTP id ffacd0b85a97d-43569bbaf7dmr13975637f8f.36.1768820672848; Mon, 19 Jan 2026 03:04:32 -0800 (PST) X-Received: by 2002:a05:6000:1843:b0:431:864:d492 with SMTP id ffacd0b85a97d-43569bbaf7dmr13975591f8f.36.1768820672434; Mon, 19 Jan 2026 03:04:32 -0800 (PST) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.129.40]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996cf33sm23073587f8f.25.2026.01.19.03.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 03:04:31 -0800 (PST) Date: Mon, 19 Jan 2026 12:04:29 +0100 From: Juri Lelli To: Gabriele Monaco Cc: linux-kernel@vger.kernel.org, Steven Rostedt , Nam Cao , Juri Lelli , Jonathan Corbet , Masami Hiramatsu , linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , Tomas Glozar , Clark Williams , John Kacur Subject: Re: [PATCH v4 14/15] rv: Add deadline monitors Message-ID: References: <20260116123911.130300-1-gmonaco@redhat.com> <20260116123911.130300-15-gmonaco@redhat.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260116123911.130300-15-gmonaco@redhat.com> Hello, On 16/01/26 13:39, Gabriele Monaco wrote: > Add the deadline monitors collection to validate the deadline scheduler, > both for deadline tasks and servers. > > The currently implemented monitors are: > * throttle: > validate dl entities are throttled when they use up their runtime > * nomiss: > validate dl entities run to completion before their deadiline > > Cc: Peter Zijlstra > Reviewed-by: Nam Cao > Signed-off-by: Gabriele Monaco > --- ... > +/* > + * User configurable deadline threshold. If the total utilisation of deadline > + * tasks is larger than 1, they are only guaranteed bounded tardiness. See > + * Documentation/scheduler/sched-deadline.rst for more details. > + * The minimum tardiness without sched_feat(HRTICK_DL) is 1 tick to accommodate > + * for throttle enforced on the next tick. > + */ > +static u64 deadline_thresh = TICK_NSEC; > +module_param(deadline_thresh, ullong, 0644); > +#define DEADLINE_NS(ha_mon) (pi_of(ha_get_target(ha_mon))->dl_deadline + deadline_thresh) ... > +static inline u64 runtime_left_ns(struct ha_monitor *ha_mon) > +{ > + return pi_of(ha_get_target(ha_mon))->runtime + RUNTIME_THRESH; > +} Why use pi_of() in above cases? For the first, in case the macro is called while the task is actually boosted, we then might continue to use that even after such task gets deboosted? For the second, current PI implementation (even if admittedly not ideal) uses donor's static dl_runtime to replenish boosted task runtime, but then accounting is performed again the task dynamic runtime, not the donor's (this all will hopefully change soon with proxy exec..)? Thanks, Juri