Re: Re: locking and interrupts

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

 



Yes, spinlock would automatically disable kernel preemption. I was just giving theeoritical overview. As far as I know not all synchronization constructs would disable the kernel preemption automatically (for instance when acquiring a big kernel lock). In addition you could use preempt_enable() and preempt_disable() to explicitly enable or disable kernel preemption. Thanks.

-Govindraj

On Wed, 07 Oct 2009 11:15:06 +0530 wrote
>Rajat San,Just asking (since i didn't see spinlock implementation in kernel src),On Tue, Oct 6, 2009 at 5:52 PM, Rajat Jain wrote:

Hello Govind,

> What happens when you go for spin locks without
> disabling kernel preemption? Suppose you acquire
> a spin lock in a system call handler (a service
> routine on behalf of a user mode process) with
> kernel preemption enabled.

This is not possible. Spin lock APIs disable kernel preemption
automatically.Spin lock APIs disables kernel preemption in all its api or some specific apis only. Please confirm and elaborate. 


Thanks,

RajatBest regards,Krishna


[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