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

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

 



On 2020-04-16 14:40:02 [-0400], Steven Rostedt wrote:
> 
> I wonder if we should have a this_cpu_spin_lock_irqsave(), that would
> encapsulate the migrate_disable()?
> 
> static inline this_cpu_spin_lock_irqsave(struct spinlock __per_cpu *lock)
> {
> 	migrate_disable();
> 	spin_lock_irqsave(this_cpu_ptr(lock));
> 	migrate_enable();
> }
> 

I would postpone it until we have more potential users. If Uladzislau
wouldn't insist on avoidin a potential migration spot we wouldn't have
this conversation. Most code, as I remember it, is using locks so they
can access the data structure cross-CPU so the possible migration
doesn't matter much.
I would like to avoid the local-lock like zoo where we have/had a lot of
locking based function with two users or so.

> 
> ?
> 
> -- Steve

Sebastian



[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