public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 v7 14/15] rv: Add deadline monitors
Date: Thu, 12 Mar 2026 14:37:34 +0100	[thread overview]
Message-ID: <abLBnlqIHVPEcisP@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <20260310105627.332044-15-gmonaco@redhat.com>

Hello,

On 10/03/26 11:56, Gabriele Monaco wrote:

...

> +/* Used by other monitors */
> +struct sched_class *rv_ext_sched_class;
> +
> +static int __init register_deadline(void)
> +{
> +	if (IS_ENABLED(CONFIG_SCHED_CLASS_EXT))
> +		rv_ext_sched_class = (void *)kallsyms_lookup_name("ext_sched_class");

Looks like the above look up can fail. I don't actually see how/why if
would fail if things build correctly and EXT tasks are around. But,
theoretically, we could end up with rv_ext_sched_class = NULL ?

...

> +static inline bool task_is_scx_enabled(struct task_struct *tsk)
> +{
> +	return IS_ENABLED(CONFIG_SCHED_CLASS_EXT) &&
> +	       tsk->sched_class == rv_ext_sched_class;
> +}
> +
> +/* Expand id and target as arguments for da functions */
> +#define EXPAND_ID(dl_se, cpu, type) get_entity_id(dl_se, cpu, type), dl_se
> +#define EXPAND_ID_TASK(tsk) get_entity_id(&tsk->dl, task_cpu(tsk), DL_TASK), &tsk->dl
> +
> +static inline uint8_t get_server_type(struct task_struct *tsk)
> +{
> +	if (tsk->policy == SCHED_NORMAL || tsk->policy == SCHED_EXT ||
> +	    tsk->policy == SCHED_BATCH || tsk->policy == SCHED_IDLE)
> +		return task_is_scx_enabled(tsk) ? DL_SERVER_EXT : DL_SERVER_FAIR;
> +	return DL_OTHER;
> +}

Considering that, if that happens, get_server_type() will return
DL_SERVER_FAIR for scx tasks as well (possibly confusing monitors?),
shall we add a warn or something just in case. A 'no we don't need that
because it can't happen' works for me, just thought I should still
mention this. :)

Thanks,
Juri


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

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 10:56 [PATCH v7 00/15] rv: Add Hybrid Automata monitor type, per-object and deadline monitors Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 01/15] rv: Unify DA event handling functions across monitor types Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 02/15] rv: Add Hybrid Automata monitor type Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 03/15] verification/rvgen: Allow spaces in and events strings Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 04/15] verification/rvgen: Add support for Hybrid Automata Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 05/15] Documentation/rv: Add documentation about hybrid automata Gabriele Monaco
2026-03-12 10:39   ` Juri Lelli
2026-03-13 13:05     ` gmonaco
2026-03-13 13:23       ` Juri Lelli
2026-03-10 10:56 ` [PATCH v7 06/15] rv: Add sample hybrid monitors stall Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 07/15] rv: Convert the opid monitor to a hybrid automaton Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 08/15] sched: Add task enqueue/dequeue trace points Gabriele Monaco
2026-03-18 15:44   ` gmonaco
2026-03-10 10:56 ` [PATCH v7 09/15] rv: Add enqueue/dequeue to snroc monitor Gabriele Monaco
2026-03-23  9:06   ` Nam Cao
2026-03-10 10:56 ` [PATCH v7 10/15] rv: Add support for per-object monitors in DA/HA Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 11/15] verification/rvgen: Add support for per-obj monitors Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 12/15] sched: Add deadline tracepoints Gabriele Monaco
2026-03-12 13:07   ` Juri Lelli
2026-03-10 10:56 ` [PATCH v7 13/15] sched/deadline: Move some utility functions to deadline.h Gabriele Monaco
2026-03-10 10:56 ` [PATCH v7 14/15] rv: Add deadline monitors Gabriele Monaco
2026-03-12 13:37   ` Juri Lelli [this message]
2026-03-18 12:00     ` gmonaco
2026-03-10 10:56 ` [PATCH v7 15/15] rv: Add dl_server specific monitors Gabriele Monaco
2026-03-12 13:55   ` Juri Lelli

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=abLBnlqIHVPEcisP@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