[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1502697588.12319.199.camel@gmx.de>
Date: Mon, 14 Aug 2017 09:59:48 +0200
From: Mike Galbraith <efault@....de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
linux-rt-users <linux-rt-users@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [patch-rt] hotplug, hrtimer: Migrate expired/deferred timers
during cpu offline
On Fri, 2017-08-11 at 10:15 +0200, Mike Galbraith wrote:
> On Fri, 2017-08-11 at 09:55 +0200, Mike Galbraith wrote:
> > The below fixes the list debug explosion up.
> >
> > If we do not migrate expired/deferred timers during cpu offline, ->cb_entry
> > will be corrupted by online initialization of base->expired, leading to a
> > loud list debug complaint should someone call __remove_hrtimer() thereafter.
> >
> > Signed-off-by: Mike Galvraith <efault@....de>
> ahem.....................b
(actually, I shouldn't have signed, question being why we now leave
them lying about when we _apparently_ previously did not)
> > ---
> > kernel/time/hrtimer.c | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > --- a/kernel/time/hrtimer.c
> > +++ b/kernel/time/hrtimer.c
> > @@ -1802,6 +1802,19 @@ static void migrate_hrtimer_list(struct
> > */
> > enqueue_hrtimer(timer, new_base);
> > }
> > +
> > + /*
> > + * Finally, migrate any expired timers deferred by RT.
> > + */
> > + while (!list_empty(&old_base->expired)) {
> > + struct list_head *entry = old_base->expired.next;
> > +
> > + timer = container_of(entry, struct hrtimer, cb_entry);
(oops, forgot to change that back too. [scribble scribble])
> > + /* XXX: hm, perhaps defer again instead of enqueueing. */
> > + __remove_hrtimer(timer, old_base, HRTIMER_STATE_ENQUEUED, 0);
> > + timer->base = new_base;
> > + enqueue_hrtimer(timer, new_base);
> > + }
> > }
> >
> > int hrtimers_dead_cpu(unsigned int scpu)
Powered by blists - more mailing lists