public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@redhat.com>
To: Tommaso Cucinotta <tommaso.cucinotta@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Shashank Balaji <shashank.mahadasyam@sony.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/deadline: document new sched_getattr() feature for retrieving current parameters for DEADLINE tasks
Date: Tue, 3 Mar 2026 13:02:32 +0100	[thread overview]
Message-ID: <aabN2DpeZOB0IFdR@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <20260303104215.1324243-1-tommaso.cucinotta@santannapisa.it>

Hello,

On 03/03/26 11:41, Tommaso Cucinotta wrote:
> Document in Documentation/sched/sched-deadline.rst the new capability of sched_getattr() to retrieve, for DEADLINE tasks, the runtime left and absolute deadline (setting the flags syscall parameter to 1), in addition to the static parameters (obtained with flags=0).

Looks like changelog wasn't properly wrapped?

> Signed-off-by: Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>
> Acked-by: Juri Lelli <juri.lelli@redhat.com>
> ---
>  Documentation/scheduler/sched-deadline.rst | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/scheduler/sched-deadline.rst b/Documentation/scheduler/sched-deadline.rst
> index ec543a12..03970cc8 100644
> --- a/Documentation/scheduler/sched-deadline.rst
> +++ b/Documentation/scheduler/sched-deadline.rst
> @@ -628,10 +628,21 @@ Deadline Task Scheduling
>    * the new scheduling related syscalls that manipulate it, i.e.,
>      sched_setattr() and sched_getattr() are implemented.
>  
> - For debugging purposes, the leftover runtime and absolute deadline of a
> - SCHED_DEADLINE task can be retrieved through /proc/<pid>/sched (entries
> - dl.runtime and dl.deadline, both values in ns). A programmatic way to
> - retrieve these values from production code is under discussion.
> + The leftover runtime and absolute deadline of a SCHED_DEADLINE task can be
> + read using the sched_getattr() syscall, setting the last syscall parameter
> + `flags' to the SCHED_GETATTR_FLAG_DL_DYNAMIC=1 value. This updates the
> + runtime left, converts the absolute deadline in CLOCK_MONOTONIC reference,
> + then returns these parameters to user-space. The absolute deadline is
> + returned as the number of nanoseconds since the CLOCK_MONOTONIC time
> + reference (boot instant), as a u64 in the sched_deadline field of sched_attr,
> + which can represent nearly 585 years since boot time (calling sched_getattr()
> + with flags=0 causes retrieval of the static parameters instead).
> +
> + For debugging purposes, these parameters can also be retrieved through
> + /proc/<pid>/sched (entries dl.runtime and dl.deadline, both values in ns),
> + but: this is highly inefficient; the returned runtime left is not updated as
> + done by sched_getattr(); the deadline is provided in kernel rq_clock time
> + reference, that is not directly usable from user-space.

This looks good to me instead.

Thanks,
Juri


  reply	other threads:[~2026-03-03 12:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 10:41 [PATCH] sched/deadline: document new sched_getattr() feature for retrieving current parameters for DEADLINE tasks Tommaso Cucinotta
2026-03-03 12:02 ` Juri Lelli [this message]
2026-03-03 17:26 ` kernel test robot
2026-03-03 18:42 ` Tommaso Cucinotta
2026-03-03 23:20   ` Randy Dunlap
2026-03-04 10:28 ` [PATCH v2] " Tommaso Cucinotta
2026-03-04 10:28   ` Tommaso Cucinotta
2026-03-09 16:17     ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aabN2DpeZOB0IFdR@jlelli-thinkpadt14gen4.remote.csb \
    --to=juri.lelli@redhat.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=shashank.mahadasyam@sony.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tommaso.cucinotta@gmail.com \
    --cc=tommaso.cucinotta@santannapisa.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox