Re: Question regarding spinlock

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

 



Mulyadi Santosa schrieb:
Hi...

Sorry if my earlier post confused some people. What I wanted to say
was actually that spinlock is SMP safe, however, in multicore it makes
code running on a cpu might spin to wait for other code running on
different cpu.

so, to avoid this, perhaps the original poster could gain better
scalability by adopting per CPU data structure. Therefore, spin lock
usage is reduced only on cases e.g data must be global across CPU or
blocking wait is not an option

regards,

Mulyadi.
 

Thanks for the infos. I will have a look at these per CPU Data structures. But i think what I need to avoid a possible error is something like this:
while(spinlock_is_locked(...)){wait(...)}

Because I'm developing for a custom platform, I don't care about several processors that much...

Regards,
Ole



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux