Re: [PATCH v5 16/18] timer: Implement the hierarchical pull model

Frederic Weisbecker
2023-03-14T13:27:34Z

Le Wed, Mar 01, 2023 at 03:17:42PM +0100, Anna-Maria Behnsen a écrit :
> diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c
> new file mode 100644
> index 000000000000..5a600de3623b
> --- /dev/null
> +++ b/kernel/time/timer_migration.c
> +static bool tmigr_active_up(struct tmigr_group *group,
> + struct tmigr_group *child,
> + void *ptr)
> +{
> + union tmigr_state curstate, newstate;
> + struct tmigr_walk *data = ptr;
> + bool walk_done;
> + u32 childmask;
> +
> + childmask = data->childmask;
> + newstate = curstate = data->groupstate;
> +
> +retry:
> + walk_done = true;
> +
> + if (newstate.migrator == TMIGR_NONE) {
> + newstate.migrator = (u8)childmask;
> +
> + /* Changes need to be propagated */
> + walk_done = false;
> + }
> +
> + newstate.active |= (u8)childmask;
> +
> + newstate.seq++;

Are you sure you need this seq counter? What bad scenario can happen without it?

Thanks.
>