mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Nam Cao <namcao@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Wander Lairson Costa <wander@redhat.com>,
	linux-trace-kernel@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/13] rv: Simply hybrid automata monitors's clock variables
Date: Tue, 19 May 2026 09:58:13 +0200	[thread overview]
Message-ID: <2a966b1499e4607d6ab8c33b20a2eff7fa40a855.camel@redhat.com> (raw)
In-Reply-To: <87h5o588m4.fsf@yellow.woof>

On Mon, 2026-05-18 at 09:44 +0200, Nam Cao wrote:
> Gabriele Monaco <gmonaco@redhat.com> writes:
> > On Mon, 2026-05-11 at 13:55 +0200, Nam Cao wrote:
> > > That can work, but not ideal, because hrtimer will not be usable.
> > 
> > Why not? If we have HA_TIMER_WHEEL , we'd use timer and expire, if we have
> > HA_TIMER_HRTIMER we'd only need hrtimer with it's hrtimer_get_expires():
> > 
> >  union {
> >  struct hrtimer hrtimer;
> >  struct {
> >  struct timer_list timer;
> >  u64 expire; /* Explicitly store the armed budget */
> >  };
> > 
> > we already can't use timer and hrtimer interchangeably.
> > What am I missing here?
> 
> Ah, now I understand the trick, thanks.
> 
> We already have an "expires" field in struct timer_list. But I am not
> sure if we are supposed to touch that field. Your proposal looks safer.

Yeah and even if we did, that'd be jiffy-granularity, so not good if the clock
is ns-based.

Let me sketch it out.

Anyway back to the patch, you need to fix the build for HA_TIMER_HRTIMER as well
(too many arguments to function ‘ha_invariant_passed_ns’; expected 3, have 4),
and the title should s/Simply/Simplify/

Thanks,
Gabriele

> 
> > > Looking at the throttle monitor again, is it possible to rewrite
> > > runtime_left_ns() to read .dl_runtime instead of .runtime? I don't know
> > > the deadline schedule very well, but I think .dl_runtime is not changing
> > > like .runtime?
> > 
> > In theory yes, but since the runtime is consumed only when running, we
> > cannot
> > just set the timeout once. We either save how much was consumed somewhere or
> > do
> > some start/pause mechanism.
> > Neither looks simpler to me.
> 
> Understood.
> 
> Nam


  reply	other threads:[~2026-05-19  7:58 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  6:59 [PATCH 00/13] rv: Convert rvgen to Lark Nam Cao
2026-05-05  6:59 ` [PATCH 01/13] verification/rvgen: Switch LTL parser " Nam Cao
2026-05-06  7:37   ` Gabriele Monaco
2026-05-10 18:18     ` Nam Cao
2026-05-15 15:55   ` Wander Lairson Costa
2026-05-18  7:15     ` Nam Cao
2026-05-05  6:59 ` [PATCH 02/13] verification/rvgen: Introduce a parse tree for automata using Lark Nam Cao
2026-05-15 18:37   ` Wander Lairson Costa
2026-05-18  7:18     ` Nam Cao
2026-05-18 14:45       ` Wander Lairson Costa
2026-05-05  6:59 ` [PATCH 03/13] verification/rvgen: Implement state and transition parser based on Lark Nam Cao
2026-05-06 14:48   ` Gabriele Monaco
2026-05-10 18:21     ` Nam Cao
2026-05-15 19:07   ` Wander Lairson Costa
2026-05-18  7:19     ` Nam Cao
2026-05-05  6:59 ` [PATCH 04/13] verification/rvgen: Convert __fill_verify_invariants_func() to Lark Nam Cao
2026-05-05  6:59 ` [PATCH 05/13] verification/rvgen: Convert __fill_setup_invariants_func() " Nam Cao
2026-05-05  6:59 ` [PATCH 06/13] verification/rvgen: Convert __fill_verify_guards_func() " Nam Cao
2026-05-06 14:51   ` Gabriele Monaco
2026-05-15 19:35   ` Wander Lairson Costa
2026-05-18  7:21     ` Nam Cao
2026-05-18 14:44       ` Wander Lairson Costa
2026-05-05  6:59 ` [PATCH 07/13] rv: Simply hybrid automata monitors's clock variables Nam Cao
2026-05-06  9:15   ` Gabriele Monaco
2026-05-11 11:55     ` Nam Cao
2026-05-12  9:31       ` Gabriele Monaco
2026-05-18  7:44         ` Nam Cao
2026-05-19  7:58           ` Gabriele Monaco [this message]
2026-05-25  8:03   ` Gabriele Monaco
2026-05-27 15:41     ` Nam Cao
2026-05-05  6:59 ` [PATCH 08/13] verification/rvgen: Simplify the generation for " Nam Cao
2026-05-05  6:59 ` [PATCH 09/13] verification/rvgen: Delete __parse_constraint() Nam Cao
2026-05-05  6:59 ` [PATCH 10/13] verification/rvgen: Switch __get_event_variables() to Lark Nam Cao
2026-05-05  6:59 ` [PATCH 11/13] verification/rvgen: Switch __create_matrix() " Nam Cao
2026-05-05  6:59 ` [PATCH 12/13] verification/rvgen: Remove the old state variables Nam Cao
2026-05-05  6:59 ` [PATCH 13/13] verification/rvgen: Remove dead code Nam Cao

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=2a966b1499e4607d6ab8c33b20a2eff7fa40a855.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=namcao@linutronix.de \
    --cc=rostedt@goodmis.org \
    --cc=wander@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®