Re: Help - does module run as a single thread process?

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

 



On Thu, Jun 24, 2004 at 13:00:10 -0700, l x wrote:
> Thanks for the information.  It helps.
> 
> Sounds to me like, we can completely disable
> preemption (time sharing feature) of lk 2.6 and then
> lk 2.6 will act like lk 2.4?
> 
> How/where/when can we use:
> 
> preempt_disable()
> preempt_enable()
> get_cpu()
> put_cpu()
> 
> on lk 2.6 to change it to a non-preemptive OS?  Google
> only gives me one search result for preempt_disable.

Preemption is equivalent to SMP and every code in linux kernel must work
on SMP too (remember that hyperthreading is SMP and that is rather
common in new CPUs). So you don't want to preempt_disable/enable
manualy. They are part of spinlock and irq disabling macros. Since every
code, that needs disabled preemption also needs mutual exclusion on SMP,
you should be using spinlocks, which do the right thing.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[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