preemption disable in spin_lock

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

 



Why is preemption disabled before a lock is acquired in _spin_lock function?

As the critical region of code which is to be protected by the spin
lock executes only after the lock is acquired, why is disabling of
preemption required before the lock is acquired?

Wouldn't it better if the kernel code that does the spinning before
the lock is acquired is itself preempted so that someone else can run
in the meanwhile?

Thanks,
-Joel

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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