On 2020-04-16 18:18:19 [+0200], Uladzislau Rezki wrote: > On Thu, Apr 16, 2020 at 06:11:49PM +0200, Sebastian Andrzej Siewior wrote: > > On 2020-04-16 18:01:29 [+0200], Uladzislau Rezki wrote: > > > > As written in my previous email to Joel (who somehow fell of the Cc > > > > list in this part of the thread): > > > > |local_irq_save() + spin_lock() is the problem, see > > > > | https://www.kernel.org/doc/html/latest/locking/locktypes.html#spinlock-t-and-rwlock-t > > > > > > > You mean that in CONFIG_PREEMPT_RT: > > > > > > <snip> > > > local_irq_save(flags); > > > krcp = this_cpu_ptr(&krc); > > > spin_lock(&krcp->lock); > > > <snip> > > > > > > it will not be preempted, what does not follow PREEMPT_RT policy. Is that correct? > > > > No. local_irq_save() disables interrupts and spin_lock() acquires a > > sleeping lock which may schedule() if contended. The documentation has > > this piece: > > > Ah. Got it. Then it is a problem, agree. Do you have something > that would guarantee of being staying on the same CPU? > migration_disable()? migrate_disable() would work. > Thanks! Sebastian