[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87plag1nb6.fsf@yellow.woof>
Date: Tue, 21 Oct 2025 13:55:41 +0200
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>, linux-kernel@...r.kernel.org,
Steven Rostedt <rostedt@...dmis.org>, linux-trace-kernel@...r.kernel.org
Cc: Gabriele Monaco <gmonaco@...hat.com>, Tomas Glozar <tglozar@...hat.com>,
Juri Lelli <jlelli@...hat.com>, Clark Williams <williams@...hat.com>, John
Kacur <jkacur@...hat.com>
Subject: Re: [PATCH v2 18/20] rv: Add support for per-object monitors in DA/HA
Gabriele Monaco <gmonaco@...hat.com> writes:
> +static inline struct da_monitor *da_create_storage(da_id_type id,
> + monitor_target target,
> + struct da_monitor *da_mon,
> + gfp_t flags)
> +{
> + struct da_monitor_storage *mon_storage;
> +
> + if (da_mon)
> + return da_mon;
I think this 'if' should be moved to da_create_conditional() instead,
because the "conditional" part should be implemented in the function
whose name includes "conditional". I think that would make the code
easier to follow, because one would already have a good guess what the
function does without looking into the details.
> +static inline bool da_handle_start_event(da_id_type id, monitor_target target,
> + enum events event)
> +{
> + struct da_monitor *da_mon;
> +
> + if (!da_monitor_enabled())
> + return 0;
> + guard(rcu)();
> + da_mon = da_get_monitor(id, target);
> + da_mon = da_monitor_start_hook(id, target, da_mon);
Do you plan this da_monitor_start_hook() macro to do anything other than
storage preparation? If not, perhaps it is better to name it
da_monitor_prepare_storage() or something like that, so that this is
easier to follow.
Nam
Powered by blists - more mailing lists