From: Juri Lelli <juri.lelli@redhat.com>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Nam Cao <namcao@linutronix.de>, Juri Lelli <jlelli@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Tomas Glozar <tglozar@redhat.com>,
Clark Williams <williams@redhat.com>,
John Kacur <jkacur@redhat.com>
Subject: Re: [PATCH v6 15/16] rv: Add deadline monitors
Date: Mon, 2 Mar 2026 15:37:48 +0100 [thread overview]
Message-ID: <aaWgvBXaNg48qYRl@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <20260225095122.80683-16-gmonaco@redhat.com>
Hello,
On 25/02/26 10:51, 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 <peterz@infradead.org>
> Reviewed-by: Nam Cao <namcao@linutronix.de>
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
> ---
...
> +static inline int extract_params(struct pt_regs *regs, long id, struct task_struct **p)
> +{
> + size_t size = offsetof(struct sched_attr, sched_nice);
> + struct sched_attr __user *uattr, attr;
> + int new_policy = -1, ret;
> + unsigned long args[6];
> + pid_t pid;
> +
> + switch (id) {
> + case __NR_sched_setscheduler:
> + syscall_get_arguments(current, regs, args);
> + pid = args[0];
> + new_policy = args[1];
> + break;
> + case __NR_sched_setattr:
> + syscall_get_arguments(current, regs, args);
> + pid = args[0];
> + uattr = (void *)args[1];
> + /*
> + * Just copy up to sched_flags, we are not interested after that
> + */
> + ret = copy_struct_from_user(&attr, size, uattr, size);
> + if (ret)
> + return ret;
> + if (attr.sched_flags & SCHED_FLAG_KEEP_POLICY)
> + return -EINVAL;
> + new_policy = attr.sched_policy;
> + break;
> + default:
> + return -EINVAL;
> + }
> + if (!pid)
> + *p = current;
> + else {
> + /*
> + * Required for find_task_by_vpid, make sure the caller doesn't
> + * need to get_task_struct().
> + */
> + guard(rcu)();
> + *p = find_task_by_vpid(pid);
> + if (unlikely(!*p))
> + return -EINVAL;
> + }
Not sure I get this comment. RCU is released when the function returns,
but then the task pointer is dereferenced by callers?
Thanks,
Juri
next prev parent reply other threads:[~2026-03-02 14:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 9:51 [PATCH v6 00/16] rv: Add Hybrid Automata monitor type, per-object and " Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 01/16] rv: Unify DA event handling functions across monitor types Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 02/16] rv: Add Hybrid Automata monitor type Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 03/16] verification/rvgen: Allow spaces in and events strings Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 04/16] verification/rvgen: Add support for Hybrid Automata Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 05/16] Documentation/rv: Add documentation about hybrid automata Gabriele Monaco
2026-03-02 13:58 ` Juri Lelli
2026-03-02 14:23 ` Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 06/16] rv: Add sample hybrid monitors stall Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 07/16] rv: Convert the opid monitor to a hybrid automaton Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 08/16] sched: Add task enqueue/dequeue trace points Gabriele Monaco
2026-03-06 8:58 ` Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 09/16] rv: Add enqueue/dequeue to snroc monitor Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 10/16] rv: Add support for per-object monitors in DA/HA Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 11/16] verification/rvgen: Add support for per-obj monitors Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 12/16] sched: Add deadline tracepoints Gabriele Monaco
2026-03-02 14:15 ` Juri Lelli
2026-03-02 14:24 ` Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 13/16] sched/deadline: Move some utility functions to deadline.h Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 14/16] sched_ext: Export task_is_scx_enabled() for verification Gabriele Monaco
2026-02-25 17:08 ` Tejun Heo
2026-02-26 7:10 ` Gabriele Monaco
2026-02-26 15:22 ` Tejun Heo
2026-02-26 15:42 ` Gabriele Monaco
2026-02-26 15:48 ` Tejun Heo
2026-02-26 16:25 ` Gabriele Monaco
2026-02-26 17:54 ` Tejun Heo
2026-02-26 18:39 ` Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 15/16] rv: Add deadline monitors Gabriele Monaco
2026-03-02 14:37 ` Juri Lelli [this message]
2026-03-02 15:11 ` Gabriele Monaco
2026-02-25 9:51 ` [PATCH v6 16/16] rv: Add dl_server specific monitors Gabriele Monaco
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=aaWgvBXaNg48qYRl@jlelli-thinkpadt14gen4.remote.csb \
--to=juri.lelli@redhat.com \
--cc=corbet@lwn.net \
--cc=gmonaco@redhat.com \
--cc=jkacur@redhat.com \
--cc=jlelli@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=namcao@linutronix.de \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.com \
--cc=williams@redhat.com \
/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
all inboxes | Powered by JetHome®