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: |On PREEMPT_RT kernel this code sequence breaks because RT-mutex |requires a fully preemptible context. Instead, use spin_lock_irq() or |spin_lock_irqsave() and their unlock counterparts. Sebastian