Re: [PATCH v6 19/21] timer: Implement the hierarchical pull model
From: Anna-Maria Behnsen
Date: Tue May 16 2023 - 08:50:28 EST
On Mon, 15 May 2023, Sebastian Siewior wrote:
> On 2023-05-15 12:50:25 [+0200], Anna-Maria Behnsen wrote:
> > The part will be replaced by:
> >
> > ---8<----
> >
> > local_irq_disable();
> > timer_lock_remote_bases(cpu);
>
> Do you s/raw_spin_lock_irq/raw_spin_lock/ in timer_lock_remote_bases()?
> Otherwise you disable interrupts twice. Not wrong but not needed.
Yes, I do so. And I also drop the return value and take the locks
unconditianlly.
> > raw_spin_lock(&tmc->lock);
> >
> > if (!tmc->online || !tmc->idle) {
> > timer_unlock_remote_bases(cpu);
> > goto unlock;
> > } else {
> > fetch_next_timer_interrupt_remote(jif, now, &tevt, cpu);
> > }
> >
> > timer_unlock_remote_bases(cpu);
>
> The locking, unlocking and fetch_next_timer_interrupt_remote() is only
> used here. So it if it wouldn't be for tmc-> then you could do
> everything timer.c in once place…
I thought about it, but then the logic has to be moved to timer.c but it is
timer_migration related code... I would like to keep the logic here in
timer_migration code... will send a v7 soon.
Thanks,
Anna-Maria