[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201020113828.fv7ui4h3gkrcpqoc@linutronix.de>
Date: Tue, 20 Oct 2020 13:38:28 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Christian Eggers <ceggers@...i.de>, tglx@...utronix.de,
linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: sched: system doesn't boot since "sched: Add new
migrate_disable() implementation"
On 2020-10-20 13:30:09 [+0200], Peter Zijlstra wrote:
> On Mon, Oct 19, 2020 at 05:09:35PM +0200, Sebastian Andrzej Siewior wrote:
> > On 2020-10-19 12:21:06 [+0200], Christian Eggers wrote:
> > > I have problems with the latest 5.9-rt releases on i.MX6ULL (!CONFIG_SMP):
> > >
> > …
> > > Any hints?
> >
> > Thank you for the report. The reason is the migrate_disable()
> > implementation for !SMP.
>
> This should fix things I suppose. I'll fold it in.
It will. It will also break lazy-preemption. Each time a sleeping lock
is acquired there is also migrate_disable() and the migrate-disable
counter is != 0 (even for UP). The result is that a wake up for a
SCHED_OTHER task with mg counter != 0 will not lead to context switch
(same like preemption counter != 0). The difference is that a wake up
for a RT task ignores this counter and perform a context switch anyway.
That way we have RT wake ups on time but avoid stumbling from one lock
to another.
> ---
> --- a/include/linux/preempt.h
> +++ b/include/linux/preempt.h
> @@ -378,7 +378,12 @@ static inline void preempt_notifier_init
> extern void migrate_disable(void);
> extern void migrate_enable(void);
>
> -#else /* !(CONFIG_SMP && CONFIG_PREEMPT_RT) */
> +#elif defined(CONFIG_PREEMPT_RT)
> +
> +static inline void migrate_disable(void) { }
> +static inline void migrate_enable(void { }
> +
> +#else /* !CONFIG_PREEMPT_RT */
>
> /**
> * migrate_disable - Prevent migration of the current task
Sebastian
Powered by blists - more mailing lists