Re: Schedule() call in driver context.

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

 



On Sat, Feb 20, 2010 at 2:01 AM, Joel Fernandes <agnel.joel@xxxxxxxxx> wrote:
>> In fact the "kernel" is not interrupt-able in linux as I recall.  Thus
>> a misbehaving driver that enters an infinite loop will hang the whole
>> machine.
> ...
>> Another way to ask your question is "Why isn't the linux kernel itself
>> timesliced?"
>
> AFAIK, What you're talking about is a kernel compiled with "voluntary"
> preemption.. Isn't it true that in non-voluntary preemption
> (CONFIG_PREEMPT=y), the kernel execution itself can be
> preempted/interrupted when it is not in a spin lock guarded critical
> region?
>
> And since we're talking about sleeping, we're not in a critical region
> anyway (we're not supposed sleep in these AFAIK)
>
> Let me know your thoughts & Thanks,
> -Joel

Joel,

I think your right, but I also think (or at least suspect) that most
distros are currently not setting CONFIG_PREEMPT=y.

I'm running OpenSuse 11.2 with the 2.6.31 kernel currently:

> zcat /proc/config.gz | grep CONFIG_PREE
# CONFIG_PREEMPT_RCU is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set

So I should have remembered about CONFIG_PREEMPT but my explanation
was right for at least some distro kernels.

Greg

--
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