Re: [PATCH 1/3] rcu: Use static initializer for krc.lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()?

Thanks!

--
Vlad Rezki



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux